SPIRV: Add support for texelFetch
There's nothing really special about texelFetch other than the opcode and
some restrictions so adding it is pretty trivial.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 489fe8f..5fa1a9b 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1666,8 +1666,6 @@
// This is no longer a query....
- if (cracked.fetch)
- spv::MissingFunctionality("texel fetch");
if (cracked.gather)
spv::MissingFunctionality("texture gather");
@@ -1723,7 +1721,7 @@
++extraArgs;
}
- return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), cracked.proj, params);
+ return builder.createTextureCall(precision, convertGlslangToSpvType(node->getType()), cracked.fetch, cracked.proj, params);
}
spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAggregate* node)