SPV: Fix an issue related with using CubeArrayShadow for texture()

This commit is contained in:
Rex Xu
2015-11-11 15:35:47 +08:00
committed by unknown
parent 2c03478442
commit 71519fe70b
5 changed files with 298 additions and 311 deletions

View File

@@ -1901,9 +1901,11 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
// Check for texture functions other than queries
bool cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow;
// check for bias argument
bool bias = false;
if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch) {
if (! cracked.lod && ! cracked.gather && ! cracked.grad && ! cracked.fetch && ! cubeCompare) {
int nonBiasArgCount = 2;
if (cracked.offset)
++nonBiasArgCount;