From ffb53b4f0384fc811372644ce35471c0711eef9e Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 21 Dec 2012 21:33:37 +1300 Subject: 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 [V2] Reviewed-by: Eric Anholt [V2] Reviewed-by: Paul Berry Reviewed-by: Ian Romanick --- .../builtins/profiles/ARB_texture_multisample.glsl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/glsl/builtins/profiles/ARB_texture_multisample.glsl (limited to 'src/glsl/builtins/profiles') diff --git a/src/glsl/builtins/profiles/ARB_texture_multisample.glsl b/src/glsl/builtins/profiles/ARB_texture_multisample.glsl new file mode 100644 index 00000000000..4fa67e95e30 --- /dev/null +++ b/src/glsl/builtins/profiles/ARB_texture_multisample.glsl @@ -0,0 +1,18 @@ +#version 130 +#extension GL_ARB_texture_multisample : enable + +ivec2 textureSize( sampler2DMS sampler); +ivec2 textureSize(isampler2DMS sampler); +ivec2 textureSize(usampler2DMS sampler); + +ivec3 textureSize( sampler2DMSArray sampler); +ivec3 textureSize(isampler2DMSArray sampler); +ivec3 textureSize(usampler2DMSArray sampler); + + vec4 texelFetch( sampler2DMS sampler, ivec2 P, int sample); +ivec4 texelFetch(isampler2DMS sampler, ivec2 P, int sample); +uvec4 texelFetch(usampler2DMS sampler, ivec2 P, int sample); + + vec4 texelFetch( sampler2DMSArray sampler, ivec3 P, int sample); +ivec4 texelFetch(isampler2DMSArray sampler, ivec3 P, int sample); +uvec4 texelFetch(usampler2DMSArray sampler, ivec3 P, int sample); -- cgit v1.2.3