SPV: Implement OpImage functionality (emit before query).

This commit is contained in:
John Kessenich
2015-12-08 19:32:47 -07:00
parent 45457bcddb
commit 33661450c7
7 changed files with 594 additions and 559 deletions

View File

@@ -1855,6 +1855,9 @@ 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))
params.sampler = builder.createUnaryOp(spv::OpImage, builder.getImageType(params.sampler), params.sampler);
switch (node->getOp()) {
case glslang::EOpImageQuerySize:
case glslang::EOpTextureQuerySize: