Fix #1924: Promote SPV_EXT_physical_storage_buffer to KHR when required.

If the semantics that require the KHR form over the EXT form are seen
(OpBitcast between a vector and a pointer) promote the requested extension
from the EXT to the KHR.
This commit is contained in:
John Kessenich
2019-10-10 20:54:21 -06:00
parent 1ff0c181bb
commit ee8e9c1522
3 changed files with 13 additions and 2 deletions

View File

@@ -6275,6 +6275,9 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora
break;
case glslang::EOpConvPtrToUvec2:
case glslang::EOpConvUvec2ToPtr:
if (builder.isVector(operand))
builder.promoteIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer,
spv::E_SPV_KHR_physical_storage_buffer, spv::Spv_1_5);
convOp = spv::OpBitcast;
break;
#endif