diff options
author | Dave Airlie <[email protected]> | 2011-08-26 10:59:18 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2011-09-02 10:47:45 +0100 |
commit | 2083a276eb270b748d1c2668eb9faa5aadc8e700 (patch) | |
tree | fa03d01ecdba21bab656cf5e9f274ee2b0db7f83 /src/gallium/auxiliary/tgsi/tgsi_ureg.h | |
parent | 49e24d3b8c0129e11fcc94b6e74dc2589d64c882 (diff) |
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_ureg.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_ureg.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_ureg.h b/src/gallium/auxiliary/tgsi/tgsi_ureg.h index e3a4915d03c..8f5f22e1750 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_ureg.h +++ b/src/gallium/auxiliary/tgsi/tgsi_ureg.h @@ -451,6 +451,8 @@ ureg_tex_insn(struct ureg_program *ureg, const struct ureg_dst *dst, unsigned nr_dst, unsigned target, + const struct tgsi_texture_offset *texoffsets, + unsigned nr_offset, const struct ureg_src *src, unsigned nr_src ); @@ -493,7 +495,11 @@ ureg_emit_label(struct ureg_program *ureg, void ureg_emit_texture(struct ureg_program *ureg, unsigned insn_token, - unsigned target ); + unsigned target, unsigned num_offsets); + +void +ureg_emit_texture_offset(struct ureg_program *ureg, + const struct tgsi_texture_offset *offset); void ureg_emit_dst( struct ureg_program *ureg, @@ -677,7 +683,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ dst.PredSwizzleW, \ 1, \ 2); \ - ureg_emit_texture( ureg, insn.extended_token, target ); \ + ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ ureg_emit_dst( ureg, dst ); \ ureg_emit_src( ureg, src0 ); \ ureg_emit_src( ureg, src1 ); \ @@ -732,7 +738,7 @@ static INLINE void ureg_##op( struct ureg_program *ureg, \ dst.PredSwizzleW, \ 1, \ 4); \ - ureg_emit_texture( ureg, insn.extended_token, target ); \ + ureg_emit_texture( ureg, insn.extended_token, target, 0 ); \ ureg_emit_dst( ureg, dst ); \ ureg_emit_src( ureg, src0 ); \ ureg_emit_src( ureg, src1 ); \ |