aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
Commit message (Collapse)AuthorAgeFilesLines
* svga: assorted whitespace and formatting fixesBrian Paul2019-02-261-1/+1
| | | | | | Remove trailing whitespace, etc. Trivial.
* svga: add missing switch cases for shadow texturesBrian Paul2018-08-291-0/+2
| | | | | | | This doesn't seem to make any difference in testing, but it fixes a failed assertion when dumping sm3 shaders. Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix vgpu9 sprite coordinate bugBrian Paul2018-08-291-1/+1
| | | | | | | | | | | | | Setting GL_POINT_SPRITE_COORD_ORIGIN to GL_LOWER_LEFT did not work for vgpu9. We can use the rasterizer sprite_coord_enable bitfield as-is. We need to index into it using the TGSI semantic index, not the register index. This fixes the Piglit fbo-gl_pointcoord and glsl-fs-pointcoord tests. Testing done: Piglit, Mesa sprite demos Reviewed-by: Charmaine Lee <[email protected]>
* svga: whitespace fixes in svga_tgsi_decl_sm30.cBrian Paul2018-07-271-88/+92
| | | | Trivial.
* svga: s/Elements/ARRAY_SIZE/Brian Paul2016-04-251-4/+4
| | | | | | Standardize on the later macro rather than a mix of both. Reviewed-by: Charmaine Lee <[email protected]>
* svga: emit sampler declarations in the helper function for non vgpu10Charmaine Lee2016-03-291-3/+16
| | | | | | | | | | | | | With commit dc9ecf58c0c5c8a97cd41362e78c2fcd9f6e3b80, we are now getting the sampler target from the sampler view declaration. But since a sampler view declaration can be defined after a sampler declaration, we need to emit the sampler declarations in the pre-helpers function, otherwise, the sampler target might not have defined yet for the sampler declaration. Fixes viewperf maya-03 and various gl trace regressions in hwv11. Reviewed-by: Brian Paul <[email protected]>
* svga: use shader sampler view declarationsBrian Paul2016-03-211-6/+14
| | | | | | | | | | | | | | Previously, we looked at the bound textures (via the pipe_sampler_views) to determine texture dimensions (1D/2D/3D/etc) and datatype (float vs. int). But this could fail in out of memory conditions. If we failed to allocate a texture and didn't create a pipe_sampler_view, we'd default to using 0 (PIPE_BUFFER) as the texture type. This led to device errors because of inconsistent shader code. This change relies on all TGSI shaders having an SVIEW declaration for each SAMP declaration. The previous patch series does that. Reviewed-by: Charmaine Lee <[email protected]>
* svga: update driver for version 10 GPU interfaceBrian Paul2015-09-021-8/+8
| | | | | | | | | | | | | | | | | 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 <[email protected]>
* svga: fix PS output register setup regressionBrian Paul2014-01-231-2/+3
| | | | | | | | | | | | Fixes glean fragProg1 regression caused by commit b9f68d927ea (implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS). This bug only appears when the fragment shader emits fragment.Z before color outputs. The bug was caused by confusion between register indexes and semantic indexes. Also added some comments to better explain register indexing. Reviewed-by: Jose Fonseca <[email protected]>
* svga: implement TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFSBrian Paul2014-01-211-8/+29
| | | | | | | | | | | | Fixes several colorbuffer tests, including piglit "fbo-drawbuffers-none" for "gl_FragColor" and "glDrawPixels" cases. v2: rework patch to only avoid creating extra shader variants when TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS is not specified. Per Jose. Use a write_color0_to_n_cbufs key field to replicate color0 to N color buffers only when N > 0 and WRITES_ALL_CBUFS is set. Reviewed-by: José Fonseca <[email protected]>
* svga: rename color output variablesBrian Paul2014-01-211-3/+3
| | | | | | Just to be bit more readable. Reviewed-by: José Fonseca <[email protected]>
* svga: move some svga/tgsi functionsBrian Paul2013-06-191-0/+20
| | | | | | | | Move some functions from the svga_tgsi_insn.h header into the svga_tgsi_insn.c file since they're only used there. Plus, add comments and fix formatting. Reviewed-by: Jose Fonseca <[email protected]>
* svga: remove the special zero-stride vertex array codeBrian Paul2012-05-251-25/+9
| | | | | This code actually hasn't been needed for some time now. We can just treat a zero-stride vertex array like any other non-zero-stride array.
* svga: handle TGSI_SEMANTIC_CLIPDIST/VERTEX semanticsBrian Paul2012-04-061-0/+7
| | | | | | | We can't support these vertex attributes, but don't die in an assertion. Issue a warning instead. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48142
* svga: Add somewhat sensible fallback and silence warningJakob Bornecrantz2012-01-101-3/+2
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* svga: Silence warningJakob Bornecrantz2012-01-101-7/+0
| | | | | Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by Brian Paul <[email protected]>
* svga: add comments and reformat code in svga_tgsi_decl_sm30.cBrian Paul2011-11-041-47/+85
|
* svga: implement generic variable index remappingBrian Paul2011-11-031-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | The state tracker may generate shaders that use generic vs outputs / fs inputs like: DCL IN[0], GENERIC[0] DCL IN[1], GENERIC[10] DCL IN[2], GENERIC[11] This patch remaps 0, 10, 11 to small integers like 1, 2, 3 so that we stay inside the SVGA3D limit (8). The remapping is done to both the vertex shader outputs and the fragment shader inputs. The same mapping must be used for a vs/fs pair. Note that 'union svga_compile_key' is now 'struct svga_compile_key' because we needed to add the register remapping table. The change in size isn't really significant though (it's not a search key). Also, add assertions when building up SVGA3D src/dst registers to we don't try to store too large of value for the bitfield size. Reviewed-by: José Fonseca <[email protected]>
* svga: check that we don't exceed input/ouput register limitsBrian Paul2011-09-231-0/+12
|
* svga: implement point sprite suppportBrian Paul2011-09-231-1/+30
| | | | | | Emit the SVGA3D_RS_POINTSPRITEENABLE render state. When sprite_coord_mode=PIPE_SPRITE_COORD_LOWER_LEFT emit extra frag shader code to invert the Y coordinate of the incoming texcoord.
* svga: Share one texcoord between depth and fogJakob Bornecrantz2011-09-231-11/+77
|
* svga: Only emit Z depth work if it is actually readJakob Bornecrantz2011-09-231-13/+19
|
* svga: Fix vPos usageJakob Bornecrantz2011-09-231-1/+7
|
* svga: Wip for passing depth in a texcoordJakob Bornecrantz2011-09-231-13/+27
| | | | TODO: Can we pass this as the same texcoord as fog?
* svga: better method for generating white fs color outputsKeith Whitwell2010-02-031-2/+13
|
* Merge branch 'mesa_7_7_branch'Brian Paul2010-01-221-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/draw/draw_context.c src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c src/gallium/auxiliary/pipebuffer/Makefile src/gallium/auxiliary/pipebuffer/SConscript src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/tgsi/tgsi_scan.c src/gallium/drivers/i915/i915_surface.c src/gallium/drivers/i915/i915_texture.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_tex_sample_c.c src/gallium/drivers/llvmpipe/lp_texture.c src/gallium/drivers/softpipe/sp_prim_vbuf.c src/gallium/state_trackers/xorg/xorg_dri2.c src/gallium/winsys/drm/intel/gem/intel_drm_api.c src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.c src/gallium/winsys/drm/radeon/core/radeon_drm.c src/gallium/winsys/drm/vmware/core/vmw_screen_dri.c src/mesa/state_tracker/st_cb_clear.c
| * svga: Remove unnecessary headers.Vinson Lee2010-01-211-1/+0
| |
* | tgsi: rename fields of tgsi_full_declaration to reduce verbosityKeith Whitwell2009-11-241-2/+2
| | | | | | | | DeclarationRange -> Range
* | tgsi: reduce repetition of structure name in its membersKeith Whitwell2009-11-241-19/+19
|/ | | | | Rename Semantic.SemanticName to Semantic.Name. Similar for SemanticIndex, and the members of the tgsi_version struct.
* svga: Add svga driverJakob Bornecrantz2009-11-171-0/+385