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 <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
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))",