summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2011-12-06 11:11:03 -0800
committerKenneth Graunke <[email protected]>2011-12-07 15:11:29 -0800
commit4558987818e1ff36e86592e9c5c0b5e181be9ec1 (patch)
treebdbd91ec2869b667c4766c48608ad2507171e74e
parent4273943a07bb577f91972b64232d394c1197c564 (diff)
glsl: Fix samplerCubeShadow support in shader compiler
This patch fixes the samplerCubeShadow support in GLSL shader compiler. shader compiler was picking the 'r' texture coordinate for shadow comparison when the expected behaviour is to use 'q' texture coordinate in case of cube shadow maps. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
-rwxr-xr-xsrc/glsl/builtins/tools/texture_builtins.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools/texture_builtins.py
index 27cc027cd40..07d0a1b8d76 100755
--- a/src/glsl/builtins/tools/texture_builtins.py
+++ b/src/glsl/builtins/tools/texture_builtins.py
@@ -105,7 +105,7 @@ def generate_sigs(g, tex_inst, sampler_type, variant = 0, unused_fields = 0):
print "1",
# Shadow comparitor
- if sampler_type == "2DArrayShadow": # a special case:
+ if sampler_type == "2DArrayShadow" or sampler_type == "CubeShadow": # a special case:
print "(swiz w (var_ref P))", # ...array layer is z; shadow is w
elif sampler_type.endswith("Shadow"):
print "(swiz z (var_ref P))",