@@ -2745,9 +2745,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||
|
||||
// Check for queries
|
||||
if (cracked.query) {
|
||||
// a sampled image needs to have the image extracted first
|
||||
if (builder.isSampledImage(params.sampler))
|
||||
// OpImageQueryLod works on a sampled image, for other queries the image has to be extracted first
|
||||
if (node->getOp() != glslang::EOpTextureQueryLod && builder.isSampledImage(params.sampler))
|
||||
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
|
||||
|
||||
switch (node->getOp()) {
|
||||
case glslang::EOpImageQuerySize:
|
||||
case glslang::EOpTextureQuerySize:
|
||||
|
||||
Reference in New Issue
Block a user