Merge pull request #1899 from KhronosGroup/SPIR-V_1.5
Branch to support SPIR-V 1.5 changes
This commit is contained in:
		
						commit
						be467db7bd
					
				@ -217,11 +217,6 @@ protected:
 | 
				
			|||||||
    bool isTrivial(const glslang::TIntermTyped* node);
 | 
					    bool isTrivial(const glslang::TIntermTyped* node);
 | 
				
			||||||
    spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
 | 
					    spv::Id createShortCircuit(glslang::TOperator, glslang::TIntermTyped& left, glslang::TIntermTyped& right);
 | 
				
			||||||
    spv::Id getExtBuiltins(const char* name);
 | 
					    spv::Id getExtBuiltins(const char* name);
 | 
				
			||||||
    void addPre13Extension(const char* ext)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        if (builder.getSpvVersion() < glslang::EShTargetSpv_1_3)
 | 
					 | 
				
			||||||
            builder.addExtension(ext);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
 | 
					    std::pair<spv::Id, spv::Id> getForcedType(spv::BuiltIn, const glslang::TType&);
 | 
				
			||||||
    spv::Id translateForcedType(spv::Id object);
 | 
					    spv::Id translateForcedType(spv::Id object);
 | 
				
			||||||
    spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
 | 
					    spv::Id createCompositeConstruct(spv::Id typeId, std::vector<spv::Id> constituents);
 | 
				
			||||||
@ -517,7 +512,7 @@ spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glsl
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
#ifndef GLSLANG_WEB
 | 
					#ifndef GLSLANG_WEB
 | 
				
			||||||
    if (qualifier.isNonUniform()) {
 | 
					    if (qualifier.isNonUniform()) {
 | 
				
			||||||
        builder.addExtension("SPV_EXT_descriptor_indexing");
 | 
					        builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityShaderNonUniformEXT);
 | 
					        builder.addCapability(spv::CapabilityShaderNonUniformEXT);
 | 
				
			||||||
        return spv::DecorationNonUniformEXT;
 | 
					        return spv::DecorationNonUniformEXT;
 | 
				
			||||||
    } else
 | 
					    } else
 | 
				
			||||||
@ -701,7 +696,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
 | 
				
			|||||||
            glslangIntermediate->getStage() == EShLangTessControl ||
 | 
					            glslangIntermediate->getStage() == EShLangTessControl ||
 | 
				
			||||||
            glslangIntermediate->getStage() == EShLangTessEvaluation) {
 | 
					            glslangIntermediate->getStage() == EShLangTessEvaluation) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
 | 
					            builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return spv::BuiltInViewportIndex;
 | 
					        return spv::BuiltInViewportIndex;
 | 
				
			||||||
@ -726,23 +721,23 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
 | 
				
			|||||||
            glslangIntermediate->getStage() == EShLangTessControl ||
 | 
					            glslangIntermediate->getStage() == EShLangTessControl ||
 | 
				
			||||||
            glslangIntermediate->getStage() == EShLangTessEvaluation) {
 | 
					            glslangIntermediate->getStage() == EShLangTessEvaluation) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            builder.addExtension(spv::E_SPV_EXT_shader_viewport_index_layer);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_EXT_shader_viewport_index_layer, spv::Spv_1_5);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
 | 
					            builder.addCapability(spv::CapabilityShaderViewportIndexLayerEXT);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return spv::BuiltInLayer;
 | 
					        return spv::BuiltInLayer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case glslang::EbvBaseVertex:
 | 
					    case glslang::EbvBaseVertex:
 | 
				
			||||||
        addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityDrawParameters);
 | 
					        builder.addCapability(spv::CapabilityDrawParameters);
 | 
				
			||||||
        return spv::BuiltInBaseVertex;
 | 
					        return spv::BuiltInBaseVertex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case glslang::EbvBaseInstance:
 | 
					    case glslang::EbvBaseInstance:
 | 
				
			||||||
        addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityDrawParameters);
 | 
					        builder.addCapability(spv::CapabilityDrawParameters);
 | 
				
			||||||
        return spv::BuiltInBaseInstance;
 | 
					        return spv::BuiltInBaseInstance;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case glslang::EbvDrawId:
 | 
					    case glslang::EbvDrawId:
 | 
				
			||||||
        addPre13Extension(spv::E_SPV_KHR_shader_draw_parameters);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_shader_draw_parameters, spv::Spv_1_3);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityDrawParameters);
 | 
					        builder.addCapability(spv::CapabilityDrawParameters);
 | 
				
			||||||
        return spv::BuiltInDrawIndex;
 | 
					        return spv::BuiltInDrawIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -874,12 +869,12 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI
 | 
				
			|||||||
        return spv::BuiltInBaryCoordPullModelAMD;
 | 
					        return spv::BuiltInBaryCoordPullModelAMD;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case glslang::EbvDeviceIndex:
 | 
					    case glslang::EbvDeviceIndex:
 | 
				
			||||||
        addPre13Extension(spv::E_SPV_KHR_device_group);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_device_group, spv::Spv_1_3);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityDeviceGroup);
 | 
					        builder.addCapability(spv::CapabilityDeviceGroup);
 | 
				
			||||||
        return spv::BuiltInDeviceIndex;
 | 
					        return spv::BuiltInDeviceIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case glslang::EbvViewIndex:
 | 
					    case glslang::EbvViewIndex:
 | 
				
			||||||
        addPre13Extension(spv::E_SPV_KHR_multiview);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_multiview, spv::Spv_1_3);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityMultiView);
 | 
					        builder.addCapability(spv::CapabilityMultiView);
 | 
				
			||||||
        return spv::BuiltInViewIndex;
 | 
					        return spv::BuiltInViewIndex;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1192,7 +1187,7 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
 | 
					    if (glslangIntermediate->usingStorageBuffer() && type.getQualifier().storage == glslang::EvqBuffer) {
 | 
				
			||||||
        addPre13Extension(spv::E_SPV_KHR_storage_buffer_storage_class);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_storage_buffer_storage_class, spv::Spv_1_3);
 | 
				
			||||||
        return spv::StorageClassStorageBuffer;
 | 
					        return spv::StorageClassStorageBuffer;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -1253,13 +1248,13 @@ void TGlslangToSpvTraverser::addIndirectionIndexCapabilities(const glslang::TTyp
 | 
				
			|||||||
        // assume a dynamically uniform index
 | 
					        // assume a dynamically uniform index
 | 
				
			||||||
        if (baseType.getBasicType() == glslang::EbtSampler) {
 | 
					        if (baseType.getBasicType() == glslang::EbtSampler) {
 | 
				
			||||||
            if (baseType.getQualifier().hasAttachment()) {
 | 
					            if (baseType.getQualifier().hasAttachment()) {
 | 
				
			||||||
                builder.addExtension("SPV_EXT_descriptor_indexing");
 | 
					                builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
 | 
				
			||||||
                builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT);
 | 
					                builder.addCapability(spv::CapabilityInputAttachmentArrayDynamicIndexingEXT);
 | 
				
			||||||
            } else if (baseType.isImage() && baseType.getSampler().isBuffer()) {
 | 
					            } else if (baseType.isImage() && baseType.getSampler().isBuffer()) {
 | 
				
			||||||
                builder.addExtension("SPV_EXT_descriptor_indexing");
 | 
					                builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
 | 
				
			||||||
                builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT);
 | 
					                builder.addCapability(spv::CapabilityStorageTexelBufferArrayDynamicIndexingEXT);
 | 
				
			||||||
            } else if (baseType.isTexture() && baseType.getSampler().isBuffer()) {
 | 
					            } else if (baseType.isTexture() && baseType.getSampler().isBuffer()) {
 | 
				
			||||||
                builder.addExtension("SPV_EXT_descriptor_indexing");
 | 
					                builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
 | 
				
			||||||
                builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT);
 | 
					                builder.addCapability(spv::CapabilityUniformTexelBufferArrayDynamicIndexingEXT);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -1404,13 +1399,13 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, const gl
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (glslangIntermediate->usingPhysicalStorageBuffer()) {
 | 
					    if (glslangIntermediate->usingPhysicalStorageBuffer()) {
 | 
				
			||||||
        addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
 | 
					        addressingModel = spv::AddressingModelPhysicalStorageBuffer64EXT;
 | 
				
			||||||
        builder.addExtension(spv::E_SPV_EXT_physical_storage_buffer);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_EXT_physical_storage_buffer, spv::Spv_1_5);
 | 
				
			||||||
        builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
 | 
					        builder.addCapability(spv::CapabilityPhysicalStorageBufferAddressesEXT);
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    if (glslangIntermediate->usingVulkanMemoryModel()) {
 | 
					    if (glslangIntermediate->usingVulkanMemoryModel()) {
 | 
				
			||||||
        memoryModel = spv::MemoryModelVulkanKHR;
 | 
					        memoryModel = spv::MemoryModelVulkanKHR;
 | 
				
			||||||
        builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
 | 
					        builder.addCapability(spv::CapabilityVulkanMemoryModelKHR);
 | 
				
			||||||
        builder.addExtension(spv::E_SPV_KHR_vulkan_memory_model);
 | 
					        builder.addIncorporatedExtension(spv::E_SPV_KHR_vulkan_memory_model, spv::Spv_1_5);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    builder.setMemoryModel(addressingModel, memoryModel);
 | 
					    builder.setMemoryModel(addressingModel, memoryModel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -3242,11 +3237,11 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
 | 
				
			|||||||
        switch (storageClass) {
 | 
					        switch (storageClass) {
 | 
				
			||||||
        case spv::StorageClassInput:
 | 
					        case spv::StorageClassInput:
 | 
				
			||||||
        case spv::StorageClassOutput:
 | 
					        case spv::StorageClassOutput:
 | 
				
			||||||
            addPre13Extension(spv::E_SPV_KHR_16bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityStorageInputOutput16);
 | 
					            builder.addCapability(spv::CapabilityStorageInputOutput16);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case spv::StorageClassUniform:
 | 
					        case spv::StorageClassUniform:
 | 
				
			||||||
            addPre13Extension(spv::E_SPV_KHR_16bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
 | 
				
			||||||
            if (node->getType().getQualifier().storage == glslang::EvqBuffer)
 | 
					            if (node->getType().getQualifier().storage == glslang::EvqBuffer)
 | 
				
			||||||
                builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
 | 
					                builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
@ -3254,12 +3249,12 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
 | 
				
			|||||||
            break;
 | 
					            break;
 | 
				
			||||||
#ifndef GLSLANG_WEB
 | 
					#ifndef GLSLANG_WEB
 | 
				
			||||||
        case spv::StorageClassPushConstant:
 | 
					        case spv::StorageClassPushConstant:
 | 
				
			||||||
            addPre13Extension(spv::E_SPV_KHR_16bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityStoragePushConstant16);
 | 
					            builder.addCapability(spv::CapabilityStoragePushConstant16);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        case spv::StorageClassStorageBuffer:
 | 
					        case spv::StorageClassStorageBuffer:
 | 
				
			||||||
        case spv::StorageClassPhysicalStorageBufferEXT:
 | 
					        case spv::StorageClassPhysicalStorageBufferEXT:
 | 
				
			||||||
            addPre13Extension(spv::E_SPV_KHR_16bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
 | 
					            builder.addCapability(spv::CapabilityStorageUniformBufferBlock16);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@ -3274,13 +3269,13 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (node->getType().contains8BitInt()) {
 | 
					    if (node->getType().contains8BitInt()) {
 | 
				
			||||||
        if (storageClass == spv::StorageClassPushConstant) {
 | 
					        if (storageClass == spv::StorageClassPushConstant) {
 | 
				
			||||||
            builder.addExtension(spv::E_SPV_KHR_8bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityStoragePushConstant8);
 | 
					            builder.addCapability(spv::CapabilityStoragePushConstant8);
 | 
				
			||||||
        } else if (storageClass == spv::StorageClassUniform) {
 | 
					        } else if (storageClass == spv::StorageClassUniform) {
 | 
				
			||||||
            builder.addExtension(spv::E_SPV_KHR_8bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
 | 
					            builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
 | 
				
			||||||
        } else if (storageClass == spv::StorageClassStorageBuffer) {
 | 
					        } else if (storageClass == spv::StorageClassStorageBuffer) {
 | 
				
			||||||
            builder.addExtension(spv::E_SPV_KHR_8bit_storage);
 | 
					            builder.addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
 | 
				
			||||||
            builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
 | 
					            builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            builder.addCapability(spv::CapabilityInt8);
 | 
					            builder.addCapability(spv::CapabilityInt8);
 | 
				
			||||||
@ -3537,7 +3532,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
 | 
				
			|||||||
        else {
 | 
					        else {
 | 
				
			||||||
#ifndef GLSLANG_WEB
 | 
					#ifndef GLSLANG_WEB
 | 
				
			||||||
            if (!lastBufferBlockMember) {
 | 
					            if (!lastBufferBlockMember) {
 | 
				
			||||||
                builder.addExtension("SPV_EXT_descriptor_indexing");
 | 
					                builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5);
 | 
				
			||||||
                builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT);
 | 
					                builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            spvType = builder.makeRuntimeArray(spvType);
 | 
					            spvType = builder.makeRuntimeArray(spvType);
 | 
				
			||||||
 | 
				
			|||||||
@ -67,6 +67,7 @@ typedef enum {
 | 
				
			|||||||
    Spv_1_2 = (1 << 16) | (2 << 8),
 | 
					    Spv_1_2 = (1 << 16) | (2 << 8),
 | 
				
			||||||
    Spv_1_3 = (1 << 16) | (3 << 8),
 | 
					    Spv_1_3 = (1 << 16) | (3 << 8),
 | 
				
			||||||
    Spv_1_4 = (1 << 16) | (4 << 8),
 | 
					    Spv_1_4 = (1 << 16) | (4 << 8),
 | 
				
			||||||
 | 
					    Spv_1_5 = (1 << 16) | (5 << 8),
 | 
				
			||||||
} SpvVersion;
 | 
					} SpvVersion;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Builder {
 | 
					class Builder {
 | 
				
			||||||
@ -105,6 +106,11 @@ public:
 | 
				
			|||||||
    void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
 | 
					    void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); }
 | 
				
			||||||
    void setEmitOpLines() { emitOpLines = true; }
 | 
					    void setEmitOpLines() { emitOpLines = true; }
 | 
				
			||||||
    void addExtension(const char* ext) { extensions.insert(ext); }
 | 
					    void addExtension(const char* ext) { extensions.insert(ext); }
 | 
				
			||||||
 | 
					    void addIncorporatedExtension(const char* ext, SpvVersion incorporatedVersion)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        if (getSpvVersion() < static_cast<unsigned>(incorporatedVersion))
 | 
				
			||||||
 | 
					            addExtension(ext);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    void addInclude(const std::string& name, const std::string& text)
 | 
					    void addInclude(const std::string& name, const std::string& text)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        spv::Id incId = getStringId(name);
 | 
					        spv::Id incId = getStringId(name);
 | 
				
			||||||
 | 
				
			|||||||
@ -363,12 +363,12 @@ void Builder::postProcess()
 | 
				
			|||||||
        Instruction* type = groupedTypes[OpTypePointer][t];
 | 
					        Instruction* type = groupedTypes[OpTypePointer][t];
 | 
				
			||||||
        if (type->getImmediateOperand(0) == (unsigned)StorageClassPhysicalStorageBufferEXT) {
 | 
					        if (type->getImmediateOperand(0) == (unsigned)StorageClassPhysicalStorageBufferEXT) {
 | 
				
			||||||
            if (containsType(type->getIdOperand(1), OpTypeInt, 8)) {
 | 
					            if (containsType(type->getIdOperand(1), OpTypeInt, 8)) {
 | 
				
			||||||
                addExtension(spv::E_SPV_KHR_8bit_storage);
 | 
					                addIncorporatedExtension(spv::E_SPV_KHR_8bit_storage, spv::Spv_1_5);
 | 
				
			||||||
                addCapability(spv::CapabilityStorageBuffer8BitAccess);
 | 
					                addCapability(spv::CapabilityStorageBuffer8BitAccess);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            if (containsType(type->getIdOperand(1), OpTypeInt, 16) ||
 | 
					            if (containsType(type->getIdOperand(1), OpTypeInt, 16) ||
 | 
				
			||||||
                containsType(type->getIdOperand(1), OpTypeFloat, 16)) {
 | 
					                containsType(type->getIdOperand(1), OpTypeFloat, 16)) {
 | 
				
			||||||
                addExtension(spv::E_SPV_KHR_16bit_storage);
 | 
					                addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3);
 | 
				
			||||||
                addCapability(spv::CapabilityStorageBuffer16BitAccess);
 | 
					                addCapability(spv::CapabilityStorageBuffer16BitAccess);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -91,6 +91,7 @@ enum AddressingModel {
 | 
				
			|||||||
    AddressingModelLogical = 0,
 | 
					    AddressingModelLogical = 0,
 | 
				
			||||||
    AddressingModelPhysical32 = 1,
 | 
					    AddressingModelPhysical32 = 1,
 | 
				
			||||||
    AddressingModelPhysical64 = 2,
 | 
					    AddressingModelPhysical64 = 2,
 | 
				
			||||||
 | 
					    AddressingModelPhysicalStorageBuffer64 = 5348,
 | 
				
			||||||
    AddressingModelPhysicalStorageBuffer64EXT = 5348,
 | 
					    AddressingModelPhysicalStorageBuffer64EXT = 5348,
 | 
				
			||||||
    AddressingModelMax = 0x7fffffff,
 | 
					    AddressingModelMax = 0x7fffffff,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -99,6 +100,7 @@ enum MemoryModel {
 | 
				
			|||||||
    MemoryModelSimple = 0,
 | 
					    MemoryModelSimple = 0,
 | 
				
			||||||
    MemoryModelGLSL450 = 1,
 | 
					    MemoryModelGLSL450 = 1,
 | 
				
			||||||
    MemoryModelOpenCL = 2,
 | 
					    MemoryModelOpenCL = 2,
 | 
				
			||||||
 | 
					    MemoryModelVulkan = 3,
 | 
				
			||||||
    MemoryModelVulkanKHR = 3,
 | 
					    MemoryModelVulkanKHR = 3,
 | 
				
			||||||
    MemoryModelMax = 0x7fffffff,
 | 
					    MemoryModelMax = 0x7fffffff,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -183,6 +185,7 @@ enum StorageClass {
 | 
				
			|||||||
    StorageClassHitAttributeNV = 5339,
 | 
					    StorageClassHitAttributeNV = 5339,
 | 
				
			||||||
    StorageClassIncomingRayPayloadNV = 5342,
 | 
					    StorageClassIncomingRayPayloadNV = 5342,
 | 
				
			||||||
    StorageClassShaderRecordBufferNV = 5343,
 | 
					    StorageClassShaderRecordBufferNV = 5343,
 | 
				
			||||||
 | 
					    StorageClassPhysicalStorageBuffer = 5349,
 | 
				
			||||||
    StorageClassPhysicalStorageBufferEXT = 5349,
 | 
					    StorageClassPhysicalStorageBufferEXT = 5349,
 | 
				
			||||||
    StorageClassMax = 0x7fffffff,
 | 
					    StorageClassMax = 0x7fffffff,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -311,9 +314,13 @@ enum ImageOperandsShift {
 | 
				
			|||||||
    ImageOperandsConstOffsetsShift = 5,
 | 
					    ImageOperandsConstOffsetsShift = 5,
 | 
				
			||||||
    ImageOperandsSampleShift = 6,
 | 
					    ImageOperandsSampleShift = 6,
 | 
				
			||||||
    ImageOperandsMinLodShift = 7,
 | 
					    ImageOperandsMinLodShift = 7,
 | 
				
			||||||
 | 
					    ImageOperandsMakeTexelAvailableShift = 8,
 | 
				
			||||||
    ImageOperandsMakeTexelAvailableKHRShift = 8,
 | 
					    ImageOperandsMakeTexelAvailableKHRShift = 8,
 | 
				
			||||||
 | 
					    ImageOperandsMakeTexelVisibleShift = 9,
 | 
				
			||||||
    ImageOperandsMakeTexelVisibleKHRShift = 9,
 | 
					    ImageOperandsMakeTexelVisibleKHRShift = 9,
 | 
				
			||||||
 | 
					    ImageOperandsNonPrivateTexelShift = 10,
 | 
				
			||||||
    ImageOperandsNonPrivateTexelKHRShift = 10,
 | 
					    ImageOperandsNonPrivateTexelKHRShift = 10,
 | 
				
			||||||
 | 
					    ImageOperandsVolatileTexelShift = 11,
 | 
				
			||||||
    ImageOperandsVolatileTexelKHRShift = 11,
 | 
					    ImageOperandsVolatileTexelKHRShift = 11,
 | 
				
			||||||
    ImageOperandsSignExtendShift = 12,
 | 
					    ImageOperandsSignExtendShift = 12,
 | 
				
			||||||
    ImageOperandsZeroExtendShift = 13,
 | 
					    ImageOperandsZeroExtendShift = 13,
 | 
				
			||||||
@ -330,9 +337,13 @@ enum ImageOperandsMask {
 | 
				
			|||||||
    ImageOperandsConstOffsetsMask = 0x00000020,
 | 
					    ImageOperandsConstOffsetsMask = 0x00000020,
 | 
				
			||||||
    ImageOperandsSampleMask = 0x00000040,
 | 
					    ImageOperandsSampleMask = 0x00000040,
 | 
				
			||||||
    ImageOperandsMinLodMask = 0x00000080,
 | 
					    ImageOperandsMinLodMask = 0x00000080,
 | 
				
			||||||
 | 
					    ImageOperandsMakeTexelAvailableMask = 0x00000100,
 | 
				
			||||||
    ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
 | 
					    ImageOperandsMakeTexelAvailableKHRMask = 0x00000100,
 | 
				
			||||||
 | 
					    ImageOperandsMakeTexelVisibleMask = 0x00000200,
 | 
				
			||||||
    ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
 | 
					    ImageOperandsMakeTexelVisibleKHRMask = 0x00000200,
 | 
				
			||||||
 | 
					    ImageOperandsNonPrivateTexelMask = 0x00000400,
 | 
				
			||||||
    ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
 | 
					    ImageOperandsNonPrivateTexelKHRMask = 0x00000400,
 | 
				
			||||||
 | 
					    ImageOperandsVolatileTexelMask = 0x00000800,
 | 
				
			||||||
    ImageOperandsVolatileTexelKHRMask = 0x00000800,
 | 
					    ImageOperandsVolatileTexelKHRMask = 0x00000800,
 | 
				
			||||||
    ImageOperandsSignExtendMask = 0x00001000,
 | 
					    ImageOperandsSignExtendMask = 0x00001000,
 | 
				
			||||||
    ImageOperandsZeroExtendMask = 0x00002000,
 | 
					    ImageOperandsZeroExtendMask = 0x00002000,
 | 
				
			||||||
@ -448,8 +459,11 @@ enum Decoration {
 | 
				
			|||||||
    DecorationPerViewNV = 5272,
 | 
					    DecorationPerViewNV = 5272,
 | 
				
			||||||
    DecorationPerTaskNV = 5273,
 | 
					    DecorationPerTaskNV = 5273,
 | 
				
			||||||
    DecorationPerVertexNV = 5285,
 | 
					    DecorationPerVertexNV = 5285,
 | 
				
			||||||
 | 
					    DecorationNonUniform = 5300,
 | 
				
			||||||
    DecorationNonUniformEXT = 5300,
 | 
					    DecorationNonUniformEXT = 5300,
 | 
				
			||||||
 | 
					    DecorationRestrictPointer = 5355,
 | 
				
			||||||
    DecorationRestrictPointerEXT = 5355,
 | 
					    DecorationRestrictPointerEXT = 5355,
 | 
				
			||||||
 | 
					    DecorationAliasedPointer = 5356,
 | 
				
			||||||
    DecorationAliasedPointerEXT = 5356,
 | 
					    DecorationAliasedPointerEXT = 5356,
 | 
				
			||||||
    DecorationCounterBuffer = 5634,
 | 
					    DecorationCounterBuffer = 5634,
 | 
				
			||||||
    DecorationHlslCounterBufferGOOGLE = 5634,
 | 
					    DecorationHlslCounterBufferGOOGLE = 5634,
 | 
				
			||||||
@ -630,8 +644,11 @@ enum MemorySemanticsShift {
 | 
				
			|||||||
    MemorySemanticsCrossWorkgroupMemoryShift = 9,
 | 
					    MemorySemanticsCrossWorkgroupMemoryShift = 9,
 | 
				
			||||||
    MemorySemanticsAtomicCounterMemoryShift = 10,
 | 
					    MemorySemanticsAtomicCounterMemoryShift = 10,
 | 
				
			||||||
    MemorySemanticsImageMemoryShift = 11,
 | 
					    MemorySemanticsImageMemoryShift = 11,
 | 
				
			||||||
 | 
					    MemorySemanticsOutputMemoryShift = 12,
 | 
				
			||||||
    MemorySemanticsOutputMemoryKHRShift = 12,
 | 
					    MemorySemanticsOutputMemoryKHRShift = 12,
 | 
				
			||||||
 | 
					    MemorySemanticsMakeAvailableShift = 13,
 | 
				
			||||||
    MemorySemanticsMakeAvailableKHRShift = 13,
 | 
					    MemorySemanticsMakeAvailableKHRShift = 13,
 | 
				
			||||||
 | 
					    MemorySemanticsMakeVisibleShift = 14,
 | 
				
			||||||
    MemorySemanticsMakeVisibleKHRShift = 14,
 | 
					    MemorySemanticsMakeVisibleKHRShift = 14,
 | 
				
			||||||
    MemorySemanticsVolatileShift = 15,
 | 
					    MemorySemanticsVolatileShift = 15,
 | 
				
			||||||
    MemorySemanticsMax = 0x7fffffff,
 | 
					    MemorySemanticsMax = 0x7fffffff,
 | 
				
			||||||
@ -649,8 +666,11 @@ enum MemorySemanticsMask {
 | 
				
			|||||||
    MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
 | 
					    MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200,
 | 
				
			||||||
    MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
 | 
					    MemorySemanticsAtomicCounterMemoryMask = 0x00000400,
 | 
				
			||||||
    MemorySemanticsImageMemoryMask = 0x00000800,
 | 
					    MemorySemanticsImageMemoryMask = 0x00000800,
 | 
				
			||||||
 | 
					    MemorySemanticsOutputMemoryMask = 0x00001000,
 | 
				
			||||||
    MemorySemanticsOutputMemoryKHRMask = 0x00001000,
 | 
					    MemorySemanticsOutputMemoryKHRMask = 0x00001000,
 | 
				
			||||||
 | 
					    MemorySemanticsMakeAvailableMask = 0x00002000,
 | 
				
			||||||
    MemorySemanticsMakeAvailableKHRMask = 0x00002000,
 | 
					    MemorySemanticsMakeAvailableKHRMask = 0x00002000,
 | 
				
			||||||
 | 
					    MemorySemanticsMakeVisibleMask = 0x00004000,
 | 
				
			||||||
    MemorySemanticsMakeVisibleKHRMask = 0x00004000,
 | 
					    MemorySemanticsMakeVisibleKHRMask = 0x00004000,
 | 
				
			||||||
    MemorySemanticsVolatileMask = 0x00008000,
 | 
					    MemorySemanticsVolatileMask = 0x00008000,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -659,8 +679,11 @@ enum MemoryAccessShift {
 | 
				
			|||||||
    MemoryAccessVolatileShift = 0,
 | 
					    MemoryAccessVolatileShift = 0,
 | 
				
			||||||
    MemoryAccessAlignedShift = 1,
 | 
					    MemoryAccessAlignedShift = 1,
 | 
				
			||||||
    MemoryAccessNontemporalShift = 2,
 | 
					    MemoryAccessNontemporalShift = 2,
 | 
				
			||||||
 | 
					    MemoryAccessMakePointerAvailableShift = 3,
 | 
				
			||||||
    MemoryAccessMakePointerAvailableKHRShift = 3,
 | 
					    MemoryAccessMakePointerAvailableKHRShift = 3,
 | 
				
			||||||
 | 
					    MemoryAccessMakePointerVisibleShift = 4,
 | 
				
			||||||
    MemoryAccessMakePointerVisibleKHRShift = 4,
 | 
					    MemoryAccessMakePointerVisibleKHRShift = 4,
 | 
				
			||||||
 | 
					    MemoryAccessNonPrivatePointerShift = 5,
 | 
				
			||||||
    MemoryAccessNonPrivatePointerKHRShift = 5,
 | 
					    MemoryAccessNonPrivatePointerKHRShift = 5,
 | 
				
			||||||
    MemoryAccessMax = 0x7fffffff,
 | 
					    MemoryAccessMax = 0x7fffffff,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -670,8 +693,11 @@ enum MemoryAccessMask {
 | 
				
			|||||||
    MemoryAccessVolatileMask = 0x00000001,
 | 
					    MemoryAccessVolatileMask = 0x00000001,
 | 
				
			||||||
    MemoryAccessAlignedMask = 0x00000002,
 | 
					    MemoryAccessAlignedMask = 0x00000002,
 | 
				
			||||||
    MemoryAccessNontemporalMask = 0x00000004,
 | 
					    MemoryAccessNontemporalMask = 0x00000004,
 | 
				
			||||||
 | 
					    MemoryAccessMakePointerAvailableMask = 0x00000008,
 | 
				
			||||||
    MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
 | 
					    MemoryAccessMakePointerAvailableKHRMask = 0x00000008,
 | 
				
			||||||
 | 
					    MemoryAccessMakePointerVisibleMask = 0x00000010,
 | 
				
			||||||
    MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
 | 
					    MemoryAccessMakePointerVisibleKHRMask = 0x00000010,
 | 
				
			||||||
 | 
					    MemoryAccessNonPrivatePointerMask = 0x00000020,
 | 
				
			||||||
    MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
 | 
					    MemoryAccessNonPrivatePointerKHRMask = 0x00000020,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -681,6 +707,7 @@ enum Scope {
 | 
				
			|||||||
    ScopeWorkgroup = 2,
 | 
					    ScopeWorkgroup = 2,
 | 
				
			||||||
    ScopeSubgroup = 3,
 | 
					    ScopeSubgroup = 3,
 | 
				
			||||||
    ScopeInvocation = 4,
 | 
					    ScopeInvocation = 4,
 | 
				
			||||||
 | 
					    ScopeQueueFamily = 5,
 | 
				
			||||||
    ScopeQueueFamilyKHR = 5,
 | 
					    ScopeQueueFamilyKHR = 5,
 | 
				
			||||||
    ScopeMax = 0x7fffffff,
 | 
					    ScopeMax = 0x7fffffff,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -781,6 +808,8 @@ enum Capability {
 | 
				
			|||||||
    CapabilityGroupNonUniformShuffleRelative = 66,
 | 
					    CapabilityGroupNonUniformShuffleRelative = 66,
 | 
				
			||||||
    CapabilityGroupNonUniformClustered = 67,
 | 
					    CapabilityGroupNonUniformClustered = 67,
 | 
				
			||||||
    CapabilityGroupNonUniformQuad = 68,
 | 
					    CapabilityGroupNonUniformQuad = 68,
 | 
				
			||||||
 | 
					    CapabilityShaderLayer = 69,
 | 
				
			||||||
 | 
					    CapabilityShaderViewportIndex = 70,
 | 
				
			||||||
    CapabilitySubgroupBallotKHR = 4423,
 | 
					    CapabilitySubgroupBallotKHR = 4423,
 | 
				
			||||||
    CapabilityDrawParameters = 4427,
 | 
					    CapabilityDrawParameters = 4427,
 | 
				
			||||||
    CapabilitySubgroupVoteKHR = 4431,
 | 
					    CapabilitySubgroupVoteKHR = 4431,
 | 
				
			||||||
@ -825,21 +854,36 @@ enum Capability {
 | 
				
			|||||||
    CapabilityFragmentDensityEXT = 5291,
 | 
					    CapabilityFragmentDensityEXT = 5291,
 | 
				
			||||||
    CapabilityShadingRateNV = 5291,
 | 
					    CapabilityShadingRateNV = 5291,
 | 
				
			||||||
    CapabilityGroupNonUniformPartitionedNV = 5297,
 | 
					    CapabilityGroupNonUniformPartitionedNV = 5297,
 | 
				
			||||||
 | 
					    CapabilityShaderNonUniform = 5301,
 | 
				
			||||||
    CapabilityShaderNonUniformEXT = 5301,
 | 
					    CapabilityShaderNonUniformEXT = 5301,
 | 
				
			||||||
 | 
					    CapabilityRuntimeDescriptorArray = 5302,
 | 
				
			||||||
    CapabilityRuntimeDescriptorArrayEXT = 5302,
 | 
					    CapabilityRuntimeDescriptorArrayEXT = 5302,
 | 
				
			||||||
 | 
					    CapabilityInputAttachmentArrayDynamicIndexing = 5303,
 | 
				
			||||||
    CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
 | 
					    CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303,
 | 
				
			||||||
 | 
					    CapabilityUniformTexelBufferArrayDynamicIndexing = 5304,
 | 
				
			||||||
    CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
 | 
					    CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304,
 | 
				
			||||||
 | 
					    CapabilityStorageTexelBufferArrayDynamicIndexing = 5305,
 | 
				
			||||||
    CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
 | 
					    CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305,
 | 
				
			||||||
 | 
					    CapabilityUniformBufferArrayNonUniformIndexing = 5306,
 | 
				
			||||||
    CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
 | 
					    CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306,
 | 
				
			||||||
 | 
					    CapabilitySampledImageArrayNonUniformIndexing = 5307,
 | 
				
			||||||
    CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
 | 
					    CapabilitySampledImageArrayNonUniformIndexingEXT = 5307,
 | 
				
			||||||
 | 
					    CapabilityStorageBufferArrayNonUniformIndexing = 5308,
 | 
				
			||||||
    CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
 | 
					    CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308,
 | 
				
			||||||
 | 
					    CapabilityStorageImageArrayNonUniformIndexing = 5309,
 | 
				
			||||||
    CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
 | 
					    CapabilityStorageImageArrayNonUniformIndexingEXT = 5309,
 | 
				
			||||||
 | 
					    CapabilityInputAttachmentArrayNonUniformIndexing = 5310,
 | 
				
			||||||
    CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
 | 
					    CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310,
 | 
				
			||||||
 | 
					    CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311,
 | 
				
			||||||
    CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
 | 
					    CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311,
 | 
				
			||||||
 | 
					    CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312,
 | 
				
			||||||
    CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
 | 
					    CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312,
 | 
				
			||||||
    CapabilityRayTracingNV = 5340,
 | 
					    CapabilityRayTracingNV = 5340,
 | 
				
			||||||
 | 
					    CapabilityVulkanMemoryModel = 5345,
 | 
				
			||||||
    CapabilityVulkanMemoryModelKHR = 5345,
 | 
					    CapabilityVulkanMemoryModelKHR = 5345,
 | 
				
			||||||
 | 
					    CapabilityVulkanMemoryModelDeviceScope = 5346,
 | 
				
			||||||
    CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
 | 
					    CapabilityVulkanMemoryModelDeviceScopeKHR = 5346,
 | 
				
			||||||
 | 
					    CapabilityPhysicalStorageBufferAddresses = 5347,
 | 
				
			||||||
    CapabilityPhysicalStorageBufferAddressesEXT = 5347,
 | 
					    CapabilityPhysicalStorageBufferAddressesEXT = 5347,
 | 
				
			||||||
    CapabilityComputeDerivativeGroupLinearNV = 5350,
 | 
					    CapabilityComputeDerivativeGroupLinearNV = 5350,
 | 
				
			||||||
    CapabilityCooperativeMatrixNV = 5357,
 | 
					    CapabilityCooperativeMatrixNV = 5357,
 | 
				
			||||||
 | 
				
			|||||||
@ -615,8 +615,12 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
 | 
				
			|||||||
                            } else if (strcmp(argv[1], "spirv1.4") == 0) {
 | 
					                            } else if (strcmp(argv[1], "spirv1.4") == 0) {
 | 
				
			||||||
                                TargetLanguage = glslang::EShTargetSpv;
 | 
					                                TargetLanguage = glslang::EShTargetSpv;
 | 
				
			||||||
                                TargetVersion = glslang::EShTargetSpv_1_4;
 | 
					                                TargetVersion = glslang::EShTargetSpv_1_4;
 | 
				
			||||||
 | 
					                            } else if (strcmp(argv[1], "spirv1.5") == 0) {
 | 
				
			||||||
 | 
					                                TargetLanguage = glslang::EShTargetSpv;
 | 
				
			||||||
 | 
					                                TargetVersion = glslang::EShTargetSpv_1_5;
 | 
				
			||||||
                            } else
 | 
					                            } else
 | 
				
			||||||
                                Error("--target-env expected one of: vulkan1.0, vulkan1.1, opengl, spirv1.0, spirv1.1, spirv1.2, or spirv1.3");
 | 
					                                Error("--target-env expected one of: vulkan1.0, vulkan1.1, opengl,\n"
 | 
				
			||||||
 | 
					                                      "spirv1.0, spirv1.1, spirv1.2, spirv1.3, spirv1.4, or spirv1.5");
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
                        bumpArg();
 | 
					                        bumpArg();
 | 
				
			||||||
                    } else if (lowerword == "variable-name" || // synonyms
 | 
					                    } else if (lowerword == "variable-name" || // synonyms
 | 
				
			||||||
@ -1618,7 +1622,7 @@ void usage()
 | 
				
			|||||||
           "  --stdin                           read from stdin instead of from a file;\n"
 | 
					           "  --stdin                           read from stdin instead of from a file;\n"
 | 
				
			||||||
           "                                    requires providing the shader stage using -S\n"
 | 
					           "                                    requires providing the shader stage using -S\n"
 | 
				
			||||||
           "  --target-env {vulkan1.0 | vulkan1.1 | opengl | \n"
 | 
					           "  --target-env {vulkan1.0 | vulkan1.1 | opengl | \n"
 | 
				
			||||||
           "                spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3}\n"
 | 
					           "                spirv1.0 | spirv1.1 | spirv1.2 | spirv1.3 | spirv1.4 | spirv1.5}\n"
 | 
				
			||||||
           "                                    set execution environment that emitted code\n"
 | 
					           "                                    set execution environment that emitted code\n"
 | 
				
			||||||
           "                                    will execute in (versus source language\n"
 | 
					           "                                    will execute in (versus source language\n"
 | 
				
			||||||
           "                                    semantics selected by --client) defaults:\n"
 | 
					           "                                    semantics selected by --client) defaults:\n"
 | 
				
			||||||
 | 
				
			|||||||
@ -2155,9 +2155,11 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
 | 
				
			|||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case EOpSubgroupBroadcast:
 | 
					    case EOpSubgroupBroadcast:
 | 
				
			||||||
        // <id> must be an integral constant expression.
 | 
					        if (spvVersion.spv < EShTargetSpv_1_5) {
 | 
				
			||||||
        if ((*argp)[1]->getAsConstantUnion() == nullptr)
 | 
					            // <id> must be an integral constant expression.
 | 
				
			||||||
            error(loc, "argument must be compile-time constant", "id", "");
 | 
					            if ((*argp)[1]->getAsConstantUnion() == nullptr)
 | 
				
			||||||
 | 
					                error(loc, "argument must be compile-time constant", "id", "");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    case EOpBarrier:
 | 
					    case EOpBarrier:
 | 
				
			||||||
 | 
				
			|||||||
@ -311,6 +311,12 @@ public:
 | 
				
			|||||||
        case EShTargetSpv_1_3:
 | 
					        case EShTargetSpv_1_3:
 | 
				
			||||||
            processes.addProcess("target-env spirv1.3");
 | 
					            processes.addProcess("target-env spirv1.3");
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					        case EShTargetSpv_1_4:
 | 
				
			||||||
 | 
					            processes.addProcess("target-env spirv1.4");
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        case EShTargetSpv_1_5:
 | 
				
			||||||
 | 
					            processes.addProcess("target-env spirv1.5");
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            processes.addProcess("target-env spirvUnknown");
 | 
					            processes.addProcess("target-env spirvUnknown");
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
				
			|||||||
@ -156,6 +156,7 @@ typedef enum {
 | 
				
			|||||||
    EShTargetSpv_1_2 = (1 << 16) | (2 << 8),          // SPIR-V 1.2
 | 
					    EShTargetSpv_1_2 = (1 << 16) | (2 << 8),          // SPIR-V 1.2
 | 
				
			||||||
    EShTargetSpv_1_3 = (1 << 16) | (3 << 8),          // SPIR-V 1.3
 | 
					    EShTargetSpv_1_3 = (1 << 16) | (3 << 8),          // SPIR-V 1.3
 | 
				
			||||||
    EShTargetSpv_1_4 = (1 << 16) | (4 << 8),          // SPIR-V 1.4
 | 
					    EShTargetSpv_1_4 = (1 << 16) | (4 << 8),          // SPIR-V 1.4
 | 
				
			||||||
 | 
					    EShTargetSpv_1_5 = (1 << 16) | (5 << 8),          // SPIR-V 1.5
 | 
				
			||||||
} EShTargetLanguageVersion;
 | 
					} EShTargetLanguageVersion;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct TInputLanguage {
 | 
					struct TInputLanguage {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user