Commit Graph

2 Commits

Author SHA1 Message Date
LoopDawg
195f584e09 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.
2017-09-28 14:17:25 -06:00
steve-lunarg
3cbc32f472 HLSL: add error for expected comparison sampler in SampleCmp* ops
This adds an error message if a non-comparison sampler is used with
comparison sampling methods.  There's no functional change for correct shaders.
2017-04-21 09:54:53 -06:00