diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2011-02-25 14:29:36 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2011-03-14 13:03:50 -0700 |
commit | 233b88eab9d8095523ebae3c4be1dbf2e2bd856a (patch) | |
tree | 7e39ea474572d67c90e82b16ae6cd029224e28d4 /src/glsl/ir.h | |
parent | cb3317b85a9b8916317cb733ef4e6f13eaf0d890 (diff) |
glsl: Explicitly specify a type when reading/printing ir_texture.
This is necessary for GLSL 1.30+ shadow sampling functions, which return
a single float rather than splatting the value to a vec4 based on
GL_DEPTH_TEXTURE_MODE.
Diffstat (limited to 'src/glsl/ir.h')
-rw-r--r-- | src/glsl/ir.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/glsl/ir.h b/src/glsl/ir.h index f2f902c0a7..39d4ebc710 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -1191,16 +1191,16 @@ enum ir_texture_opcode { * selected from \c ir_texture_opcodes. In the printed IR, these will * appear as: * - * Texel offset (0 or an expression) - * | Projection divisor - * | | Shadow comparitor - * | | | - * v v v - * (tex <sampler> <coordinate> 0 1 ( )) - * (txb <sampler> <coordinate> 0 1 ( ) <bias>) - * (txl <sampler> <coordinate> 0 1 ( ) <lod>) - * (txd <sampler> <coordinate> 0 1 ( ) (dPdx dPdy)) - * (txf <sampler> <coordinate> 0 <lod>) + * Texel offset (0 or an expression) + * | Projection divisor + * | | Shadow comparitor + * | | | + * v v v + * (tex <type> <sampler> <coordinate> 0 1 ( )) + * (txb <type> <sampler> <coordinate> 0 1 ( ) <bias>) + * (txl <type> <sampler> <coordinate> 0 1 ( ) <lod>) + * (txd <type> <sampler> <coordinate> 0 1 ( ) (dPdx dPdy)) + * (txf <type> <sampler> <coordinate> 0 <lod>) */ class ir_texture : public ir_rvalue { public: @@ -1226,8 +1226,8 @@ public: */ const char *opcode_string(); - /** Set the sampler and infer the type. */ - void set_sampler(ir_dereference *sampler); + /** Set the sampler and type. */ + void set_sampler(ir_dereference *sampler, const glsl_type *type); /** * Do a reverse-lookup to translate a string into an ir_texture_opcode. |