HLSL: Additional channel value for textureGatherXXX().
When mapping HLSL gather intrinsics to GLSL textureGatherXXX() built-in function, the channel selection value is only valid for non-shadow samplers.
This commit is contained in:
parent
b16f7e6819
commit
d41a696c30
2 changed files with 3 additions and 25 deletions
|
|
@ -3082,7 +3082,9 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
|
|||
if (argOffset != nullptr)
|
||||
txgather->getSequence().push_back(argOffset);
|
||||
|
||||
txgather->getSequence().push_back(argChannel);
|
||||
// Add channel value if the sampler is not shadow
|
||||
if (! argSamp->getType().getSampler().isShadow())
|
||||
txgather->getSequence().push_back(argChannel);
|
||||
|
||||
txgather->setType(node->getType());
|
||||
txgather->setLoc(loc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue