HLSL: force textures to shadow modes from combined samplers
authorLoopDawg <sk_opengl@khasekhemwy.net>
Wed, 27 Sep 2017 15:12:51 +0000 (09:12 -0600)
committerLoopDawg <sk_opengl@khasekhemwy.net>
Thu, 28 Sep 2017 20:17:25 +0000 (14:17 -0600)
commit195f584e09ec60bba51e5aeb024a3f9ac65cf398
tree12ba15ee17aeff55eb4b420b190eaf83b7b488f1
parentf21c173a05a23b3ef9fea7df5d60e214fd6146a7
HLSL: force textures to shadow modes from combined samplers

Texture shadow mode must match the state of the sampler they are
combined with.  This change does that, both for the AST and the
symbol table.  Note that the texture cannot easily be *created*
the right way, because this may not be known at that time.  Instead,
the texture is subsequently patched.

This cannot work if a single texture is used with both a shadow and
non-shadow sampler, so that case is detected and generates an error.
This is permitted by the HLSL language, however.  See #1073 discussion.

Fixed one test source that was using a texture with both shadow and
non-shadow samplers.
13 files changed:
Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out
Test/baseResults/hlsl.samplecmp.array.dx10.frag.out
Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out
Test/baseResults/hlsl.samplecmp.negative.frag.out
Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out
Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out
Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out
Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out
Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out
Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out
Test/hlsl.samplecmp.negative.frag
hlsl/hlslParseHelper.cpp
hlsl/hlslParseHelper.h