History log of /external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dafa77201f116dc53b18a274fb41eef5bb2bd0e3 26-Jul-2012 Brian Paul <brianp@vmware.com> svga: fix invalid memory reference in needs_to_create_zero()

The emit->key.fkey info is only valid if we're generating a fragment shader.
We should not look at it if we're generating a vertex shader.

When generating a vertex shader, the value of emit->key.fkey.num_textures was
garbage and the loop over num_textures would read invalid data. At best
this would cause us to emit an unused constant. At worse, we could segfault.
Just by dumb luck, fkey.num_textures was usually a smallish integer.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
bbe92dc6081e5b7106ae8c8fe716d0f5f90f54ce 02-Jul-2012 Brian Paul <brianp@vmware.com> svga: whitespace fixes
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
1ab37a2284aa26d797d6ffb955a1e0bfb7aa67d3 03-Jul-2012 Brian Paul <brianp@vmware.com> svga: implement TGSI_OPCODE_ROUND

ROUND and TRUNC are implemented with one function to reduce code duplication.
Note: ROUND isn't actually used yet, but probably will be soon.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
d594f72e1615cda47b838046df4590316da3d1a9 30-Jun-2012 Brian Paul <brianp@vmware.com> svga: fix CMP translation for vertex shaders

Converting CMP to SLT+LRP didn't work when src2 or src3 was Inf/NaN.
That's the case for GLSL sqrt(0). sqrt(0) actually happens in many
piglit auto-generated tests that use the distance() function.

v2: remove debug/devel code, per Jose

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
30f8575fde673f2279aee1fbe89e7df07cb81081 30-Jun-2012 Brian Paul <brianp@vmware.com> svga: properly implement TRUNC instruction

Was previously implemented with FLOOR.
Fixes quite a few piglit tests of float->int conversion, integer
division, etc.

v2: clean up left over debug/devel code, per Jose

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
0bd3a75de9002e73214cde883691da558db7bc70 03-Jul-2012 Brian Paul <brianp@vmware.com> svga: fix register collision issue in emit_conditional()

If the 'dst' register is the same as the 'pass' register we'll generate
invalid code. Use a temporary register in that case.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
8009fca501a021cbaf9b25e01ff3a7793cc2c6cb 31-May-2012 Brian Paul <brianp@vmware.com> svga: fix saturated TEX instructions

TEX instructions can't do saturation. Do the TEX into a temp reg w/out
saturation, then do a MOV_SAT.

Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
a1c5513c175a2c13594dde7110822b205cabfc14 09-May-2012 Brian Paul <brianp@vmware.com> svga: implement CEIL opcode translation

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
4516fcc57f8f45fc0e2e4d8681fd5d74e4f31d7d 21-Nov-2011 Brian Paul <brianp@vmware.com> svga: move temp register index assertions

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 <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
b875838ec302c4e830e13ebd5fa834fd22830279 11-Oct-2011 Brian Paul <brianp@vmware.com> svga: remove old, unused sincos code for SM2.0
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
94b219b9e2c20711078b1628cf1fa599a29bf67f 11-Oct-2011 Brian Paul <brianp@vmware.com> svga: remove support for shader model 2.0

We've been requiring SM 3.0 all along so this just removes unused code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
2b2a69e088416a18e3bb119ea1edb594b06e06fe 27-Jul-2011 Brian Paul <brianp@vmware.com> svga: test register W component in emit_kil()

Only the XYZ components are checked to be negative by SVGA3DOP_TEXKILL.
GL_ARB_fp requires all four components be checked. Emit a second texkill
for W if needed.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
7d09df0cbc7e4524919a025cdd506b29e2d8b4f1 26-Jul-2011 Brian Paul <brianp@vmware.com> svga: fix depth/shadow compare for non-projected texcoords

We only need to do the divide by Q step for TXP instructions.
This fixes the incorrectly rendered soft shadow test in Lightsmark.
Along with the previous texture swizzle commit, this also fixes all
the piglit glsl-fs-shadow2d-XX.shader_test failures.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
9bd15aef865352b9234fedae76617fc51c71e6d5 26-Jul-2011 Brian Paul <brianp@vmware.com> svga: implement texture swizzling

This exposes the GL_EXT_texture_swizzle extension and allows the various
depth texture modes to be implemented properly. This, plus a follow-on
texture/shadow change fixes quite a few piglit GLSL shadow sampler test
failures.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
49a6f5e68eeb6b23bb040cfc1f93befc2f1eb35a 19-Jul-2011 Brian Paul <brianp@vmware.com> svga: check that we don't exceed input/ouput register limits
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
2f40e4aac7ab79deb06ff6ab9ae03a896d7a9169 13-Jul-2011 Brian Paul <brianp@vmware.com> svga: implement point sprite suppport

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.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
8bf3fb4eca5594f8348de2f8fb67bc94127f8d5a 07-Apr-2011 Jakob Bornecrantz <jakob@vmware.com> svga: Share one texcoord between depth and fog
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
4f17830b3dda5a1727a3c87897e73b56b37613a6 07-Apr-2011 Jakob Bornecrantz <jakob@vmware.com> svga: Only emit Z depth work if it is actually read
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
166e9421c814d859f849b2aa476380725e74b408 25-Mar-2011 Jakob Bornecrantz <jakob@vmware.com> svga: Wip for passing depth in a texcoord

TODO: Can we pass this as the same texcoord as fog?
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
f9b48678463e926571ab5e547bb5ced5f4a6896a 18-Feb-2011 José Fonseca <jfonseca@vmware.com> svga: Cannot use negate or abs on source to dsx/dsy instructions.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
15c3e21097ba6d410daaff525eb4eeeb5e1e481a 18-Feb-2011 José Fonseca <jfonseca@vmware.com> svga: Ensure LRP's restrictions are observed in all uses.

The dst reg must be a temporary, and not be the same as src0 or src2.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
965ab5fed3c734e6205070e6cf40544a44b5dbf6 18-Feb-2011 José Fonseca <jfonseca@vmware.com> svga: Preserve src swizzles in submit_op2/3/4.

Several opcodes require scalar swizzle, and this requirement was
being was not being observed when creating temporaries for other reasons.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
0adeaf00e6c4592e78cca36c3b365110b83c965d 17-Feb-2011 José Fonseca <jfonseca@vmware.com> svga: Don't use more than one constant per IFC instruction.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
5a1ce49c82e245f1f86510d9e1ff7db46a32012b 28-Jan-2011 Michel Dänzer <daenzer@vmware.com> svga: Fix translation of TGSI SSG opcode.

SVGA3D only supports SGN for vertex shaders, and this requires two additional
temporary registers for intermediate results.

For fragment shaders, lower to two CMPs and one ADD.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
279492386ffe741c2f5b91919b37068562b6a282 16-Sep-2010 Michal Krol <michal@vmware.com> svga: Integer constant register file has a separate namespace.

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.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
0742e0b3767072fe664ca9f39fc31d86d8d314ed 16-Sep-2010 Michal Krol <michal@vmware.com> svga: Fix relative addressing translation for pixel shaders.

Pixel shaders do not have address registers a#, only one
loop register aL. Our only hope is to assume the address
register is in fact a loop counter and replace it with aL.

Do not translate ARL instruction for pixel shaders -- MOVA
instruction is only valid for vertex saders.

Make it more explicit relative addressing of inputs is only valid
for pixel shaders and constants for vertex shaders.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
1bb97610e969918015f46efe6fe32c6c71a8293a 27-Aug-2010 Michal Krol <michal@vmware.com> svga: Fix CMP translation for vertex shader targets.

SVGA3DOP_CMP is not supported for vertex shaders;
use SLT + LRP instead.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
0bd1cbcd0d28dbadfb0c3e1f8b048a18b56bc72c 14-May-2010 Keith Whitwell <keithw@vmware.com> gallium: convert rasterizer state to use gl-style front/back concepts

Use front/back instead of cw/ccw throughout.
Also, use offset_point/line/fill instead of offset_cw/ccw.

Brings gallium representation of this state into line with its main
user, and also what turns out to be the most common hardware
representation.

This fixes a long-standing bias in the interface towards the
architecture of the software rasterizer.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
e5395f3359f7968a49e0dae925719a6d38a7edb5 27-Apr-2010 José Fonseca <jfonseca@vmware.com> svga: Drop BGNFOR, ENDFOR, REP, and ENDREP opcodes.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
066fd70639a1681bfde0a8e1fb7fdca7897158e5 22-Feb-2010 José Fonseca <jfonseca@vmware.com> svga: Emit a scalar rcp in shadow maps.

Small improvement in Lightsmark 2008.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
7384cdf651dc69098f4d988dd3b217879ec63336 22-Feb-2010 José Fonseca <jfonseca@vmware.com> svga: Don't emit zero writemasks.

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.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
3f7af8440568d083dd9bb1370b785b60f5a141f0 18-Feb-2010 Vinson Lee <vlee@vmware.com> svga: Silence uninitialized variable warnings.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
7e64701263f8158fb4138610ba63df41eefe6594 14-Feb-2010 Vinson Lee <vlee@vmware.com> svga: Silence uninitialized variable warning.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
84d41f3c7f636d182c659ab85a4449df50c43bc8 02-Feb-2010 Keith Whitwell <keithw@vmware.com> svga: fix TXD and TXL opcode translation
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
0748fc4f038a0878a981024ac4364f82a23e1ca1 02-Feb-2010 Keith Whitwell <keithw@vmware.com> svga: deriv insns not valid in dynamic flow control either
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
a9cdae2ae07ee4a465f29eb0bff1e1e494345c69 02-Feb-2010 Keith Whitwell <keithw@vmware.com> svga: texture from lod zero inside dynamic branching

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.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
fc3efccdc67390847fc544f97dbdb1826442ae9a 26-Jan-2010 Keith Whitwell <keithw@vmware.com> svga: better method for generating white fs color outputs
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
2c046034dc5c95dd2fe84d0b4fd44f25235480b9 23-Dec-2009 Michal Krol <michal@vmware.com> Remove TGSI_OPCODE_SHR, map existing usage to TGSI_OPCODE_ISHR.

This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
91a4e6d53f83c45c1da9240b6325011d96b61386 24-Nov-2009 Keith Whitwell <keithw@vmware.com> tgsi: rename fields of tgsi_full_src_register to reduce verbosity

SrcRegister -> Register
SrcRegisterInd -> Indirect
SrcRegisterDim -> Dimension
SrcRegisterDimInd -> DimIndirect
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
5b0824dfe5eaf59fa87134e7482b3d147b262901 24-Nov-2009 Keith Whitwell <keithw@vmware.com> tgsi: rename fields of tgsi_full_dst_register to reduce verbosity

DstRegister -> Register
DstRegisterInd -> Indirect
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
7d6c8f980d1e23ad6f557d650e89c715861a3b0c 24-Nov-2009 Keith Whitwell <keithw@vmware.com> tgsi: rename fields of tgsi_full_instruction to avoid excessive verbosity

InstructionPredicate -> Predicate
InstructionLabel -> Label
InstructionTexture -> Texture
FullSrcRegisters -> Src
FullDstRegisters -> Dst
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
ba1ca28cc62fed71c77902b95ae4ed36c6bf25f8 24-Nov-2009 Keith Whitwell <keithw@vmware.com> gallium: simplify tgsi tokens further

Drop anonymous 'Extended' fields, have every optional token named
explicitly in its parent. Eg. there is now an Instruction.Label flag,
etc.

Drop destination modifiers and other functionality which cannot be
generated by tgsi_ureg.c, which is now the primary way of creating
shaders.

Pull source modifiers into the source register token, drop the second
negate flag. The source register token is now full - if we need to
expand it, probably best to move all of the modifiers to a new token
and have a single flag for it.
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c
3192633d4abe262d413e41feb871fe8deed409d8 16-Nov-2009 Jakob Bornecrantz <jakob@vmware.com> svga: Add svga driver
/external/mesa3d/src/gallium/drivers/svga/svga_tgsi_insn.c