aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_tgsi_emit.h
Commit message (Collapse)AuthorAgeFilesLines
* svga: update driver for version 10 GPU interfaceBrian Paul2015-09-021-0/+3
| | | | | | | | | | | | | | | | | 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]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-211-10/+10
| | | | | | | | | | | | | | | | 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 <[email protected]> Acked-by: Marek Olšák <[email protected]>
* svga: implement support for signed byte vertex attributesBrian Paul2014-04-171-1/+1
| | | | | | | | | | | | | | There's no SVGA3D_DECLTYPE that directly corresponds to PIPE_FORMAT_R8G8B8_SNORM. Previously, we used the swtnl fallback path to handle this but that's slow and causes invariance issues. Now we fetch the attribute as SVGA3D_DECLTYPE_UBYTE4N and insert some extra VS instructions to remap the attributes from the range [0,1] to the range[-1,1]. Fixes Sauerbraten sw fallback. Fixes piglit normal3b3s-invariance test. Reviewed-by: Charmaine Lee <[email protected]>
* svga: use new inst_token_setp() helper functionBrian Paul2014-04-171-0/+17
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: use new inst_token_predicated() helper functionBrian Paul2014-04-171-0/+17
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* svga: fix PS output register setup regressionBrian Paul2014-01-231-1/+2
| | | | | | | | | | | | 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: simplify common immediate value constructionBrian Paul2014-01-231-2/+2
| | | | | | | Use some new helper functions to make the code much more readable. And fix wrong value for XPD's w result. Reviewed-by: José Fonseca <[email protected]>
* svga: rename color output variablesBrian Paul2014-01-211-2/+3
| | | | | | Just to be bit more readable. Reviewed-by: José Fonseca <[email protected]>
* svga: whitespace, comment, formatting fixes in svga_tgsi_emit.hBrian Paul2013-06-191-42/+56
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* svga: move some svga/tgsi functionsBrian Paul2013-06-191-125/+0
| | | | | | | | 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: move temp register index assertionsBrian Paul2012-02-231-2/+6
| | | | | | | | | | | | | | The assertion recently added in dst_register() was invalid because that function is also (suprisingly) used to declare constant registers. Move the assertion to the callers where we're really creating temp registers and add some code to prevent emitting invalid temp register indexes for release builds. Also, update the comment for get_temp(). It didn't return -1 if it ran out of registers and none of the callers checked for that. Reviewed-by: Jose Fonseca <[email protected]>
* svga: check that we don't exceed temp register limitBrian Paul2012-02-231-0/+2
| | | | | | | And assert on the register index in dst_register(). The dest can only be an output or temp reg and there's more of the later. Reviewed-by: Jose Fonseca <[email protected]>
* svga: Tighten the register file assertions.José Fonseca2011-11-041-4/+2
| | | | Untested. But should fix fdo 42576.
* svga: implement generic variable index remappingBrian Paul2011-11-031-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | 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: remove old, unused sincos code for SM2.0Brian Paul2011-10-111-3/+0
|
* svga: remove support for shader model 2.0Brian Paul2011-10-111-5/+0
| | | | | | We've been requiring SM 3.0 all along so this just removes unused code. Reviewed-by: Jose Fonseca <[email protected]>
* svga: implement point sprite suppportBrian Paul2011-09-231-0/+5
| | | | | | 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-0/+7
|
* svga: Wip for passing depth in a texcoordJakob Bornecrantz2011-09-231-0/+7
| | | | TODO: Can we pass this as the same texcoord as fog?
* svga: Integer constant register file has a separate namespace.Michal Krol2010-09-201-1/+2
| | | | | | Count int and float constants independently. Since there are only few i# constants available and hundreds of c# constants, it would be too easy to end up with an i# declaration out of its range.
* gallium: make all checks for PIPE_TEXTURE_2D check for PIPE_TEXTURE_RECT tooLuca Barbieri2010-08-201-0/+1
| | | | | | | Searched for them with: git grep -E '[!=]=.*PIPE_TEXTURE_2D|PIPE_TEXTURE_2D.*[!=]=|case.*PIPE_TEXTURE_2D' Behavior hasn't been changed.
* svga: Don't emit zero writemasks.José Fonseca2010-02-221-0/+2
| | | | | | | | This fixes a regression with Lightsmark, where more compact TGSI from Mesa was causing a zero mask MOV to be emitted for shadow map compare, causing problems in some backends. Add a few more assertions to catch cases like this.
* svga: fix TXD and TXL opcode translationKeith Whitwell2010-02-031-0/+17
|
* svga: texture from lod zero inside dynamic branchingKeith Whitwell2010-02-031-0/+2
| | | | | | Texture derivatives are potentially undefined inside dynamic branches, so hardwire lod zero in this case. Treating all if/endif and loop constructs as dynamic branches.
* svga: Add svga driverJakob Bornecrantz2009-11-171-0/+345