tgsi: add support for texture offsets to the TGSI IR. (v2)

This adds tokens for texture offsets, to store 4 * swizzled vec 3
for use in TXF and other opcodes.

It also contains TGSI exec changes for softpipe to use this code,
along with GLSL->TGSI support for TXF.

v2: add some more comments, add back padding I removed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Dave Airlie
2011-08-26 10:59:18 +01:00
parent 49e24d3b8c
commit 2083a276eb
13 changed files with 219 additions and 20 deletions

View File

@@ -1026,9 +1026,16 @@ XXX so let's discuss it, yeah?
dst.w = |src0.w - src1.w| + src2.w
.. opcode:: TXF - Texel Fetch
TBD
.. opcode:: TXF - Texel Fetch (as per NV_gpu_shader4), extract a single texel
from a specified texture image. The source sampler may
not be a CUBE or SHADOW.
src 0 is a four-component signed integer vector used to
identify the single texel accessed. 3 components + level.
src 1 is a 3 component constant signed integer vector,
with each component only have a range of
-8..+8 (hw only seems to deal with this range, interface
allows for up to unsigned int).
TXF(uint_vec coord, int_vec offset).
.. opcode:: TXQ - Texture Size Query (as per NV_gpu_program4)