summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_pipe_blend.c
AgeCommit message (Collapse)AuthorFilesLines
2018-09-10svga: add support for independent blend function per render targetCharmaine Lee1-17/+16
This patch adds support for GL_ARB_draw_buffers_blend extension for SM4_1 device. Fixes piglit test fbo-draw-buffers-blend. This patch is squashed with a subsequent patch which fixed a regression. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Neha Bhende <bhenden@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-03-02svga: fix blending regressionBrian Paul1-11/+24
The earlier Mesa commit 3d06c8afb5 ("st/mesa: don't translate blend state when it's disabled for a colorbuffer") subtly changed the details of gallium's per-RT blend state. In particular, when pipe_rt_blend_state[i].blend_enabled is true, we have to get the src/dst blend terms from pipe_rt_blend_state[i], not [0] as before. We now have to scan the blend targets to find the first one that's enabled (if any). We have to use the index of that target for getting the src/dst blend terms. And note that we have to set identical blend terms for all targets. This fixes the Piglit fbo-drawbuffers2-blend test. VMware bug 2063493. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2018-03-02svga: check svga_have_vgpu10() in svga_delete_blend_state()Brian Paul1-1/+1
We were calling SVGA3D_vgpu10_DestroyBlendState() when vgpu10 was not enabled (bs->id==0 by default), resulting in lots of device errors. Reviewed-by: Neha Bhende<bhenden@vmware.com>
2017-07-25svga: implement MSAA alpha_to_one featureBrian Paul1-0/+1
The device doesn't directly support this feature so we implement it with additional shader code which sets the color output(s) w component to 1.0 (or max_int or max_uint). Fixes 16 Piglit ext_framebuffer_multisample/*alpha-to-one* tests. v2: only support unorm/float buffers, not int/uint, per Roland. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-08-26svga: add comment about unsupported blend modesBrian Paul1-0/+3
2016-08-26svga: add guest statistic gathering interfaceCharmaine Lee1-0/+2
With this patch, guest statistic gathering interface is added to svga winsys interface that can be used to gather svga driver statistic. The winsys module can then share the statistic info with the VMX host via the mksstats interface. The statistic enums used in the svga driver are defined in svga_stats_count and svga_stats_time in svga_winsys.h Reviewed-by: Brian Paul <brianp@vmware.com>
2016-04-25svga: separate HUD counters for state objectsBrian Paul1-2/+2
Count depth/stencil, blend, sampler, etc. state objects separately but just report the sum for the HUD. This change lets us use gdb to see the breakdown of state objects in more detail. Also, count sampler views too. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2016-04-07svga: add some trivial null pointer checksBrian Paul1-0/+3
These small mallocs will probably never fail, but static analysis tools may complain about the missing checks. Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2015-12-07svga: use the debug callback to report issues to the state trackerBrian Paul1-0/+9
Use the new debug callback hook to report conformance, performance and fallbacks to the state tracker. The state tracker, in turn can report this issues to the user via the GL_ARB_debug_output extension. More issues can be reported in the future; this is just a start. v2: remove conditionals around pipe_debug_message() calls since the check is now done in the macro itself. v3: remove unneeded dummy %s substitutions Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>, Reviewed-by: José Fonseca <jfonseca@vmware.com>
2015-10-16svga: add new GALLIUM_HUD queriesNeha Bhende1-0/+3
Add new GALLIUM_HUD queries for: num-shaders num-resources num-state-objects num-validations map-buffer-time num-surface-views num-resources-mapped num-flushes Most of this patch was originally written by Neha. Additional clean-ups and num-flushes counter added by Brian Paul. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Charmaine Lee <charmainel@vmware.com>
2015-09-02svga: update driver for version 10 GPU interfaceBrian Paul1-24/+166
This is a squash commit of roughly two years of development work. Authors include: Brian Paul Charmaine Lee Thomas Hellstrom Jakob Bornecrantz Sinclair Yeh Mingcheng Chen Kai Ninomiya MengLin Wu The driver supports OpenGL 3.3. Signed-off-by: Brian Paul <brianp@vmware.com>
2015-07-21gallium: replace INLINE with inlineIlia Mirkin1-2/+2
Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Marek Olšák <marek.olsak@amd.com>
2010-02-22svga: Fix PIPE_LOGICOP_INVERT.José Fonseca1-6/+1
Actually the current XOR implementation is an INVERT. This fixes rectangle selection in Maya.
2010-02-12svga: A few more tweaks to blend color state emission.José Fonseca1-1/+1
2010-02-02gallium: pipe/p_inlines.h -> util/u_inlines.hJosé Fonseca1-1/+1
2010-01-28Merge commit 'origin/perrtblend'Roland Scheidegger1-9/+9
Conflicts: src/gallium/drivers/softpipe/sp_screen.c src/gallium/include/pipe/p_defines.h
2010-01-25svga: adapt to blend changesRoland Scheidegger1-9/+9
2010-01-21svga: Remove unnecessary headers.Vinson Lee1-1/+0
2009-11-17svga: Add svga driverJakob Bornecrantz1-0/+246