diff options
author | Chris Forbes <[email protected]> | 2012-12-21 21:33:37 +1300 |
---|---|---|
committer | Chris Forbes <[email protected]> | 2013-03-02 11:33:54 +1300 |
commit | ffb53b4f0384fc811372644ce35471c0711eef9e (patch) | |
tree | a9600d8e15d97f25a90cec15db64dce44e3f3e86 /src/glsl/ir.h | |
parent | 16af0aca09029e647e4b7ae53ed94b089531c080 (diff) |
glsl: add support for ARB_texture_multisample
V2: - emit `sample` parameter properly for multisample texelFetch()
- fix spurious whitespace change
- introduce a new opcode ir_txf_ms rather than overloading the
existing ir_txf further. This makes doing the right thing in
the driver somewhat simpler.
V3: - fix weird whitespace
V4: - don't forget to include the new opcode in tex_opcode_strs[]
(thanks Kenneth for spotting this)
Signed-off-by: Chris Forbes <[email protected]>
[V2] Reviewed-by: Eric Anholt <[email protected]>
[V2] Reviewed-by: Paul Berry <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index d63dac100c7..393b4867368 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -1424,6 +1424,7 @@ enum ir_texture_opcode { ir_txl, /**< Texture look-up with explicit LOD */ ir_txd, /**< Texture look-up with partial derivatvies */ ir_txf, /**< Texel fetch with explicit LOD */ + ir_txf_ms, /**< Multisample texture fetch */ ir_txs /**< Texture size */ }; @@ -1445,6 +1446,8 @@ enum ir_texture_opcode { * (txl <type> <sampler> <coordinate> 0 1 ( ) <lod>) * (txd <type> <sampler> <coordinate> 0 1 ( ) (dPdx dPdy)) * (txf <type> <sampler> <coordinate> 0 <lod>) + * (txf_ms + * <type> <sampler> <coordinate> <sample_index>) * (txs <type> <sampler> <lod>) */ class ir_texture : public ir_rvalue { @@ -1511,6 +1514,7 @@ public: union { ir_rvalue *lod; /**< Floating point LOD */ ir_rvalue *bias; /**< Floating point LOD bias */ + ir_rvalue *sample_index; /**< MSAA sample index */ struct { ir_rvalue *dPdx; /**< Partial derivative of coordinate wrt X */ ir_rvalue *dPdy; /**< Partial derivative of coordinate wrt Y */ |