diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-01 11:11:12 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-01 11:23:48 +0200 |
commit | 728dbeab69c21e7bead0f07604e7d044a67e9a14 (patch) | |
tree | e864a8a23e107ef9c50152bd54be8befc1068304 /thirdparty/spirv-reflect | |
parent | 549fcce5f8f7beace3e5c90e9bbe4335d4fd1476 (diff) | |
download | redot-engine-728dbeab69c21e7bead0f07604e7d044a67e9a14.tar.gz |
vulkan: Update all components to Vulkan SDK 1.3.261.1
Updates to volk, vulkan headers, `vk_enum_string_helper.h`, VMA,
glslang, spirv-reflect.
VMA doesn't tag SDK releases specifically, and still hasn't had a tagged
release since 3.0.1, but the Vulkan SDK now seems to ship a recent master
commit, so we do the same.
Diffstat (limited to 'thirdparty/spirv-reflect')
-rw-r--r-- | thirdparty/spirv-reflect/include/spirv/unified1/spirv.h | 4029 | ||||
-rw-r--r-- | thirdparty/spirv-reflect/patches/specialization-constants.patch | 58 | ||||
-rw-r--r-- | thirdparty/spirv-reflect/spirv_reflect.c | 390 | ||||
-rw-r--r-- | thirdparty/spirv-reflect/spirv_reflect.h | 60 |
4 files changed, 3439 insertions, 1098 deletions
diff --git a/thirdparty/spirv-reflect/include/spirv/unified1/spirv.h b/thirdparty/spirv-reflect/include/spirv/unified1/spirv.h index c6272a1d97..65becfd769 100644 --- a/thirdparty/spirv-reflect/include/spirv/unified1/spirv.h +++ b/thirdparty/spirv-reflect/include/spirv/unified1/spirv.h @@ -1,4 +1,3 @@ -/* clang-format off */ /* ** Copyright (c) 2014-2020 The Khronos Group Inc. ** @@ -69,15 +68,17 @@ static const unsigned int SpvOpCodeMask = 0xffff; static const unsigned int SpvWordCountShift = 16; typedef enum SpvSourceLanguage_ { - SpvSourceLanguageUnknown = 0, - SpvSourceLanguageESSL = 1, - SpvSourceLanguageGLSL = 2, - SpvSourceLanguageOpenCL_C = 3, - SpvSourceLanguageOpenCL_CPP = 4, - SpvSourceLanguageHLSL = 5, - SpvSourceLanguageCPP_for_OpenCL = 6, - SpvSourceLanguageSYCL = 7, - SpvSourceLanguageMax = 0x7fffffff, + SpvSourceLanguageUnknown = 0, + SpvSourceLanguageESSL = 1, + SpvSourceLanguageGLSL = 2, + SpvSourceLanguageOpenCL_C = 3, + SpvSourceLanguageOpenCL_CPP = 4, + SpvSourceLanguageHLSL = 5, + SpvSourceLanguageCPP_for_OpenCL = 6, + SpvSourceLanguageSYCL = 7, + SpvSourceLanguageHERO_C = 8, + SpvSourceLanguageNZSL = 9, + SpvSourceLanguageMax = 0x7fffffff, } SpvSourceLanguage; typedef enum SpvExecutionModel_ { @@ -108,21 +109,21 @@ typedef enum SpvExecutionModel_ { } SpvExecutionModel; typedef enum SpvAddressingModel_ { - SpvAddressingModelLogical = 0, - SpvAddressingModelPhysical32 = 1, - SpvAddressingModelPhysical64 = 2, - SpvAddressingModelPhysicalStorageBuffer64 = 5348, - SpvAddressingModelPhysicalStorageBuffer64EXT = 5348, - SpvAddressingModelMax = 0x7fffffff, + SpvAddressingModelLogical = 0, + SpvAddressingModelPhysical32 = 1, + SpvAddressingModelPhysical64 = 2, + SpvAddressingModelPhysicalStorageBuffer64 = 5348, + SpvAddressingModelPhysicalStorageBuffer64EXT = 5348, + SpvAddressingModelMax = 0x7fffffff, } SpvAddressingModel; typedef enum SpvMemoryModel_ { - SpvMemoryModelSimple = 0, - SpvMemoryModelGLSL450 = 1, - SpvMemoryModelOpenCL = 2, - SpvMemoryModelVulkan = 3, - SpvMemoryModelVulkanKHR = 3, - SpvMemoryModelMax = 0x7fffffff, + SpvMemoryModelSimple = 0, + SpvMemoryModelGLSL450 = 1, + SpvMemoryModelOpenCL = 2, + SpvMemoryModelVulkan = 3, + SpvMemoryModelVulkanKHR = 3, + SpvMemoryModelMax = 0x7fffffff, } SpvMemoryModel; typedef enum SpvExecutionMode_ { @@ -262,201 +263,203 @@ typedef enum SpvDim_ { } SpvDim; typedef enum SpvSamplerAddressingMode_ { - SpvSamplerAddressingModeNone = 0, - SpvSamplerAddressingModeClampToEdge = 1, - SpvSamplerAddressingModeClamp = 2, - SpvSamplerAddressingModeRepeat = 3, - SpvSamplerAddressingModeRepeatMirrored = 4, - SpvSamplerAddressingModeMax = 0x7fffffff, + SpvSamplerAddressingModeNone = 0, + SpvSamplerAddressingModeClampToEdge = 1, + SpvSamplerAddressingModeClamp = 2, + SpvSamplerAddressingModeRepeat = 3, + SpvSamplerAddressingModeRepeatMirrored = 4, + SpvSamplerAddressingModeMax = 0x7fffffff, } SpvSamplerAddressingMode; typedef enum SpvSamplerFilterMode_ { - SpvSamplerFilterModeNearest = 0, - SpvSamplerFilterModeLinear = 1, - SpvSamplerFilterModeMax = 0x7fffffff, + SpvSamplerFilterModeNearest = 0, + SpvSamplerFilterModeLinear = 1, + SpvSamplerFilterModeMax = 0x7fffffff, } SpvSamplerFilterMode; typedef enum SpvImageFormat_ { - SpvImageFormatUnknown = 0, - SpvImageFormatRgba32f = 1, - SpvImageFormatRgba16f = 2, - SpvImageFormatR32f = 3, - SpvImageFormatRgba8 = 4, - SpvImageFormatRgba8Snorm = 5, - SpvImageFormatRg32f = 6, - SpvImageFormatRg16f = 7, - SpvImageFormatR11fG11fB10f = 8, - SpvImageFormatR16f = 9, - SpvImageFormatRgba16 = 10, - SpvImageFormatRgb10A2 = 11, - SpvImageFormatRg16 = 12, - SpvImageFormatRg8 = 13, - SpvImageFormatR16 = 14, - SpvImageFormatR8 = 15, - SpvImageFormatRgba16Snorm = 16, - SpvImageFormatRg16Snorm = 17, - SpvImageFormatRg8Snorm = 18, - SpvImageFormatR16Snorm = 19, - SpvImageFormatR8Snorm = 20, - SpvImageFormatRgba32i = 21, - SpvImageFormatRgba16i = 22, - SpvImageFormatRgba8i = 23, - SpvImageFormatR32i = 24, - SpvImageFormatRg32i = 25, - SpvImageFormatRg16i = 26, - SpvImageFormatRg8i = 27, - SpvImageFormatR16i = 28, - SpvImageFormatR8i = 29, - SpvImageFormatRgba32ui = 30, - SpvImageFormatRgba16ui = 31, - SpvImageFormatRgba8ui = 32, - SpvImageFormatR32ui = 33, - SpvImageFormatRgb10a2ui = 34, - SpvImageFormatRg32ui = 35, - SpvImageFormatRg16ui = 36, - SpvImageFormatRg8ui = 37, - SpvImageFormatR16ui = 38, - SpvImageFormatR8ui = 39, - SpvImageFormatR64ui = 40, - SpvImageFormatR64i = 41, - SpvImageFormatMax = 0x7fffffff, + SpvImageFormatUnknown = 0, + SpvImageFormatRgba32f = 1, + SpvImageFormatRgba16f = 2, + SpvImageFormatR32f = 3, + SpvImageFormatRgba8 = 4, + SpvImageFormatRgba8Snorm = 5, + SpvImageFormatRg32f = 6, + SpvImageFormatRg16f = 7, + SpvImageFormatR11fG11fB10f = 8, + SpvImageFormatR16f = 9, + SpvImageFormatRgba16 = 10, + SpvImageFormatRgb10A2 = 11, + SpvImageFormatRg16 = 12, + SpvImageFormatRg8 = 13, + SpvImageFormatR16 = 14, + SpvImageFormatR8 = 15, + SpvImageFormatRgba16Snorm = 16, + SpvImageFormatRg16Snorm = 17, + SpvImageFormatRg8Snorm = 18, + SpvImageFormatR16Snorm = 19, + SpvImageFormatR8Snorm = 20, + SpvImageFormatRgba32i = 21, + SpvImageFormatRgba16i = 22, + SpvImageFormatRgba8i = 23, + SpvImageFormatR32i = 24, + SpvImageFormatRg32i = 25, + SpvImageFormatRg16i = 26, + SpvImageFormatRg8i = 27, + SpvImageFormatR16i = 28, + SpvImageFormatR8i = 29, + SpvImageFormatRgba32ui = 30, + SpvImageFormatRgba16ui = 31, + SpvImageFormatRgba8ui = 32, + SpvImageFormatR32ui = 33, + SpvImageFormatRgb10a2ui = 34, + SpvImageFormatRg32ui = 35, + SpvImageFormatRg16ui = 36, + SpvImageFormatRg8ui = 37, + SpvImageFormatR16ui = 38, + SpvImageFormatR8ui = 39, + SpvImageFormatR64ui = 40, + SpvImageFormatR64i = 41, + SpvImageFormatMax = 0x7fffffff, } SpvImageFormat; typedef enum SpvImageChannelOrder_ { - SpvImageChannelOrderR = 0, - SpvImageChannelOrderA = 1, - SpvImageChannelOrderRG = 2, - SpvImageChannelOrderRA = 3, - SpvImageChannelOrderRGB = 4, - SpvImageChannelOrderRGBA = 5, - SpvImageChannelOrderBGRA = 6, - SpvImageChannelOrderARGB = 7, - SpvImageChannelOrderIntensity = 8, - SpvImageChannelOrderLuminance = 9, - SpvImageChannelOrderRx = 10, - SpvImageChannelOrderRGx = 11, - SpvImageChannelOrderRGBx = 12, - SpvImageChannelOrderDepth = 13, - SpvImageChannelOrderDepthStencil = 14, - SpvImageChannelOrdersRGB = 15, - SpvImageChannelOrdersRGBx = 16, - SpvImageChannelOrdersRGBA = 17, - SpvImageChannelOrdersBGRA = 18, - SpvImageChannelOrderABGR = 19, - SpvImageChannelOrderMax = 0x7fffffff, + SpvImageChannelOrderR = 0, + SpvImageChannelOrderA = 1, + SpvImageChannelOrderRG = 2, + SpvImageChannelOrderRA = 3, + SpvImageChannelOrderRGB = 4, + SpvImageChannelOrderRGBA = 5, + SpvImageChannelOrderBGRA = 6, + SpvImageChannelOrderARGB = 7, + SpvImageChannelOrderIntensity = 8, + SpvImageChannelOrderLuminance = 9, + SpvImageChannelOrderRx = 10, + SpvImageChannelOrderRGx = 11, + SpvImageChannelOrderRGBx = 12, + SpvImageChannelOrderDepth = 13, + SpvImageChannelOrderDepthStencil = 14, + SpvImageChannelOrdersRGB = 15, + SpvImageChannelOrdersRGBx = 16, + SpvImageChannelOrdersRGBA = 17, + SpvImageChannelOrdersBGRA = 18, + SpvImageChannelOrderABGR = 19, + SpvImageChannelOrderMax = 0x7fffffff, } SpvImageChannelOrder; typedef enum SpvImageChannelDataType_ { - SpvImageChannelDataTypeSnormInt8 = 0, - SpvImageChannelDataTypeSnormInt16 = 1, - SpvImageChannelDataTypeUnormInt8 = 2, - SpvImageChannelDataTypeUnormInt16 = 3, - SpvImageChannelDataTypeUnormShort565 = 4, - SpvImageChannelDataTypeUnormShort555 = 5, - SpvImageChannelDataTypeUnormInt101010 = 6, - SpvImageChannelDataTypeSignedInt8 = 7, - SpvImageChannelDataTypeSignedInt16 = 8, - SpvImageChannelDataTypeSignedInt32 = 9, - SpvImageChannelDataTypeUnsignedInt8 = 10, - SpvImageChannelDataTypeUnsignedInt16 = 11, - SpvImageChannelDataTypeUnsignedInt32 = 12, - SpvImageChannelDataTypeHalfFloat = 13, - SpvImageChannelDataTypeFloat = 14, - SpvImageChannelDataTypeUnormInt24 = 15, - SpvImageChannelDataTypeUnormInt101010_2 = 16, - SpvImageChannelDataTypeMax = 0x7fffffff, + SpvImageChannelDataTypeSnormInt8 = 0, + SpvImageChannelDataTypeSnormInt16 = 1, + SpvImageChannelDataTypeUnormInt8 = 2, + SpvImageChannelDataTypeUnormInt16 = 3, + SpvImageChannelDataTypeUnormShort565 = 4, + SpvImageChannelDataTypeUnormShort555 = 5, + SpvImageChannelDataTypeUnormInt101010 = 6, + SpvImageChannelDataTypeSignedInt8 = 7, + SpvImageChannelDataTypeSignedInt16 = 8, + SpvImageChannelDataTypeSignedInt32 = 9, + SpvImageChannelDataTypeUnsignedInt8 = 10, + SpvImageChannelDataTypeUnsignedInt16 = 11, + SpvImageChannelDataTypeUnsignedInt32 = 12, + SpvImageChannelDataTypeHalfFloat = 13, + SpvImageChannelDataTypeFloat = 14, + SpvImageChannelDataTypeUnormInt24 = 15, + SpvImageChannelDataTypeUnormInt101010_2 = 16, + SpvImageChannelDataTypeUnsignedIntRaw10EXT = 19, + SpvImageChannelDataTypeUnsignedIntRaw12EXT = 20, + SpvImageChannelDataTypeMax = 0x7fffffff, } SpvImageChannelDataType; typedef enum SpvImageOperandsShift_ { - SpvImageOperandsBiasShift = 0, - SpvImageOperandsLodShift = 1, - SpvImageOperandsGradShift = 2, - SpvImageOperandsConstOffsetShift = 3, - SpvImageOperandsOffsetShift = 4, - SpvImageOperandsConstOffsetsShift = 5, - SpvImageOperandsSampleShift = 6, - SpvImageOperandsMinLodShift = 7, - SpvImageOperandsMakeTexelAvailableShift = 8, - SpvImageOperandsMakeTexelAvailableKHRShift = 8, - SpvImageOperandsMakeTexelVisibleShift = 9, - SpvImageOperandsMakeTexelVisibleKHRShift = 9, - SpvImageOperandsNonPrivateTexelShift = 10, - SpvImageOperandsNonPrivateTexelKHRShift = 10, - SpvImageOperandsVolatileTexelShift = 11, - SpvImageOperandsVolatileTexelKHRShift = 11, - SpvImageOperandsSignExtendShift = 12, - SpvImageOperandsZeroExtendShift = 13, - SpvImageOperandsNontemporalShift = 14, - SpvImageOperandsOffsetsShift = 16, - SpvImageOperandsMax = 0x7fffffff, + SpvImageOperandsBiasShift = 0, + SpvImageOperandsLodShift = 1, + SpvImageOperandsGradShift = 2, + SpvImageOperandsConstOffsetShift = 3, + SpvImageOperandsOffsetShift = 4, + SpvImageOperandsConstOffsetsShift = 5, + SpvImageOperandsSampleShift = 6, + SpvImageOperandsMinLodShift = 7, + SpvImageOperandsMakeTexelAvailableShift = 8, + SpvImageOperandsMakeTexelAvailableKHRShift = 8, + SpvImageOperandsMakeTexelVisibleShift = 9, + SpvImageOperandsMakeTexelVisibleKHRShift = 9, + SpvImageOperandsNonPrivateTexelShift = 10, + SpvImageOperandsNonPrivateTexelKHRShift = 10, + SpvImageOperandsVolatileTexelShift = 11, + SpvImageOperandsVolatileTexelKHRShift = 11, + SpvImageOperandsSignExtendShift = 12, + SpvImageOperandsZeroExtendShift = 13, + SpvImageOperandsNontemporalShift = 14, + SpvImageOperandsOffsetsShift = 16, + SpvImageOperandsMax = 0x7fffffff, } SpvImageOperandsShift; typedef enum SpvImageOperandsMask_ { - SpvImageOperandsMaskNone = 0, - SpvImageOperandsBiasMask = 0x00000001, - SpvImageOperandsLodMask = 0x00000002, - SpvImageOperandsGradMask = 0x00000004, - SpvImageOperandsConstOffsetMask = 0x00000008, - SpvImageOperandsOffsetMask = 0x00000010, - SpvImageOperandsConstOffsetsMask = 0x00000020, - SpvImageOperandsSampleMask = 0x00000040, - SpvImageOperandsMinLodMask = 0x00000080, - SpvImageOperandsMakeTexelAvailableMask = 0x00000100, - SpvImageOperandsMakeTexelAvailableKHRMask = 0x00000100, - SpvImageOperandsMakeTexelVisibleMask = 0x00000200, - SpvImageOperandsMakeTexelVisibleKHRMask = 0x00000200, - SpvImageOperandsNonPrivateTexelMask = 0x00000400, - SpvImageOperandsNonPrivateTexelKHRMask = 0x00000400, - SpvImageOperandsVolatileTexelMask = 0x00000800, - SpvImageOperandsVolatileTexelKHRMask = 0x00000800, - SpvImageOperandsSignExtendMask = 0x00001000, - SpvImageOperandsZeroExtendMask = 0x00002000, - SpvImageOperandsNontemporalMask = 0x00004000, - SpvImageOperandsOffsetsMask = 0x00010000, + SpvImageOperandsMaskNone = 0, + SpvImageOperandsBiasMask = 0x00000001, + SpvImageOperandsLodMask = 0x00000002, + SpvImageOperandsGradMask = 0x00000004, + SpvImageOperandsConstOffsetMask = 0x00000008, + SpvImageOperandsOffsetMask = 0x00000010, + SpvImageOperandsConstOffsetsMask = 0x00000020, + SpvImageOperandsSampleMask = 0x00000040, + SpvImageOperandsMinLodMask = 0x00000080, + SpvImageOperandsMakeTexelAvailableMask = 0x00000100, + SpvImageOperandsMakeTexelAvailableKHRMask = 0x00000100, + SpvImageOperandsMakeTexelVisibleMask = 0x00000200, + SpvImageOperandsMakeTexelVisibleKHRMask = 0x00000200, + SpvImageOperandsNonPrivateTexelMask = 0x00000400, + SpvImageOperandsNonPrivateTexelKHRMask = 0x00000400, + SpvImageOperandsVolatileTexelMask = 0x00000800, + SpvImageOperandsVolatileTexelKHRMask = 0x00000800, + SpvImageOperandsSignExtendMask = 0x00001000, + SpvImageOperandsZeroExtendMask = 0x00002000, + SpvImageOperandsNontemporalMask = 0x00004000, + SpvImageOperandsOffsetsMask = 0x00010000, } SpvImageOperandsMask; typedef enum SpvFPFastMathModeShift_ { - SpvFPFastMathModeNotNaNShift = 0, - SpvFPFastMathModeNotInfShift = 1, - SpvFPFastMathModeNSZShift = 2, - SpvFPFastMathModeAllowRecipShift = 3, - SpvFPFastMathModeFastShift = 4, - SpvFPFastMathModeAllowContractFastINTELShift = 16, - SpvFPFastMathModeAllowReassocINTELShift = 17, - SpvFPFastMathModeMax = 0x7fffffff, + SpvFPFastMathModeNotNaNShift = 0, + SpvFPFastMathModeNotInfShift = 1, + SpvFPFastMathModeNSZShift = 2, + SpvFPFastMathModeAllowRecipShift = 3, + SpvFPFastMathModeFastShift = 4, + SpvFPFastMathModeAllowContractFastINTELShift = 16, + SpvFPFastMathModeAllowReassocINTELShift = 17, + SpvFPFastMathModeMax = 0x7fffffff, } SpvFPFastMathModeShift; typedef enum SpvFPFastMathModeMask_ { - SpvFPFastMathModeMaskNone = 0, - SpvFPFastMathModeNotNaNMask = 0x00000001, - SpvFPFastMathModeNotInfMask = 0x00000002, - SpvFPFastMathModeNSZMask = 0x00000004, - SpvFPFastMathModeAllowRecipMask = 0x00000008, - SpvFPFastMathModeFastMask = 0x00000010, - SpvFPFastMathModeAllowContractFastINTELMask = 0x00010000, - SpvFPFastMathModeAllowReassocINTELMask = 0x00020000, + SpvFPFastMathModeMaskNone = 0, + SpvFPFastMathModeNotNaNMask = 0x00000001, + SpvFPFastMathModeNotInfMask = 0x00000002, + SpvFPFastMathModeNSZMask = 0x00000004, + SpvFPFastMathModeAllowRecipMask = 0x00000008, + SpvFPFastMathModeFastMask = 0x00000010, + SpvFPFastMathModeAllowContractFastINTELMask = 0x00010000, + SpvFPFastMathModeAllowReassocINTELMask = 0x00020000, } SpvFPFastMathModeMask; typedef enum SpvFPRoundingMode_ { - SpvFPRoundingModeRTE = 0, - SpvFPRoundingModeRTZ = 1, - SpvFPRoundingModeRTP = 2, - SpvFPRoundingModeRTN = 3, - SpvFPRoundingModeMax = 0x7fffffff, + SpvFPRoundingModeRTE = 0, + SpvFPRoundingModeRTZ = 1, + SpvFPRoundingModeRTP = 2, + SpvFPRoundingModeRTN = 3, + SpvFPRoundingModeMax = 0x7fffffff, } SpvFPRoundingMode; typedef enum SpvLinkageType_ { - SpvLinkageTypeExport = 0, - SpvLinkageTypeImport = 1, - SpvLinkageTypeLinkOnceODR = 2, - SpvLinkageTypeMax = 0x7fffffff, + SpvLinkageTypeExport = 0, + SpvLinkageTypeImport = 1, + SpvLinkageTypeLinkOnceODR = 2, + SpvLinkageTypeMax = 0x7fffffff, } SpvLinkageType; typedef enum SpvAccessQualifier_ { - SpvAccessQualifierReadOnly = 0, - SpvAccessQualifierWriteOnly = 1, - SpvAccessQualifierReadWrite = 2, - SpvAccessQualifierMax = 0x7fffffff, + SpvAccessQualifierReadOnly = 0, + SpvAccessQualifierWriteOnly = 1, + SpvAccessQualifierReadWrite = 2, + SpvAccessQualifierMax = 0x7fffffff, } SpvAccessQualifier; typedef enum SpvFunctionParameterAttribute_ { @@ -730,6 +733,7 @@ typedef enum SpvBuiltIn_ { SpvBuiltInHitKindKHR = 5333, SpvBuiltInHitKindNV = 5333, SpvBuiltInCurrentRayTimeNV = 5334, + SpvBuiltInHitTriangleVertexPositionsKHR = 5335, SpvBuiltInIncomingRayFlagsKHR = 5351, SpvBuiltInIncomingRayFlagsNV = 5351, SpvBuiltInRayGeometryIndexKHR = 5352, @@ -742,15 +746,15 @@ typedef enum SpvBuiltIn_ { } SpvBuiltIn; typedef enum SpvSelectionControlShift_ { - SpvSelectionControlFlattenShift = 0, - SpvSelectionControlDontFlattenShift = 1, - SpvSelectionControlMax = 0x7fffffff, + SpvSelectionControlFlattenShift = 0, + SpvSelectionControlDontFlattenShift = 1, + SpvSelectionControlMax = 0x7fffffff, } SpvSelectionControlShift; typedef enum SpvSelectionControlMask_ { - SpvSelectionControlMaskNone = 0, - SpvSelectionControlFlattenMask = 0x00000001, - SpvSelectionControlDontFlattenMask = 0x00000002, + SpvSelectionControlMaskNone = 0, + SpvSelectionControlFlattenMask = 0x00000001, + SpvSelectionControlDontFlattenMask = 0x00000002, } SpvSelectionControlMask; typedef enum SpvLoopControlShift_ { @@ -800,133 +804,133 @@ typedef enum SpvLoopControlMask_ { } SpvLoopControlMask; typedef enum SpvFunctionControlShift_ { - SpvFunctionControlInlineShift = 0, - SpvFunctionControlDontInlineShift = 1, - SpvFunctionControlPureShift = 2, - SpvFunctionControlConstShift = 3, - SpvFunctionControlOptNoneINTELShift = 16, - SpvFunctionControlMax = 0x7fffffff, + SpvFunctionControlInlineShift = 0, + SpvFunctionControlDontInlineShift = 1, + SpvFunctionControlPureShift = 2, + SpvFunctionControlConstShift = 3, + SpvFunctionControlOptNoneINTELShift = 16, + SpvFunctionControlMax = 0x7fffffff, } SpvFunctionControlShift; typedef enum SpvFunctionControlMask_ { - SpvFunctionControlMaskNone = 0, - SpvFunctionControlInlineMask = 0x00000001, - SpvFunctionControlDontInlineMask = 0x00000002, - SpvFunctionControlPureMask = 0x00000004, - SpvFunctionControlConstMask = 0x00000008, - SpvFunctionControlOptNoneINTELMask = 0x00010000, + SpvFunctionControlMaskNone = 0, + SpvFunctionControlInlineMask = 0x00000001, + SpvFunctionControlDontInlineMask = 0x00000002, + SpvFunctionControlPureMask = 0x00000004, + SpvFunctionControlConstMask = 0x00000008, + SpvFunctionControlOptNoneINTELMask = 0x00010000, } SpvFunctionControlMask; typedef enum SpvMemorySemanticsShift_ { - SpvMemorySemanticsAcquireShift = 1, - SpvMemorySemanticsReleaseShift = 2, - SpvMemorySemanticsAcquireReleaseShift = 3, - SpvMemorySemanticsSequentiallyConsistentShift = 4, - SpvMemorySemanticsUniformMemoryShift = 6, - SpvMemorySemanticsSubgroupMemoryShift = 7, - SpvMemorySemanticsWorkgroupMemoryShift = 8, - SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, - SpvMemorySemanticsAtomicCounterMemoryShift = 10, - SpvMemorySemanticsImageMemoryShift = 11, - SpvMemorySemanticsOutputMemoryShift = 12, - SpvMemorySemanticsOutputMemoryKHRShift = 12, - SpvMemorySemanticsMakeAvailableShift = 13, - SpvMemorySemanticsMakeAvailableKHRShift = 13, - SpvMemorySemanticsMakeVisibleShift = 14, - SpvMemorySemanticsMakeVisibleKHRShift = 14, - SpvMemorySemanticsVolatileShift = 15, - SpvMemorySemanticsMax = 0x7fffffff, + SpvMemorySemanticsAcquireShift = 1, + SpvMemorySemanticsReleaseShift = 2, + SpvMemorySemanticsAcquireReleaseShift = 3, + SpvMemorySemanticsSequentiallyConsistentShift = 4, + SpvMemorySemanticsUniformMemoryShift = 6, + SpvMemorySemanticsSubgroupMemoryShift = 7, + SpvMemorySemanticsWorkgroupMemoryShift = 8, + SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, + SpvMemorySemanticsAtomicCounterMemoryShift = 10, + SpvMemorySemanticsImageMemoryShift = 11, + SpvMemorySemanticsOutputMemoryShift = 12, + SpvMemorySemanticsOutputMemoryKHRShift = 12, + SpvMemorySemanticsMakeAvailableShift = 13, + SpvMemorySemanticsMakeAvailableKHRShift = 13, + SpvMemorySemanticsMakeVisibleShift = 14, + SpvMemorySemanticsMakeVisibleKHRShift = 14, + SpvMemorySemanticsVolatileShift = 15, + SpvMemorySemanticsMax = 0x7fffffff, } SpvMemorySemanticsShift; typedef enum SpvMemorySemanticsMask_ { - SpvMemorySemanticsMaskNone = 0, - SpvMemorySemanticsAcquireMask = 0x00000002, - SpvMemorySemanticsReleaseMask = 0x00000004, - SpvMemorySemanticsAcquireReleaseMask = 0x00000008, - SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010, - SpvMemorySemanticsUniformMemoryMask = 0x00000040, - SpvMemorySemanticsSubgroupMemoryMask = 0x00000080, - SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100, - SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, - SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, - SpvMemorySemanticsImageMemoryMask = 0x00000800, - SpvMemorySemanticsOutputMemoryMask = 0x00001000, - SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000, - SpvMemorySemanticsMakeAvailableMask = 0x00002000, - SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000, - SpvMemorySemanticsMakeVisibleMask = 0x00004000, - SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000, - SpvMemorySemanticsVolatileMask = 0x00008000, + SpvMemorySemanticsMaskNone = 0, + SpvMemorySemanticsAcquireMask = 0x00000002, + SpvMemorySemanticsReleaseMask = 0x00000004, + SpvMemorySemanticsAcquireReleaseMask = 0x00000008, + SpvMemorySemanticsSequentiallyConsistentMask = 0x00000010, + SpvMemorySemanticsUniformMemoryMask = 0x00000040, + SpvMemorySemanticsSubgroupMemoryMask = 0x00000080, + SpvMemorySemanticsWorkgroupMemoryMask = 0x00000100, + SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, + SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, + SpvMemorySemanticsImageMemoryMask = 0x00000800, + SpvMemorySemanticsOutputMemoryMask = 0x00001000, + SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000, + SpvMemorySemanticsMakeAvailableMask = 0x00002000, + SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000, + SpvMemorySemanticsMakeVisibleMask = 0x00004000, + SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000, + SpvMemorySemanticsVolatileMask = 0x00008000, } SpvMemorySemanticsMask; typedef enum SpvMemoryAccessShift_ { - SpvMemoryAccessVolatileShift = 0, - SpvMemoryAccessAlignedShift = 1, - SpvMemoryAccessNontemporalShift = 2, - SpvMemoryAccessMakePointerAvailableShift = 3, - SpvMemoryAccessMakePointerAvailableKHRShift = 3, - SpvMemoryAccessMakePointerVisibleShift = 4, - SpvMemoryAccessMakePointerVisibleKHRShift = 4, - SpvMemoryAccessNonPrivatePointerShift = 5, - SpvMemoryAccessNonPrivatePointerKHRShift = 5, - SpvMemoryAccessAliasScopeINTELMaskShift = 16, - SpvMemoryAccessNoAliasINTELMaskShift = 17, - SpvMemoryAccessMax = 0x7fffffff, + SpvMemoryAccessVolatileShift = 0, + SpvMemoryAccessAlignedShift = 1, + SpvMemoryAccessNontemporalShift = 2, + SpvMemoryAccessMakePointerAvailableShift = 3, + SpvMemoryAccessMakePointerAvailableKHRShift = 3, + SpvMemoryAccessMakePointerVisibleShift = 4, + SpvMemoryAccessMakePointerVisibleKHRShift = 4, + SpvMemoryAccessNonPrivatePointerShift = 5, + SpvMemoryAccessNonPrivatePointerKHRShift = 5, + SpvMemoryAccessAliasScopeINTELMaskShift = 16, + SpvMemoryAccessNoAliasINTELMaskShift = 17, + SpvMemoryAccessMax = 0x7fffffff, } SpvMemoryAccessShift; typedef enum SpvMemoryAccessMask_ { - SpvMemoryAccessMaskNone = 0, - SpvMemoryAccessVolatileMask = 0x00000001, - SpvMemoryAccessAlignedMask = 0x00000002, - SpvMemoryAccessNontemporalMask = 0x00000004, - SpvMemoryAccessMakePointerAvailableMask = 0x00000008, - SpvMemoryAccessMakePointerAvailableKHRMask = 0x00000008, - SpvMemoryAccessMakePointerVisibleMask = 0x00000010, - SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010, - SpvMemoryAccessNonPrivatePointerMask = 0x00000020, - SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020, - SpvMemoryAccessAliasScopeINTELMaskMask = 0x00010000, - SpvMemoryAccessNoAliasINTELMaskMask = 0x00020000, + SpvMemoryAccessMaskNone = 0, + SpvMemoryAccessVolatileMask = 0x00000001, + SpvMemoryAccessAlignedMask = 0x00000002, + SpvMemoryAccessNontemporalMask = 0x00000004, + SpvMemoryAccessMakePointerAvailableMask = 0x00000008, + SpvMemoryAccessMakePointerAvailableKHRMask = 0x00000008, + SpvMemoryAccessMakePointerVisibleMask = 0x00000010, + SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010, + SpvMemoryAccessNonPrivatePointerMask = 0x00000020, + SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020, + SpvMemoryAccessAliasScopeINTELMaskMask = 0x00010000, + SpvMemoryAccessNoAliasINTELMaskMask = 0x00020000, } SpvMemoryAccessMask; typedef enum SpvScope_ { - SpvScopeCrossDevice = 0, - SpvScopeDevice = 1, - SpvScopeWorkgroup = 2, - SpvScopeSubgroup = 3, - SpvScopeInvocation = 4, - SpvScopeQueueFamily = 5, - SpvScopeQueueFamilyKHR = 5, - SpvScopeShaderCallKHR = 6, - SpvScopeMax = 0x7fffffff, + SpvScopeCrossDevice = 0, + SpvScopeDevice = 1, + SpvScopeWorkgroup = 2, + SpvScopeSubgroup = 3, + SpvScopeInvocation = 4, + SpvScopeQueueFamily = 5, + SpvScopeQueueFamilyKHR = 5, + SpvScopeShaderCallKHR = 6, + SpvScopeMax = 0x7fffffff, } SpvScope; typedef enum SpvGroupOperation_ { - SpvGroupOperationReduce = 0, - SpvGroupOperationInclusiveScan = 1, - SpvGroupOperationExclusiveScan = 2, - SpvGroupOperationClusteredReduce = 3, - SpvGroupOperationPartitionedReduceNV = 6, - SpvGroupOperationPartitionedInclusiveScanNV = 7, - SpvGroupOperationPartitionedExclusiveScanNV = 8, - SpvGroupOperationMax = 0x7fffffff, + SpvGroupOperationReduce = 0, + SpvGroupOperationInclusiveScan = 1, + SpvGroupOperationExclusiveScan = 2, + SpvGroupOperationClusteredReduce = 3, + SpvGroupOperationPartitionedReduceNV = 6, + SpvGroupOperationPartitionedInclusiveScanNV = 7, + SpvGroupOperationPartitionedExclusiveScanNV = 8, + SpvGroupOperationMax = 0x7fffffff, } SpvGroupOperation; typedef enum SpvKernelEnqueueFlags_ { - SpvKernelEnqueueFlagsNoWait = 0, - SpvKernelEnqueueFlagsWaitKernel = 1, - SpvKernelEnqueueFlagsWaitWorkGroup = 2, - SpvKernelEnqueueFlagsMax = 0x7fffffff, + SpvKernelEnqueueFlagsNoWait = 0, + SpvKernelEnqueueFlagsWaitKernel = 1, + SpvKernelEnqueueFlagsWaitWorkGroup = 2, + SpvKernelEnqueueFlagsMax = 0x7fffffff, } SpvKernelEnqueueFlags; typedef enum SpvKernelProfilingInfoShift_ { - SpvKernelProfilingInfoCmdExecTimeShift = 0, - SpvKernelProfilingInfoMax = 0x7fffffff, + SpvKernelProfilingInfoCmdExecTimeShift = 0, + SpvKernelProfilingInfoMax = 0x7fffffff, } SpvKernelProfilingInfoShift; typedef enum SpvKernelProfilingInfoMask_ { - SpvKernelProfilingInfoMaskNone = 0, - SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001, + SpvKernelProfilingInfoMaskNone = 0, + SpvKernelProfilingInfoCmdExecTimeMask = 0x00000001, } SpvKernelProfilingInfoMask; typedef enum SpvCapability_ { @@ -1086,6 +1090,7 @@ typedef enum SpvCapability_ { SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, SpvCapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SpvCapabilityRayTracingPositionFetchKHR = 5336, SpvCapabilityRayTracingNV = 5340, SpvCapabilityRayTracingMotionBlurNV = 5341, SpvCapabilityVulkanMemoryModel = 5345, @@ -1106,6 +1111,7 @@ typedef enum SpvCapability_ { SpvCapabilityRayTracingOpacityMicromapEXT = 5381, SpvCapabilityShaderInvocationReorderNV = 5383, SpvCapabilityBindlessTextureNV = 5390, + SpvCapabilityRayQueryPositionFetchKHR = 5391, SpvCapabilitySubgroupShuffleINTEL = 5568, SpvCapabilitySubgroupBufferBlockIOINTEL = 5569, SpvCapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1157,6 +1163,7 @@ typedef enum SpvCapability_ { SpvCapabilityDotProduct = 6019, SpvCapabilityDotProductKHR = 6019, SpvCapabilityRayCullMaskKHR = 6020, + SpvCapabilityCooperativeMatrixKHR = 6022, SpvCapabilityBitInstructions = 6025, SpvCapabilityGroupNonUniformRotateKHR = 6026, SpvCapabilityAtomicFloat32AddEXT = 6033, @@ -1205,78 +1212,112 @@ typedef enum SpvRayFlagsMask_ { } SpvRayFlagsMask; typedef enum SpvRayQueryIntersection_ { - SpvRayQueryIntersectionRayQueryCandidateIntersectionKHR = 0, - SpvRayQueryIntersectionRayQueryCommittedIntersectionKHR = 1, - SpvRayQueryIntersectionMax = 0x7fffffff, + SpvRayQueryIntersectionRayQueryCandidateIntersectionKHR = 0, + SpvRayQueryIntersectionRayQueryCommittedIntersectionKHR = 1, + SpvRayQueryIntersectionMax = 0x7fffffff, } SpvRayQueryIntersection; typedef enum SpvRayQueryCommittedIntersectionType_ { - SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0, - SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1, - SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2, - SpvRayQueryCommittedIntersectionTypeMax = 0x7fffffff, + SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0, + SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = + 1, + SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = + 2, + SpvRayQueryCommittedIntersectionTypeMax = 0x7fffffff, } SpvRayQueryCommittedIntersectionType; typedef enum SpvRayQueryCandidateIntersectionType_ { - SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0, - SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1, - SpvRayQueryCandidateIntersectionTypeMax = 0x7fffffff, + SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = + 0, + SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1, + SpvRayQueryCandidateIntersectionTypeMax = 0x7fffffff, } SpvRayQueryCandidateIntersectionType; typedef enum SpvFragmentShadingRateShift_ { - SpvFragmentShadingRateVertical2PixelsShift = 0, - SpvFragmentShadingRateVertical4PixelsShift = 1, - SpvFragmentShadingRateHorizontal2PixelsShift = 2, - SpvFragmentShadingRateHorizontal4PixelsShift = 3, - SpvFragmentShadingRateMax = 0x7fffffff, + SpvFragmentShadingRateVertical2PixelsShift = 0, + SpvFragmentShadingRateVertical4PixelsShift = 1, + SpvFragmentShadingRateHorizontal2PixelsShift = 2, + SpvFragmentShadingRateHorizontal4PixelsShift = 3, + SpvFragmentShadingRateMax = 0x7fffffff, } SpvFragmentShadingRateShift; typedef enum SpvFragmentShadingRateMask_ { - SpvFragmentShadingRateMaskNone = 0, - SpvFragmentShadingRateVertical2PixelsMask = 0x00000001, - SpvFragmentShadingRateVertical4PixelsMask = 0x00000002, - SpvFragmentShadingRateHorizontal2PixelsMask = 0x00000004, - SpvFragmentShadingRateHorizontal4PixelsMask = 0x00000008, + SpvFragmentShadingRateMaskNone = 0, + SpvFragmentShadingRateVertical2PixelsMask = 0x00000001, + SpvFragmentShadingRateVertical4PixelsMask = 0x00000002, + SpvFragmentShadingRateHorizontal2PixelsMask = 0x00000004, + SpvFragmentShadingRateHorizontal4PixelsMask = 0x00000008, } SpvFragmentShadingRateMask; typedef enum SpvFPDenormMode_ { - SpvFPDenormModePreserve = 0, - SpvFPDenormModeFlushToZero = 1, - SpvFPDenormModeMax = 0x7fffffff, + SpvFPDenormModePreserve = 0, + SpvFPDenormModeFlushToZero = 1, + SpvFPDenormModeMax = 0x7fffffff, } SpvFPDenormMode; typedef enum SpvFPOperationMode_ { - SpvFPOperationModeIEEE = 0, - SpvFPOperationModeALT = 1, - SpvFPOperationModeMax = 0x7fffffff, + SpvFPOperationModeIEEE = 0, + SpvFPOperationModeALT = 1, + SpvFPOperationModeMax = 0x7fffffff, } SpvFPOperationMode; typedef enum SpvQuantizationModes_ { - SpvQuantizationModesTRN = 0, - SpvQuantizationModesTRN_ZERO = 1, - SpvQuantizationModesRND = 2, - SpvQuantizationModesRND_ZERO = 3, - SpvQuantizationModesRND_INF = 4, - SpvQuantizationModesRND_MIN_INF = 5, - SpvQuantizationModesRND_CONV = 6, - SpvQuantizationModesRND_CONV_ODD = 7, - SpvQuantizationModesMax = 0x7fffffff, + SpvQuantizationModesTRN = 0, + SpvQuantizationModesTRN_ZERO = 1, + SpvQuantizationModesRND = 2, + SpvQuantizationModesRND_ZERO = 3, + SpvQuantizationModesRND_INF = 4, + SpvQuantizationModesRND_MIN_INF = 5, + SpvQuantizationModesRND_CONV = 6, + SpvQuantizationModesRND_CONV_ODD = 7, + SpvQuantizationModesMax = 0x7fffffff, } SpvQuantizationModes; typedef enum SpvOverflowModes_ { - SpvOverflowModesWRAP = 0, - SpvOverflowModesSAT = 1, - SpvOverflowModesSAT_ZERO = 2, - SpvOverflowModesSAT_SYM = 3, - SpvOverflowModesMax = 0x7fffffff, + SpvOverflowModesWRAP = 0, + SpvOverflowModesSAT = 1, + SpvOverflowModesSAT_ZERO = 2, + SpvOverflowModesSAT_SYM = 3, + SpvOverflowModesMax = 0x7fffffff, } SpvOverflowModes; typedef enum SpvPackedVectorFormat_ { - SpvPackedVectorFormatPackedVectorFormat4x8Bit = 0, - SpvPackedVectorFormatPackedVectorFormat4x8BitKHR = 0, - SpvPackedVectorFormatMax = 0x7fffffff, + SpvPackedVectorFormatPackedVectorFormat4x8Bit = 0, + SpvPackedVectorFormatPackedVectorFormat4x8BitKHR = 0, + SpvPackedVectorFormatMax = 0x7fffffff, } SpvPackedVectorFormat; +typedef enum SpvCooperativeMatrixOperandsShift_ { + SpvCooperativeMatrixOperandsMatrixASignedComponentsShift = 0, + SpvCooperativeMatrixOperandsMatrixBSignedComponentsShift = 1, + SpvCooperativeMatrixOperandsMatrixCSignedComponentsShift = 2, + SpvCooperativeMatrixOperandsMatrixResultSignedComponentsShift = 3, + SpvCooperativeMatrixOperandsSaturatingAccumulationShift = 4, + SpvCooperativeMatrixOperandsMax = 0x7fffffff, +} SpvCooperativeMatrixOperandsShift; + +typedef enum SpvCooperativeMatrixOperandsMask_ { + SpvCooperativeMatrixOperandsMaskNone = 0, + SpvCooperativeMatrixOperandsMatrixASignedComponentsMask = 0x00000001, + SpvCooperativeMatrixOperandsMatrixBSignedComponentsMask = 0x00000002, + SpvCooperativeMatrixOperandsMatrixCSignedComponentsMask = 0x00000004, + SpvCooperativeMatrixOperandsMatrixResultSignedComponentsMask = 0x00000008, + SpvCooperativeMatrixOperandsSaturatingAccumulationMask = 0x00000010, +} SpvCooperativeMatrixOperandsMask; + +typedef enum SpvCooperativeMatrixLayout_ { + SpvCooperativeMatrixLayoutRowMajorKHR = 0, + SpvCooperativeMatrixLayoutColumnMajorKHR = 1, + SpvCooperativeMatrixLayoutMax = 0x7fffffff, +} SpvCooperativeMatrixLayout; + +typedef enum SpvCooperativeMatrixUse_ { + SpvCooperativeMatrixUseMatrixAKHR = 0, + SpvCooperativeMatrixUseMatrixBKHR = 1, + SpvCooperativeMatrixUseMatrixAccumulatorKHR = 2, + SpvCooperativeMatrixUseMax = 0x7fffffff, +} SpvCooperativeMatrixUse; + typedef enum SpvOp_ { SpvOpNop = 0, SpvOpUndef = 1, @@ -1650,6 +1691,11 @@ typedef enum SpvOp_ { SpvOpUDotAccSatKHR = 4454, SpvOpSUDotAccSat = 4455, SpvOpSUDotAccSatKHR = 4455, + SpvOpTypeCooperativeMatrixKHR = 4456, + SpvOpCooperativeMatrixLoadKHR = 4457, + SpvOpCooperativeMatrixStoreKHR = 4458, + SpvOpCooperativeMatrixMulAddKHR = 4459, + SpvOpCooperativeMatrixLengthKHR = 4460, SpvOpTypeRayQueryKHR = 4472, SpvOpRayQueryInitializeKHR = 4473, SpvOpRayQueryTerminateKHR = 4474, @@ -1717,6 +1763,7 @@ typedef enum SpvOp_ { SpvOpTraceNV = 5337, SpvOpTraceMotionNV = 5338, SpvOpTraceRayMotionNV = 5339, + SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, SpvOpTypeAccelerationStructureKHR = 5341, SpvOpTypeAccelerationStructureNV = 5341, SpvOpExecuteCallableNV = 5344, @@ -2002,354 +2049,1388 @@ typedef enum SpvOp_ { #ifndef __cplusplus #include <stdbool.h> #endif -inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultType) { - *hasResult = *hasResultType = false; - switch (opcode) { - default: /* unknown opcode */ break; - case SpvOpNop: *hasResult = false; *hasResultType = false; break; - case SpvOpUndef: *hasResult = true; *hasResultType = true; break; - case SpvOpSourceContinued: *hasResult = false; *hasResultType = false; break; - case SpvOpSource: *hasResult = false; *hasResultType = false; break; - case SpvOpSourceExtension: *hasResult = false; *hasResultType = false; break; - case SpvOpName: *hasResult = false; *hasResultType = false; break; - case SpvOpMemberName: *hasResult = false; *hasResultType = false; break; - case SpvOpString: *hasResult = true; *hasResultType = false; break; - case SpvOpLine: *hasResult = false; *hasResultType = false; break; - case SpvOpExtension: *hasResult = false; *hasResultType = false; break; - case SpvOpExtInstImport: *hasResult = true; *hasResultType = false; break; - case SpvOpExtInst: *hasResult = true; *hasResultType = true; break; - case SpvOpMemoryModel: *hasResult = false; *hasResultType = false; break; - case SpvOpEntryPoint: *hasResult = false; *hasResultType = false; break; - case SpvOpExecutionMode: *hasResult = false; *hasResultType = false; break; - case SpvOpCapability: *hasResult = false; *hasResultType = false; break; - case SpvOpTypeVoid: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeBool: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeInt: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeFloat: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeVector: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeMatrix: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeImage: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeSampler: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeSampledImage: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeArray: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeStruct: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeOpaque: *hasResult = true; *hasResultType = false; break; - case SpvOpTypePointer: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeFunction: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeEvent: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeReserveId: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeQueue: *hasResult = true; *hasResultType = false; break; - case SpvOpTypePipe: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeForwardPointer: *hasResult = false; *hasResultType = false; break; - case SpvOpConstantTrue: *hasResult = true; *hasResultType = true; break; - case SpvOpConstantFalse: *hasResult = true; *hasResultType = true; break; - case SpvOpConstant: *hasResult = true; *hasResultType = true; break; - case SpvOpConstantComposite: *hasResult = true; *hasResultType = true; break; - case SpvOpConstantSampler: *hasResult = true; *hasResultType = true; break; - case SpvOpConstantNull: *hasResult = true; *hasResultType = true; break; - case SpvOpSpecConstantTrue: *hasResult = true; *hasResultType = true; break; - case SpvOpSpecConstantFalse: *hasResult = true; *hasResultType = true; break; - case SpvOpSpecConstant: *hasResult = true; *hasResultType = true; break; - case SpvOpSpecConstantComposite: *hasResult = true; *hasResultType = true; break; - case SpvOpSpecConstantOp: *hasResult = true; *hasResultType = true; break; - case SpvOpFunction: *hasResult = true; *hasResultType = true; break; - case SpvOpFunctionParameter: *hasResult = true; *hasResultType = true; break; - case SpvOpFunctionEnd: *hasResult = false; *hasResultType = false; break; - case SpvOpFunctionCall: *hasResult = true; *hasResultType = true; break; - case SpvOpVariable: *hasResult = true; *hasResultType = true; break; - case SpvOpImageTexelPointer: *hasResult = true; *hasResultType = true; break; - case SpvOpLoad: *hasResult = true; *hasResultType = true; break; - case SpvOpStore: *hasResult = false; *hasResultType = false; break; - case SpvOpCopyMemory: *hasResult = false; *hasResultType = false; break; - case SpvOpCopyMemorySized: *hasResult = false; *hasResultType = false; break; - case SpvOpAccessChain: *hasResult = true; *hasResultType = true; break; - case SpvOpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break; - case SpvOpPtrAccessChain: *hasResult = true; *hasResultType = true; break; - case SpvOpArrayLength: *hasResult = true; *hasResultType = true; break; - case SpvOpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break; - case SpvOpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break; - case SpvOpDecorate: *hasResult = false; *hasResultType = false; break; - case SpvOpMemberDecorate: *hasResult = false; *hasResultType = false; break; - case SpvOpDecorationGroup: *hasResult = true; *hasResultType = false; break; - case SpvOpGroupDecorate: *hasResult = false; *hasResultType = false; break; - case SpvOpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break; - case SpvOpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break; - case SpvOpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break; - case SpvOpVectorShuffle: *hasResult = true; *hasResultType = true; break; - case SpvOpCompositeConstruct: *hasResult = true; *hasResultType = true; break; - case SpvOpCompositeExtract: *hasResult = true; *hasResultType = true; break; - case SpvOpCompositeInsert: *hasResult = true; *hasResultType = true; break; - case SpvOpCopyObject: *hasResult = true; *hasResultType = true; break; - case SpvOpTranspose: *hasResult = true; *hasResultType = true; break; - case SpvOpSampledImage: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageFetch: *hasResult = true; *hasResultType = true; break; - case SpvOpImageGather: *hasResult = true; *hasResultType = true; break; - case SpvOpImageDrefGather: *hasResult = true; *hasResultType = true; break; - case SpvOpImageRead: *hasResult = true; *hasResultType = true; break; - case SpvOpImageWrite: *hasResult = false; *hasResultType = false; break; - case SpvOpImage: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQueryFormat: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQueryOrder: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQuerySize: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQueryLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQueryLevels: *hasResult = true; *hasResultType = true; break; - case SpvOpImageQuerySamples: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertFToU: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertFToS: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertSToF: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertUToF: *hasResult = true; *hasResultType = true; break; - case SpvOpUConvert: *hasResult = true; *hasResultType = true; break; - case SpvOpSConvert: *hasResult = true; *hasResultType = true; break; - case SpvOpFConvert: *hasResult = true; *hasResultType = true; break; - case SpvOpQuantizeToF16: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertPtrToU: *hasResult = true; *hasResultType = true; break; - case SpvOpSatConvertSToU: *hasResult = true; *hasResultType = true; break; - case SpvOpSatConvertUToS: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertUToPtr: *hasResult = true; *hasResultType = true; break; - case SpvOpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break; - case SpvOpGenericCastToPtr: *hasResult = true; *hasResultType = true; break; - case SpvOpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break; - case SpvOpBitcast: *hasResult = true; *hasResultType = true; break; - case SpvOpSNegate: *hasResult = true; *hasResultType = true; break; - case SpvOpFNegate: *hasResult = true; *hasResultType = true; break; - case SpvOpIAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpFAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpISub: *hasResult = true; *hasResultType = true; break; - case SpvOpFSub: *hasResult = true; *hasResultType = true; break; - case SpvOpIMul: *hasResult = true; *hasResultType = true; break; - case SpvOpFMul: *hasResult = true; *hasResultType = true; break; - case SpvOpUDiv: *hasResult = true; *hasResultType = true; break; - case SpvOpSDiv: *hasResult = true; *hasResultType = true; break; - case SpvOpFDiv: *hasResult = true; *hasResultType = true; break; - case SpvOpUMod: *hasResult = true; *hasResultType = true; break; - case SpvOpSRem: *hasResult = true; *hasResultType = true; break; - case SpvOpSMod: *hasResult = true; *hasResultType = true; break; - case SpvOpFRem: *hasResult = true; *hasResultType = true; break; - case SpvOpFMod: *hasResult = true; *hasResultType = true; break; - case SpvOpVectorTimesScalar: *hasResult = true; *hasResultType = true; break; - case SpvOpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break; - case SpvOpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break; - case SpvOpMatrixTimesVector: *hasResult = true; *hasResultType = true; break; - case SpvOpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break; - case SpvOpOuterProduct: *hasResult = true; *hasResultType = true; break; - case SpvOpDot: *hasResult = true; *hasResultType = true; break; - case SpvOpIAddCarry: *hasResult = true; *hasResultType = true; break; - case SpvOpISubBorrow: *hasResult = true; *hasResultType = true; break; - case SpvOpUMulExtended: *hasResult = true; *hasResultType = true; break; - case SpvOpSMulExtended: *hasResult = true; *hasResultType = true; break; - case SpvOpAny: *hasResult = true; *hasResultType = true; break; - case SpvOpAll: *hasResult = true; *hasResultType = true; break; - case SpvOpIsNan: *hasResult = true; *hasResultType = true; break; - case SpvOpIsInf: *hasResult = true; *hasResultType = true; break; - case SpvOpIsFinite: *hasResult = true; *hasResultType = true; break; - case SpvOpIsNormal: *hasResult = true; *hasResultType = true; break; - case SpvOpSignBitSet: *hasResult = true; *hasResultType = true; break; - case SpvOpLessOrGreater: *hasResult = true; *hasResultType = true; break; - case SpvOpOrdered: *hasResult = true; *hasResultType = true; break; - case SpvOpUnordered: *hasResult = true; *hasResultType = true; break; - case SpvOpLogicalEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpLogicalNotEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpLogicalOr: *hasResult = true; *hasResultType = true; break; - case SpvOpLogicalAnd: *hasResult = true; *hasResultType = true; break; - case SpvOpLogicalNot: *hasResult = true; *hasResultType = true; break; - case SpvOpSelect: *hasResult = true; *hasResultType = true; break; - case SpvOpIEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpINotEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpUGreaterThan: *hasResult = true; *hasResultType = true; break; - case SpvOpSGreaterThan: *hasResult = true; *hasResultType = true; break; - case SpvOpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpULessThan: *hasResult = true; *hasResultType = true; break; - case SpvOpSLessThan: *hasResult = true; *hasResultType = true; break; - case SpvOpULessThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpSLessThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFOrdEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFUnordEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFOrdNotEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFUnordNotEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFOrdLessThan: *hasResult = true; *hasResultType = true; break; - case SpvOpFUnordLessThan: *hasResult = true; *hasResultType = true; break; - case SpvOpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break; - case SpvOpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break; - case SpvOpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpShiftRightLogical: *hasResult = true; *hasResultType = true; break; - case SpvOpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break; - case SpvOpShiftLeftLogical: *hasResult = true; *hasResultType = true; break; - case SpvOpBitwiseOr: *hasResult = true; *hasResultType = true; break; - case SpvOpBitwiseXor: *hasResult = true; *hasResultType = true; break; - case SpvOpBitwiseAnd: *hasResult = true; *hasResultType = true; break; - case SpvOpNot: *hasResult = true; *hasResultType = true; break; - case SpvOpBitFieldInsert: *hasResult = true; *hasResultType = true; break; - case SpvOpBitFieldSExtract: *hasResult = true; *hasResultType = true; break; - case SpvOpBitFieldUExtract: *hasResult = true; *hasResultType = true; break; - case SpvOpBitReverse: *hasResult = true; *hasResultType = true; break; - case SpvOpBitCount: *hasResult = true; *hasResultType = true; break; - case SpvOpDPdx: *hasResult = true; *hasResultType = true; break; - case SpvOpDPdy: *hasResult = true; *hasResultType = true; break; - case SpvOpFwidth: *hasResult = true; *hasResultType = true; break; - case SpvOpDPdxFine: *hasResult = true; *hasResultType = true; break; - case SpvOpDPdyFine: *hasResult = true; *hasResultType = true; break; - case SpvOpFwidthFine: *hasResult = true; *hasResultType = true; break; - case SpvOpDPdxCoarse: *hasResult = true; *hasResultType = true; break; - case SpvOpDPdyCoarse: *hasResult = true; *hasResultType = true; break; - case SpvOpFwidthCoarse: *hasResult = true; *hasResultType = true; break; - case SpvOpEmitVertex: *hasResult = false; *hasResultType = false; break; - case SpvOpEndPrimitive: *hasResult = false; *hasResultType = false; break; - case SpvOpEmitStreamVertex: *hasResult = false; *hasResultType = false; break; - case SpvOpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break; - case SpvOpControlBarrier: *hasResult = false; *hasResultType = false; break; - case SpvOpMemoryBarrier: *hasResult = false; *hasResultType = false; break; - case SpvOpAtomicLoad: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicStore: *hasResult = false; *hasResultType = false; break; - case SpvOpAtomicExchange: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicIIncrement: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicIDecrement: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicIAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicISub: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicSMin: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicUMin: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicSMax: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicUMax: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicAnd: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicOr: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicXor: *hasResult = true; *hasResultType = true; break; - case SpvOpPhi: *hasResult = true; *hasResultType = true; break; - case SpvOpLoopMerge: *hasResult = false; *hasResultType = false; break; - case SpvOpSelectionMerge: *hasResult = false; *hasResultType = false; break; - case SpvOpLabel: *hasResult = true; *hasResultType = false; break; - case SpvOpBranch: *hasResult = false; *hasResultType = false; break; - case SpvOpBranchConditional: *hasResult = false; *hasResultType = false; break; - case SpvOpSwitch: *hasResult = false; *hasResultType = false; break; - case SpvOpKill: *hasResult = false; *hasResultType = false; break; - case SpvOpReturn: *hasResult = false; *hasResultType = false; break; - case SpvOpReturnValue: *hasResult = false; *hasResultType = false; break; - case SpvOpUnreachable: *hasResult = false; *hasResultType = false; break; - case SpvOpLifetimeStart: *hasResult = false; *hasResultType = false; break; - case SpvOpLifetimeStop: *hasResult = false; *hasResultType = false; break; - case SpvOpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupWaitEvents: *hasResult = false; *hasResultType = false; break; - case SpvOpGroupAll: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupAny: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupBroadcast: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupIAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFMin: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupUMin: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupSMin: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFMax: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupUMax: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupSMax: *hasResult = true; *hasResultType = true; break; - case SpvOpReadPipe: *hasResult = true; *hasResultType = true; break; - case SpvOpWritePipe: *hasResult = true; *hasResultType = true; break; - case SpvOpReservedReadPipe: *hasResult = true; *hasResultType = true; break; - case SpvOpReservedWritePipe: *hasResult = true; *hasResultType = true; break; - case SpvOpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; - case SpvOpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; - case SpvOpCommitReadPipe: *hasResult = false; *hasResultType = false; break; - case SpvOpCommitWritePipe: *hasResult = false; *hasResultType = false; break; - case SpvOpIsValidReserveId: *hasResult = true; *hasResultType = true; break; - case SpvOpGetNumPipePackets: *hasResult = true; *hasResultType = true; break; - case SpvOpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break; - case SpvOpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break; - case SpvOpEnqueueMarker: *hasResult = true; *hasResultType = true; break; - case SpvOpEnqueueKernel: *hasResult = true; *hasResultType = true; break; - case SpvOpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break; - case SpvOpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break; - case SpvOpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break; - case SpvOpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break; - case SpvOpRetainEvent: *hasResult = false; *hasResultType = false; break; - case SpvOpReleaseEvent: *hasResult = false; *hasResultType = false; break; - case SpvOpCreateUserEvent: *hasResult = true; *hasResultType = true; break; - case SpvOpIsValidEvent: *hasResult = true; *hasResultType = true; break; - case SpvOpSetUserEventStatus: *hasResult = false; *hasResultType = false; break; - case SpvOpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break; - case SpvOpGetDefaultQueue: *hasResult = true; *hasResultType = true; break; - case SpvOpBuildNDRange: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseFetch: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseGather: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break; - case SpvOpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break; - case SpvOpNoLine: *hasResult = false; *hasResultType = false; break; - case SpvOpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicFlagClear: *hasResult = false; *hasResultType = false; break; - case SpvOpImageSparseRead: *hasResult = true; *hasResultType = true; break; - case SpvOpSizeOf: *hasResult = true; *hasResultType = true; break; - case SpvOpTypePipeStorage: *hasResult = true; *hasResultType = false; break; - case SpvOpConstantPipeStorage: *hasResult = true; *hasResultType = true; break; - case SpvOpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break; - case SpvOpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break; - case SpvOpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break; - case SpvOpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break; - case SpvOpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break; - case SpvOpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break; - case SpvOpModuleProcessed: *hasResult = false; *hasResultType = false; break; - case SpvOpExecutionModeId: *hasResult = false; *hasResultType = false; break; - case SpvOpDecorateId: *hasResult = false; *hasResultType = false; break; - case SpvOpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break; - case SpvOpCopyLogical: *hasResult = true; *hasResultType = true; break; - case SpvOpPtrEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpPtrNotEqual: *hasResult = true; *hasResultType = true; break; - case SpvOpPtrDiff: *hasResult = true; *hasResultType = true; break; +inline void SpvHasResultAndType(SpvOp opcode, bool* hasResult, + bool* hasResultType) { + *hasResult = *hasResultType = false; + switch (opcode) { + default: /* unknown opcode */ + break; + case SpvOpNop: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpUndef: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSourceContinued: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSource: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSourceExtension: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpName: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpMemberName: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpString: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpLine: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpExtension: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpExtInstImport: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpExtInst: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpMemoryModel: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpEntryPoint: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpExecutionMode: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCapability: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTypeVoid: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeBool: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeInt: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeFloat: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeVector: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeMatrix: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeImage: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeSampler: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeSampledImage: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeArray: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeRuntimeArray: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeStruct: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeOpaque: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypePointer: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeFunction: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeEvent: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeDeviceEvent: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeReserveId: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeQueue: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypePipe: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeForwardPointer: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpConstantTrue: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConstantFalse: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConstant: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConstantComposite: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConstantSampler: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConstantNull: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSpecConstantTrue: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSpecConstantFalse: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSpecConstant: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSpecConstantComposite: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSpecConstantOp: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFunction: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFunctionParameter: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFunctionEnd: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpFunctionCall: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpVariable: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageTexelPointer: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLoad: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpStore: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCopyMemory: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCopyMemorySized: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpAccessChain: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpInBoundsAccessChain: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPtrAccessChain: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArrayLength: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGenericPtrMemSemantics: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpInBoundsPtrAccessChain: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDecorate: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpMemberDecorate: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpDecorationGroup: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpGroupDecorate: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGroupMemberDecorate: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpVectorExtractDynamic: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpVectorInsertDynamic: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpVectorShuffle: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCompositeConstruct: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCompositeExtract: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCompositeInsert: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCopyObject: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTranspose: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSampledImage: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleDrefImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleDrefExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleProjImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleProjExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleProjDrefImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSampleProjDrefExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageFetch: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageGather: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageDrefGather: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageRead: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageWrite: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpImage: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQueryFormat: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQueryOrder: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQuerySizeLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQuerySize: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQueryLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQueryLevels: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageQuerySamples: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertFToU: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertFToS: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertSToF: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertUToF: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUConvert: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSConvert: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFConvert: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpQuantizeToF16: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertPtrToU: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSatConvertSToU: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSatConvertUToS: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertUToPtr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPtrCastToGeneric: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGenericCastToPtr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGenericCastToPtrExplicit: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitcast: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSNegate: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFNegate: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpISub: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFSub: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIMul: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFMul: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUDiv: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSDiv: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFDiv: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUMod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSRem: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSMod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFRem: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFMod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpVectorTimesScalar: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpMatrixTimesScalar: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpVectorTimesMatrix: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpMatrixTimesVector: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpMatrixTimesMatrix: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpOuterProduct: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIAddCarry: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpISubBorrow: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUMulExtended: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSMulExtended: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAny: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAll: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIsNan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIsInf: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIsFinite: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIsNormal: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSignBitSet: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLessOrGreater: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpOrdered: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUnordered: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLogicalEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLogicalNotEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLogicalOr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLogicalAnd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLogicalNot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSelect: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpINotEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUGreaterThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSGreaterThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUGreaterThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSGreaterThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpULessThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSLessThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpULessThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSLessThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFOrdEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFUnordEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFOrdNotEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFUnordNotEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFOrdLessThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFUnordLessThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFOrdGreaterThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFUnordGreaterThan: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFOrdLessThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFUnordLessThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFOrdGreaterThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFUnordGreaterThanEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpShiftRightLogical: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpShiftRightArithmetic: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpShiftLeftLogical: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitwiseOr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitwiseXor: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitwiseAnd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpNot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitFieldInsert: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitFieldSExtract: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitFieldUExtract: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitReverse: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBitCount: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDPdx: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDPdy: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFwidth: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDPdxFine: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDPdyFine: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFwidthFine: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDPdxCoarse: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDPdyCoarse: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFwidthCoarse: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpEmitVertex: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpEndPrimitive: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpEmitStreamVertex: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpEndStreamPrimitive: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpControlBarrier: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpMemoryBarrier: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpAtomicLoad: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicStore: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpAtomicExchange: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicCompareExchange: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicCompareExchangeWeak: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicIIncrement: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicIDecrement: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicIAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicISub: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicSMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicUMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicSMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicUMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicAnd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicOr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicXor: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPhi: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLoopMerge: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSelectionMerge: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpLabel: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpBranch: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpBranchConditional: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSwitch: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpKill: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpReturn: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpReturnValue: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpUnreachable: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpLifetimeStart: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpLifetimeStop: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGroupAsyncCopy: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupWaitEvents: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGroupAll: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupAny: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupBroadcast: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupIAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupUMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupSMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupUMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupSMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReadPipe: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpWritePipe: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReservedReadPipe: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReservedWritePipe: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReserveReadPipePackets: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReserveWritePipePackets: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCommitReadPipe: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCommitWritePipe: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpIsValidReserveId: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetNumPipePackets: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetMaxPipePackets: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupReserveReadPipePackets: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupReserveWritePipePackets: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupCommitReadPipe: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGroupCommitWritePipe: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpEnqueueMarker: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpEnqueueKernel: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetKernelNDrangeSubGroupCount: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetKernelNDrangeMaxSubGroupSize: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetKernelWorkGroupSize: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetKernelPreferredWorkGroupSizeMultiple: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRetainEvent: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpReleaseEvent: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCreateUserEvent: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIsValidEvent: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSetUserEventStatus: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCaptureEventProfilingInfo: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGetDefaultQueue: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBuildNDRange: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleDrefImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleDrefExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleProjImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleProjExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleProjDrefImplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseSampleProjDrefExplicitLod: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseFetch: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseGather: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseDrefGather: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpImageSparseTexelsResident: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpNoLine: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpAtomicFlagTestAndSet: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicFlagClear: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpImageSparseRead: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSizeOf: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypePipeStorage: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpConstantPipeStorage: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCreatePipeFromPipeStorage: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetKernelLocalSizeForSubgroupCount: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGetKernelMaxNumSubgroups: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypeNamedBarrier: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpNamedBarrierInitialize: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpMemoryNamedBarrier: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpModuleProcessed: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpExecutionModeId: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpDecorateId: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGroupNonUniformElect: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformAll: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformAny: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformAllEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBroadcast: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBroadcastFirst: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBallot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformInverseBallot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBallotBitExtract: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBallotBitCount: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBallotFindLSB: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBallotFindMSB: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformShuffle: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformShuffleXor: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformShuffleUp: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformShuffleDown: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformIAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformFAdd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformIMul: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformFMul: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformSMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformUMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformFMin: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformSMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformUMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformFMax: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBitwiseAnd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBitwiseOr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformBitwiseXor: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformLogicalAnd: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformLogicalOr: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformLogicalXor: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformQuadBroadcast: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformQuadSwap: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCopyLogical: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPtrEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPtrNotEqual: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPtrDiff: + *hasResult = true; + *hasResultType = true; + break; case SpvOpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; @@ -2362,32 +3443,130 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy *hasResult = true; *hasResultType = true; break; - case SpvOpTerminateInvocation: *hasResult = false; *hasResultType = false; break; - case SpvOpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpTraceRayKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpSDot: *hasResult = true; *hasResultType = true; break; - case SpvOpUDot: *hasResult = true; *hasResultType = true; break; - case SpvOpSUDot: *hasResult = true; *hasResultType = true; break; - case SpvOpSDotAccSat: *hasResult = true; *hasResultType = true; break; - case SpvOpUDotAccSat: *hasResult = true; *hasResultType = true; break; - case SpvOpSUDotAccSat: *hasResult = true; *hasResultType = true; break; - case SpvOpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; - case SpvOpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpTerminateInvocation: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSubgroupBallotKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupFirstInvocationKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAllKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAnyKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAllEqualKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupNonUniformRotateKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupReadInvocationKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTraceRayKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpExecuteCallableKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpConvertUToAccelerationStructureKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIgnoreIntersectionKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTerminateRayKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSDot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUDot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSUDot: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSDotAccSat: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUDotAccSat: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSUDotAccSat: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypeCooperativeMatrixKHR: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpCooperativeMatrixLoadKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCooperativeMatrixStoreKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCooperativeMatrixMulAddKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCooperativeMatrixLengthKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypeRayQueryKHR: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpRayQueryInitializeKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpRayQueryTerminateKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpRayQueryGenerateIntersectionKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpRayQueryConfirmIntersectionKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpRayQueryProceedKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionTypeKHR: + *hasResult = true; + *hasResultType = true; + break; case SpvOpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; @@ -2404,17 +3583,50 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy *hasResult = true; *hasResultType = true; break; - case SpvOpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; - case SpvOpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case SpvOpGroupIAddNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFAddNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFMinNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupUMinNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupSMinNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFMaxNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupUMaxNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupSMaxNonUniformAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFragmentMaskFetchAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFragmentFetchAMD: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReadClockKHR: + *hasResult = true; + *hasResultType = true; + break; case SpvOpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; @@ -2547,7 +3759,10 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy *hasResult = true; *hasResultType = false; break; - case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case SpvOpImageSampleFootprintNV: + *hasResult = true; + *hasResultType = true; + break; case SpvOpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; @@ -2556,271 +3771,1070 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy *hasResult = false; *hasResultType = false; break; - case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; - case SpvOpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case SpvOpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; - case SpvOpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTraceMotionNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; - case SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; - case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; - case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; - case SpvOpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break; - case SpvOpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; - case SpvOpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; - case SpvOpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; - case SpvOpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; - case SpvOpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; - case SpvOpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; - case SpvOpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; - case SpvOpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; - case SpvOpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpAbsISubINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpIAddSatINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpUAddSatINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpIAverageINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpUAverageINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpISubSatINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpAsmINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpAsmCallINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break; - case SpvOpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break; - case SpvOpExpectKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpDecorateString: *hasResult = false; *hasResultType = false; break; - case SpvOpMemberDecorateString: *hasResult = false; *hasResultType = false; break; - case SpvOpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedSinINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedCosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedLogINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFixedExpINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; - case SpvOpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; - case SpvOpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case SpvOpGroupNonUniformPartitionNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpWritePackedPrimitiveIndices4x8NV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpReportIntersectionNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIgnoreIntersectionNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTerminateRayNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTraceNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTraceMotionNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTraceRayMotionNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpRayQueryGetIntersectionTriangleVertexPositionsKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypeAccelerationStructureNV: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpExecuteCallableNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpTypeCooperativeMatrixNV: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpCooperativeMatrixLoadNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCooperativeMatrixStoreNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpCooperativeMatrixMulAddNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCooperativeMatrixLengthNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpBeginInvocationInterlockEXT: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpEndInvocationInterlockEXT: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpDemoteToHelperInvocation: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpIsHelperInvocationEXT: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertUToImageNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertUToSamplerNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertImageToUNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertSamplerToUNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertUToSampledImageNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConvertSampledImageToUNV: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSamplerImageAddressingModeNV: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSubgroupShuffleINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupShuffleDownINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupShuffleUpINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupShuffleXorINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupBlockReadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupBlockWriteINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSubgroupImageBlockReadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupImageBlockWriteINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSubgroupImageMediaBlockReadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupImageMediaBlockWriteINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpUCountLeadingZerosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUCountTrailingZerosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAbsISubINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAbsUSubINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIAddSatINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUAddSatINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIAverageINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUAverageINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIAverageRoundedINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUAverageRoundedINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpISubSatINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUSubSatINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpIMul32x16INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpUMul32x16INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpConstantFunctionPointerINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFunctionPointerCallINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAsmTargetINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAsmINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAsmCallINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicFMinEXT: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicFMaxEXT: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAssumeTrueKHR: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpExpectKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpDecorateString: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpMemberDecorateString: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpVmeImageINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypeVmeImageINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcImePayloadINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcRefPayloadINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcSicPayloadINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcMcePayloadINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcMceResultINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcImeResultINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcImeResultSingleReferenceStreamoutINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcImeResultDualReferenceStreamoutINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcImeSingleReferenceStreaminINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcImeDualReferenceStreaminINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcRefResultINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeAvcSicResultINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetInterShapePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetInterDirectionPenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetAcOnlyHaarINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceConvertToImePayloadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceConvertToImeResultINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceConvertToRefPayloadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceConvertToRefResultINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceConvertToSicPayloadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceConvertToSicResultINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetMotionVectorsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterDistortionsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetBestInterDistortionsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterMajorShapeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterMinorShapeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterDirectionsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterMotionVectorCountINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterReferenceIdsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeInitializeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeSetSingleReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeSetDualReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeRefWindowSizeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeAdjustRefOffsetINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeConvertToMcePayloadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeSetMaxMotionVectorCountINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeSetWeightedSadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeConvertToMceResultINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetSingleReferenceStreaminINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetDualReferenceStreaminINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeStripDualReferenceStreamoutINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetBorderReachedINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcFmeInitializeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcBmeInitializeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefConvertToMcePayloadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefSetBidirectionalMixDisableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefSetBilinearFilterEnableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefEvaluateWithDualReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcRefConvertToMceResultINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicInitializeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicConfigureSkcINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicConfigureIpeLumaINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicConfigureIpeLumaChromaINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetMotionVectorMaskINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicConvertToMcePayloadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicSetBilinearFilterEnableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicEvaluateIpeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicEvaluateWithDualReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicConvertToMceResultINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetIpeLumaShapeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetPackedIpeLumaModesINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetIpeChromaModeINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSubgroupAvcSicGetInterRawSadsINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpVariableLengthArrayINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpSaveMemoryINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRestoreMemoryINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpArbitraryFloatSinCosPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatCastINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatCastFromIntINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatCastToIntINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatAddINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatSubINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatMulINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatDivINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatGTINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatGEINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatLTINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatLEINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatEQINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatRecipINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatRSqrtINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatCbrtINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatHypotINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatSqrtINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatLogINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatLog2INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatLog10INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatLog1pINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatExpINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatExp2INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatExp10INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatExpm1INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatSinINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatCosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatSinCosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatSinPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatCosPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatASinINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatASinPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatACosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatACosPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatATanINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatATanPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatATan2INTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatPowINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatPowRINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpArbitraryFloatPowNINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpLoopControlINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpAliasDomainDeclINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpAliasScopeDeclINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpAliasScopeListDeclINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpFixedSqrtINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedRecipINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedRsqrtINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedSinINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedCosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedSinCosINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedSinPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedCosPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedSinCosPiINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedLogINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFixedExpINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpPtrCastToCrossWorkgroupINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpCrossWorkgroupCastToPtrINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpReadPipeBlockingINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpWritePipeBlockingINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpFPGARegINTEL: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetRayTMinKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetRayFlagsKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionTKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionInstanceIdKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionGeometryIndexKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionPrimitiveIndexKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionBarycentricsKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionFrontFaceKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionObjectRayDirectionKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionObjectRayOriginKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetWorldRayDirectionKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetWorldRayOriginKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionObjectToWorldKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpRayQueryGetIntersectionWorldToObjectKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpAtomicFAddEXT: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpTypeBufferSurfaceINTEL: + *hasResult = true; + *hasResultType = false; + break; + case SpvOpTypeStructContinuedINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpConstantCompositeContinuedINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpSpecConstantCompositeContinuedINTEL: + *hasResult = false; + *hasResultType = false; + break; case SpvOpConvertFToBF16INTEL: *hasResult = true; *hasResultType = true; @@ -2829,19 +4843,48 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy *hasResult = true; *hasResultType = true; break; - case SpvOpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; - case SpvOpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; - case SpvOpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; - } + case SpvOpControlBarrierArriveINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpControlBarrierWaitINTEL: + *hasResult = false; + *hasResultType = false; + break; + case SpvOpGroupIMulKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupFMulKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupBitwiseAndKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupBitwiseOrKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupBitwiseXorKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupLogicalAndKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupLogicalOrKHR: + *hasResult = true; + *hasResultType = true; + break; + case SpvOpGroupLogicalXorKHR: + *hasResult = true; + *hasResultType = true; + break; + } } #endif /* SPV_ENABLE_UTILITY_CODE */ #endif -/* clang-format on */ diff --git a/thirdparty/spirv-reflect/patches/specialization-constants.patch b/thirdparty/spirv-reflect/patches/specialization-constants.patch index d066c03ce7..8ddf625823 100644 --- a/thirdparty/spirv-reflect/patches/specialization-constants.patch +++ b/thirdparty/spirv-reflect/patches/specialization-constants.patch @@ -1,9 +1,9 @@ diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c -index 8c70ebecfb..c5ed7ab07d 100644 +index d41b30874e..a830ca9ebf 100644 --- a/thirdparty/spirv-reflect/spirv_reflect.c +++ b/thirdparty/spirv-reflect/spirv_reflect.c -@@ -126,6 +126,9 @@ typedef struct SpvReflectPrvDecorations { - SpvReflectPrvNumberDecoration location; +@@ -136,6 +136,9 @@ typedef struct SpvReflectPrvDecorations { + SpvReflectPrvNumberDecoration component; SpvReflectPrvNumberDecoration offset; SpvReflectPrvNumberDecoration uav_counter_buffer; +// -- GODOT begin -- @@ -12,7 +12,7 @@ index 8c70ebecfb..c5ed7ab07d 100644 SpvReflectPrvStringDecoration semantic; uint32_t array_stride; uint32_t matrix_stride; -@@ -641,6 +644,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) +@@ -730,6 +733,9 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) p_parser->nodes[i].decorations.offset.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.uav_counter_buffer.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.built_in = (SpvBuiltIn)INVALID_VALUE; @@ -22,15 +22,12 @@ index 8c70ebecfb..c5ed7ab07d 100644 } // Mark source file id node p_parser->source_file_id = (uint32_t)INVALID_VALUE; -@@ -837,10 +843,16 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) - CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id); - } - break; - +@@ -944,7 +950,15 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) + case SpvOpSpecConstantTrue: case SpvOpSpecConstantFalse: -+// -- GODOT begin -- - case SpvOpSpecConstant: ++// -- GODOT begin -- + case SpvOpSpecConstant: { + CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id); + CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id); @@ -38,19 +35,11 @@ index 8c70ebecfb..c5ed7ab07d 100644 + } + break; +// -- GODOT end -- ++ case SpvOpSpecConstantComposite: case SpvOpSpecConstantOp: { CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id); -@@ -872,7 +884,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) - CHECKED_READU32(p_parser, p_node->word_offset + 3, p_access_chain->base_id); - // - // SPIRV_ACCESS_CHAIN_INDEX_OFFSET (4) is the number of words up until the first index: -- // [Node, Result Type Id, Result Id, Base Id, <Indexes>] -+ // [SpvReflectPrvNode, Result Type Id, Result Id, Base Id, <Indexes>] - // - p_access_chain->index_count = (node_word_count - SPIRV_ACCESS_CHAIN_INDEX_OFFSET); - if (p_access_chain->index_count > 0) { -@@ -1354,6 +1366,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) +@@ -1464,6 +1478,9 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) skip = true; } break; @@ -60,11 +49,10 @@ index 8c70ebecfb..c5ed7ab07d 100644 case SpvDecorationRelaxedPrecision: case SpvDecorationBlock: case SpvDecorationBufferBlock: -@@ -1503,7 +1518,14 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) - p_target_decorations->input_attachment_index.word_offset = word_offset; +@@ -1622,6 +1639,15 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) } break; -- + +// -- GODOT begin -- + case SpvDecorationSpecId: { + uint32_t word_offset = p_node->word_offset + member_offset+ 3; @@ -73,13 +61,15 @@ index 8c70ebecfb..c5ed7ab07d 100644 + } + break; +// -- GODOT end -- ++ case SpvReflectDecorationHlslCounterBufferGOOGLE: { uint32_t word_offset = p_node->word_offset + member_offset+ 3; CHECKED_READU32(p_parser, word_offset, p_target_decorations->uav_counter_buffer.value); -@@ -1811,6 +1833,13 @@ static SpvReflectResult ParseType( +@@ -1955,6 +1981,14 @@ static SpvReflectResult ParseType( p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_EXTERNAL_ACCELERATION_STRUCTURE; } break; ++ +// -- GODOT begin -- + case SpvOpSpecConstantTrue: + case SpvOpSpecConstantFalse: @@ -90,7 +80,7 @@ index 8c70ebecfb..c5ed7ab07d 100644 } if (result == SPV_REFLECT_RESULT_SUCCESS) { -@@ -3378,6 +3407,69 @@ static SpvReflectResult ParseExecutionModes( +@@ -3650,6 +3684,69 @@ static SpvReflectResult ParseExecutionModes( return SPV_REFLECT_RESULT_SUCCESS; } @@ -158,9 +148,9 @@ index 8c70ebecfb..c5ed7ab07d 100644 +// -- GODOT end -- + static SpvReflectResult ParsePushConstantBlocks( - SpvReflectPrvParser* p_parser, + SpvReflectPrvParser* p_parser, SpvReflectShaderModule* p_module) -@@ -3763,6 +3855,12 @@ static SpvReflectResult CreateShaderModule( +@@ -4070,6 +4167,12 @@ static SpvReflectResult CreateShaderModule( result = ParsePushConstantBlocks(&parser, p_module); SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS); } @@ -173,7 +163,7 @@ index 8c70ebecfb..c5ed7ab07d 100644 if (result == SPV_REFLECT_RESULT_SUCCESS) { result = ParseEntryPoints(&parser, p_module); SPV_REFLECT_ASSERT(result == SPV_REFLECT_RESULT_SUCCESS); -@@ -3926,6 +4024,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module) +@@ -4233,6 +4336,9 @@ void spvReflectDestroyShaderModule(SpvReflectShaderModule* p_module) } SafeFree(p_module->capabilities); SafeFree(p_module->entry_points); @@ -183,7 +173,7 @@ index 8c70ebecfb..c5ed7ab07d 100644 // Push constants for (size_t i = 0; i < p_module->push_constant_block_count; ++i) { -@@ -4196,6 +4297,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables( +@@ -4503,6 +4609,38 @@ SpvReflectResult spvReflectEnumerateEntryPointInterfaceVariables( return SPV_REFLECT_RESULT_SUCCESS; } @@ -223,10 +213,10 @@ index 8c70ebecfb..c5ed7ab07d 100644 const SpvReflectShaderModule* p_module, uint32_t* p_count, diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h -index 690ae6c105..1ea99d8266 100644 +index 12ef2b1e3e..759db682f4 100644 --- a/thirdparty/spirv-reflect/spirv_reflect.h +++ b/thirdparty/spirv-reflect/spirv_reflect.h -@@ -329,6 +329,28 @@ typedef struct SpvReflectTypeDescription { +@@ -359,6 +359,28 @@ typedef struct SpvReflectTypeDescription { struct SpvReflectTypeDescription* members; } SpvReflectTypeDescription; @@ -254,8 +244,8 @@ index 690ae6c105..1ea99d8266 100644 +// -- GODOT end -- /*! @struct SpvReflectInterfaceVariable - -@@ -493,6 +515,10 @@ typedef struct SpvReflectShaderModule { + @brief The OpVariable that is either an Input or Output to the module +@@ -530,6 +552,10 @@ typedef struct SpvReflectShaderModule { SpvReflectInterfaceVariable* interface_variables; // Uses value(s) from first entry point uint32_t push_constant_block_count; // Uses value(s) from first entry point SpvReflectBlockVariable* push_constant_blocks; // Uses value(s) from first entry point @@ -266,7 +256,7 @@ index 690ae6c105..1ea99d8266 100644 struct Internal { SpvReflectModuleFlags module_flags; -@@ -765,6 +791,33 @@ SpvReflectResult spvReflectEnumerateInputVariables( +@@ -802,6 +828,33 @@ SpvReflectResult spvReflectEnumerateInputVariables( SpvReflectInterfaceVariable** pp_variables ); diff --git a/thirdparty/spirv-reflect/spirv_reflect.c b/thirdparty/spirv-reflect/spirv_reflect.c index f8d9ab6f04..a830ca9ebf 100644 --- a/thirdparty/spirv-reflect/spirv_reflect.c +++ b/thirdparty/spirv-reflect/spirv_reflect.c @@ -15,6 +15,7 @@ */ #include "spirv_reflect.h" + #include <assert.h> #include <stdbool.h> #include <string.h> @@ -27,7 +28,7 @@ #include <stdlib.h> #endif -#if defined(__clang__) +#if defined(__clang__) || defined(__GNUC__) || defined(__APPLE_CC__) #define FALLTHROUGH __attribute__((fallthrough)) #else #define FALLTHROUGH @@ -47,7 +48,7 @@ enum { SpvReflectOpDecorateStringGOOGLE = 5632, SpvReflectOpMemberDecorateStringGOOGLE = 5633, SpvReflectDecorationHlslCounterBufferGOOGLE = 5634, - SpvReflectDecorationHlslSemanticGOOGLE = 5635 + SpvReflectDecorationHlslSemanticGOOGLE = 5635, }; // clang-format on @@ -70,14 +71,16 @@ enum { // clang-format off enum { - MAX_NODE_NAME_LENGTH = 1024, + MAX_NODE_NAME_LENGTH = 1024, + // Number of unique PhysicalStorageBuffer structs tracked to detect recursion + MAX_RECURSIVE_PHYSICAL_POINTER_CHECK = 128, }; // clang-format on // clang-format off enum { IMAGE_SAMPLED = 1, - IMAGE_STORAGE = 2 + IMAGE_STORAGE = 2, }; // clang-format on @@ -130,9 +133,10 @@ typedef struct SpvReflectPrvDecorations { SpvReflectPrvNumberDecoration binding; SpvReflectPrvNumberDecoration input_attachment_index; SpvReflectPrvNumberDecoration location; + SpvReflectPrvNumberDecoration component; SpvReflectPrvNumberDecoration offset; SpvReflectPrvNumberDecoration uav_counter_buffer; - // -- GODOT begin -- +// -- GODOT begin -- SpvReflectPrvNumberDecoration specialization_constant; // -- GODOT end -- SpvReflectPrvStringDecoration semantic; @@ -199,6 +203,9 @@ typedef struct SpvReflectPrvAccessChain { // of the base composite uint32_t index_count; uint32_t* indexes; + // + // Block variable ac is pointing to (for block references) + SpvReflectBlockVariable* block_var; } SpvReflectPrvAccessChain; // clang-format on @@ -224,15 +231,14 @@ typedef struct SpvReflectPrvParser { uint32_t type_count; uint32_t descriptor_count; uint32_t push_constant_count; + + uint32_t physical_pointer_check[MAX_RECURSIVE_PHYSICAL_POINTER_CHECK]; + uint32_t physical_pointer_count; } SpvReflectPrvParser; // clang-format on -static uint32_t Max( - uint32_t a, - uint32_t b) -{ - return a > b ? a : b; -} +static uint32_t Max(uint32_t a, uint32_t b) { return a > b ? a : b; } +static uint32_t Min(uint32_t a, uint32_t b) { return a < b ? a : b; } static uint32_t RoundUp( uint32_t value, @@ -389,6 +395,11 @@ static SpvReflectResult ReadU32( return result; } +#define UNCHECKED_READU32(parser, word_offset, value) \ + { \ + (void) ReadU32(parser, word_offset, (uint32_t*)&(value)); \ + } + #define CHECKED_READU32(parser, word_offset, value) \ { \ SpvReflectResult checked_readu32_result = ReadU32(parser, \ @@ -545,6 +556,77 @@ static SpvReflectTypeDescription* FindType(SpvReflectShaderModule* p_module, uin return p_type; } +static SpvReflectPrvAccessChain* FindAccessChain(SpvReflectPrvParser* p_parser, + uint32_t id) { + uint32_t ac_cnt = p_parser->access_chain_count; + for (uint32_t i = 0; i < ac_cnt; i++) { + if (p_parser->access_chains[i].result_id == id) { + return &p_parser->access_chains[i]; + } + } + return 0; +} + +static uint32_t FindBaseId(SpvReflectPrvParser* p_parser, + SpvReflectPrvAccessChain* ac) { + uint32_t base_id = ac->base_id; + SpvReflectPrvNode* base_node = FindNode(p_parser, base_id); + // TODO - This is just a band-aid to fix crashes. + // Need to understand why here and hopefully remove + // https://github.com/KhronosGroup/SPIRV-Reflect/pull/206 + if (IsNull(base_node)) { + return 0; + } + while (base_node->op != SpvOpVariable) { + switch (base_node->op) { + case SpvOpLoad: { + UNCHECKED_READU32(p_parser, base_node->word_offset + 3, base_id); + } + break; + case SpvOpFunctionParameter: { + UNCHECKED_READU32(p_parser, base_node->word_offset + 2, base_id); + } + break; + default: { + assert(false); + } + break; + } + + SpvReflectPrvAccessChain* base_ac = FindAccessChain(p_parser, base_id); + if (base_ac == 0) { + return 0; + } + base_id = base_ac->base_id; + base_node = FindNode(p_parser, base_id); + } + return base_id; +} + +static SpvReflectBlockVariable* GetRefBlkVar(SpvReflectPrvParser* p_parser, + SpvReflectPrvAccessChain* ac) { + uint32_t base_id = ac->base_id; + SpvReflectPrvNode* base_node = FindNode(p_parser, base_id); + assert(base_node->op == SpvOpLoad); + UNCHECKED_READU32(p_parser, base_node->word_offset + 3, base_id); + SpvReflectPrvAccessChain* base_ac = FindAccessChain(p_parser, base_id); + assert(base_ac != 0); + SpvReflectBlockVariable* base_var = base_ac->block_var; + assert(base_var != 0); + return base_var; +} + +bool IsPointerToPointer(SpvReflectPrvParser* p_parser, uint32_t type_id) { + SpvReflectPrvNode* ptr_node = FindNode(p_parser, type_id); + if (ptr_node->op != SpvOpTypePointer) { + return false; + } + uint32_t pte_id = 0; + UNCHECKED_READU32(p_parser, ptr_node->word_offset + 3, pte_id); + SpvReflectPrvNode* pte_node = FindNode(p_parser, pte_id); + return pte_node->op == SpvOpTypePointer; +} + static SpvReflectResult CreateParser( size_t size, void* p_code, @@ -647,10 +729,11 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) p_parser->nodes[i].decorations.set.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.binding.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.location.value = (uint32_t)INVALID_VALUE; + p_parser->nodes[i].decorations.component.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.offset.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.uav_counter_buffer.value = (uint32_t)INVALID_VALUE; p_parser->nodes[i].decorations.built_in = (SpvBuiltIn)INVALID_VALUE; - // -- GODOT begin -- +// -- GODOT begin -- p_parser->nodes[i].decorations.specialization_constant.value = (SpvBuiltIn)INVALID_VALUE; // -- GODOT end -- } @@ -768,6 +851,10 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) p_node->member_count = p_node->word_count - 2; FALLTHROUGH; } // Fall through + + // This is all the rest of OpType* that need to be tracked + // Possible new extensions might expose new type, will need to be added + // here case SpvOpTypeVoid: case SpvOpTypeBool: case SpvOpTypeInt: @@ -784,11 +871,12 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) case SpvOpTypePipe: case SpvOpTypeAccelerationStructureKHR: case SpvOpTypeRayQueryKHR: - { + case SpvOpTypeHitObjectNV: + case SpvOpTypeCooperativeMatrixNV: + case SpvOpTypeCooperativeMatrixKHR: { CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_id); p_node->is_type = true; - } - break; + } break; case SpvOpTypeImage: { CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_id); @@ -826,7 +914,15 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) break; case SpvOpTypePointer: { - CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_id); + uint32_t result_id; + CHECKED_READU32(p_parser, p_node->word_offset + 1, result_id); + // Look for forward pointer. Clear result id if found + SpvReflectPrvNode* p_fwd_node = FindNode(p_parser, result_id); + if (p_fwd_node) { + p_fwd_node->result_id = 0; + } + // Register pointer type + p_node->result_id = result_id; CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->storage_class); CHECKED_READU32(p_parser, p_node->word_offset + 3, p_node->type_id); p_node->is_type = true; @@ -851,6 +947,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id); } break; + case SpvOpSpecConstantTrue: case SpvOpSpecConstantFalse: // -- GODOT begin -- @@ -861,6 +958,7 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) } break; // -- GODOT end -- + case SpvOpSpecConstantComposite: case SpvOpSpecConstantOp: { CHECKED_READU32(p_parser, p_node->word_offset + 1, p_node->result_type_id); @@ -947,6 +1045,11 @@ static SpvReflectResult ParseNodes(SpvReflectPrvParser* p_parser) function_node = (uint32_t)INVALID_VALUE; } break; + case SpvOpFunctionParameter: + { + CHECKED_READU32(p_parser, p_node->word_offset + 2, p_node->result_id); + } + break; } if (p_node->is_type) { @@ -1391,6 +1494,7 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) case SpvDecorationNonWritable: case SpvDecorationNonReadable: case SpvDecorationLocation: + case SpvDecorationComponent: case SpvDecorationBinding: case SpvDecorationDescriptorSet: case SpvDecorationOffset: @@ -1500,6 +1604,13 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) } break; + case SpvDecorationComponent: { + uint32_t word_offset = p_node->word_offset + member_offset + 3; + CHECKED_READU32(p_parser, word_offset, + p_target_decorations->component.value); + p_target_decorations->component.word_offset = word_offset; + } break; + case SpvDecorationBinding: { uint32_t word_offset = p_node->word_offset + member_offset+ 3; CHECKED_READU32(p_parser, word_offset, p_target_decorations->binding.value); @@ -1527,6 +1638,7 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) p_target_decorations->input_attachment_index.word_offset = word_offset; } break; + // -- GODOT begin -- case SpvDecorationSpecId: { uint32_t word_offset = p_node->word_offset + member_offset+ 3; @@ -1535,6 +1647,7 @@ static SpvReflectResult ParseDecorations(SpvReflectPrvParser* p_parser) } break; // -- GODOT end -- + case SpvReflectDecorationHlslCounterBufferGOOGLE: { uint32_t word_offset = p_node->word_offset + member_offset+ 3; CHECKED_READU32(p_parser, word_offset, p_target_decorations->uav_counter_buffer.value); @@ -1588,6 +1701,7 @@ static SpvReflectResult ParseType( SpvReflectResult result = SPV_REFLECT_RESULT_SUCCESS; if (p_node->member_count > 0) { + p_type->struct_type_description = FindType(p_module, p_node->result_id); p_type->member_count = p_node->member_count; p_type->members = (SpvReflectTypeDescription*)calloc(p_type->member_count, sizeof(*(p_type->members))); if (IsNotNull(p_type->members)) { @@ -1734,7 +1848,8 @@ static SpvReflectResult ParseType( uint32_t dim_index = p_type->traits.array.dims_count; if (p_length_node->op == SpvOpSpecConstant || p_length_node->op == SpvOpSpecConstantOp) { - p_type->traits.array.dims[dim_index] = 0xFFFFFFFF; + p_type->traits.array.dims[dim_index] = + (uint32_t)SPV_REFLECT_ARRAY_DIM_SPEC_CONSTANT; p_type->traits.array.spec_constant_op_ids[dim_index] = length_id; p_type->traits.array.dims_count += 1; } else { @@ -1743,7 +1858,8 @@ static SpvReflectResult ParseType( if (result == SPV_REFLECT_RESULT_SUCCESS) { // Write the array dim and increment the count and offset p_type->traits.array.dims[dim_index] = length; - p_type->traits.array.spec_constant_op_ids[dim_index] = 0xFFFFFFFF; + p_type->traits.array.spec_constant_op_ids[dim_index] = + (uint32_t)SPV_REFLECT_ARRAY_DIM_SPEC_CONSTANT; p_type->traits.array.dims_count += 1; } else { result = SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; @@ -1770,7 +1886,8 @@ static SpvReflectResult ParseType( IF_READU32(result, p_parser, p_node->word_offset + 2, element_type_id); p_type->traits.array.stride = p_node->decorations.array_stride; uint32_t dim_index = p_type->traits.array.dims_count; - p_type->traits.array.dims[dim_index] = 0; + p_type->traits.array.dims[dim_index] = + (uint32_t)SPV_REFLECT_ARRAY_DIM_RUNTIME; p_type->traits.array.spec_constant_op_ids[dim_index] = 0; p_type->traits.array.dims_count += 1; // Parse next dimension or element type @@ -1823,18 +1940,40 @@ static SpvReflectResult ParseType( case SpvOpTypeOpaque: break; case SpvOpTypePointer: { + p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_REF; IF_READU32_CAST(result, p_parser, p_node->word_offset + 2, SpvStorageClass, p_type->storage_class); + + bool found_recursion = false; + if (p_type->storage_class == SpvStorageClassPhysicalStorageBuffer) { + // Need to make sure we haven't started an infinite recursive loop + for (uint32_t i = 0; i < p_parser->physical_pointer_count; i++) { + if (p_type->id == p_parser->physical_pointer_check[i]) { + found_recursion = true; + break; // still need to fill in p_type values + } + } + if (!found_recursion) { + p_parser->physical_pointer_check[p_parser->physical_pointer_count] = + p_type->id; + p_parser->physical_pointer_count++; + if (p_parser->physical_pointer_count >= + MAX_RECURSIVE_PHYSICAL_POINTER_CHECK) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_MAX_RECURSIVE_EXCEEDED; + } + } + } + uint32_t type_id = (uint32_t)INVALID_VALUE; IF_READU32(result, p_parser, p_node->word_offset + 3, type_id); // Parse type SpvReflectPrvNode* p_next_node = FindNode(p_parser, type_id); - if (IsNotNull(p_next_node)) { - result = ParseType(p_parser, p_next_node, NULL, p_module, p_type); - } - else { + if (IsNull(p_next_node)) { result = SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; SPV_REFLECT_ASSERT(false); } + else if (!found_recursion) { + result = ParseType(p_parser, p_next_node, NULL, p_module, p_type); + } } break; @@ -1842,6 +1981,7 @@ static SpvReflectResult ParseType( p_type->type_flags |= SPV_REFLECT_TYPE_FLAG_EXTERNAL_ACCELERATION_STRUCTURE; } break; + // -- GODOT begin -- case SpvOpSpecConstantTrue: case SpvOpSpecConstantFalse: @@ -1894,6 +2034,7 @@ static SpvReflectResult ParseTypes( } SpvReflectTypeDescription* p_type = &(p_module->_internal->type_descriptions[type_index]); + p_parser->physical_pointer_count = 0; SpvReflectResult result = ParseType(p_parser, p_node, NULL, p_module, p_type); if (result != SPV_REFLECT_RESULT_SUCCESS) { return result; @@ -2290,14 +2431,58 @@ static SpvReflectResult ParseDescriptorBlockVariable( for (uint32_t member_index = 0; member_index < p_type->member_count; ++member_index) { SpvReflectTypeDescription* p_member_type = &p_type->members[member_index]; SpvReflectBlockVariable* p_member_var = &p_var->members[member_index]; + // If pointer type, treat like reference and resolve to pointee type + SpvReflectTypeDescription* p_member_ptr_type = 0; + bool found_recursion = false; + + if (p_member_type->op == SpvOpTypePointer) { + if (p_member_type->storage_class == + SpvStorageClassPhysicalStorageBuffer) { + // Need to make sure we haven't started an infinite recursive loop + for (uint32_t i = 0; i < p_parser->physical_pointer_count; i++) { + if (p_member_type->id == p_parser->physical_pointer_check[i]) { + found_recursion = true; + break; // still need to fill in p_member_type values + } + } + if (!found_recursion) { + p_parser->physical_pointer_check[p_parser->physical_pointer_count] = + p_member_type->id; + p_parser->physical_pointer_count++; + if (p_parser->physical_pointer_count >= + MAX_RECURSIVE_PHYSICAL_POINTER_CHECK) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_MAX_RECURSIVE_EXCEEDED; + } + } + } + + // Remember the original type + p_member_ptr_type = p_member_type; + SpvReflectPrvNode* p_member_type_node = + FindNode(p_parser, p_member_type->id); + if (IsNull(p_member_type_node)) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; + } + // Should be the pointee type + p_member_type = FindType(p_module, p_member_type_node->type_id); + if (IsNull(p_member_type)) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; + } + } bool is_struct = (p_member_type->type_flags & SPV_REFLECT_TYPE_FLAG_STRUCT) == SPV_REFLECT_TYPE_FLAG_STRUCT; - if (is_struct) { + if (is_struct && !found_recursion) { SpvReflectResult result = ParseDescriptorBlockVariable(p_parser, p_module, p_member_type, p_member_var); if (result != SPV_REFLECT_RESULT_SUCCESS) { return result; } } + if (p_type_node->storage_class == SpvStorageClassPhysicalStorageBuffer && + !p_type_node->member_names) { + // TODO 212 - If a buffer ref has an array of itself, all members are null + continue; + } + p_member_var->name = p_type_node->member_names[member_index]; p_member_var->offset = p_type_node->member_decorations[member_index].offset.value; p_member_var->decoration_flags = ApplyDecorations(&p_type_node->member_decorations[member_index]); @@ -2311,7 +2496,8 @@ static SpvReflectResult ParseDescriptorBlockVariable( } p_member_var->word_offset.offset = p_type_node->member_decorations[member_index].offset.word_offset; - p_member_var->type_description = p_member_type; + p_member_var->type_description = + p_member_ptr_type ? p_member_ptr_type : p_member_type; } } @@ -2337,14 +2523,19 @@ static SpvReflectResult ParseDescriptorBlockVariableSizes( return SPV_REFLECT_RESULT_SUCCESS; } + bool is_parent_ref = p_var->type_description->op == SpvOpTypePointer; + // Absolute offsets for (uint32_t member_index = 0; member_index < p_var->member_count; ++member_index) { SpvReflectBlockVariable* p_member_var = &p_var->members[member_index]; if (is_parent_root) { p_member_var->absolute_offset = p_member_var->offset; - } - else { - p_member_var->absolute_offset = is_parent_aos ? 0 : p_member_var->offset + p_var->absolute_offset; + } else { + p_member_var->absolute_offset = + is_parent_aos + ? 0 + : (is_parent_ref ? p_member_var->offset + : p_member_var->offset + p_var->absolute_offset); } } @@ -2353,6 +2544,10 @@ static SpvReflectResult ParseDescriptorBlockVariableSizes( SpvReflectBlockVariable* p_member_var = &p_var->members[member_index]; SpvReflectTypeDescription* p_member_type = p_member_var->type_description; + if (!p_member_type) { + // TODO 212 - If a buffer ref has an array of itself, all members are null + continue; + } switch (p_member_type->op) { case SpvOpTypeBool: { p_member_var->size = SPIRV_WORD_SIZE; @@ -2411,6 +2606,21 @@ static SpvReflectResult ParseDescriptorBlockVariableSizes( } break; + case SpvOpTypePointer: { + // Reference. Get to underlying struct type. + SpvReflectPrvNode* p_member_type_node = FindNode(p_parser, p_member_type->id); + if (IsNull(p_member_type_node)) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; + } + // Get the pointee type + p_member_type = FindType(p_module, p_member_type_node->type_id); + if (IsNull(p_member_type)) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; + } + assert(p_member_type->op == SpvOpTypeStruct); + FALLTHROUGH; + } + case SpvOpTypeStruct: { SpvReflectResult result = ParseDescriptorBlockVariableSizes(p_parser, p_module, false, is_parent_aos, is_parent_rta, p_member_var); if (result != SPV_REFLECT_RESULT_SUCCESS) { @@ -2449,6 +2659,12 @@ static SpvReflectResult ParseDescriptorBlockVariableSizes( } } + // If buffer ref, sizes are same as uint64_t + if (is_parent_ref) { + p_var->size = p_var->padded_size = 8; + return SPV_REFLECT_RESULT_SUCCESS; + } + // @TODO validate this with assertion p_var->size = p_var->members[p_var->member_count - 1].offset + p_var->members[p_var->member_count - 1].padded_size; @@ -2489,16 +2705,13 @@ static SpvReflectResult ParseDescriptorBlockVariableUsage( SpvReflectBlockVariable* p_var ) { - (void)p_parser; - (void)p_access_chain; - (void)p_var; - // Clear the current variable's UNUSED flag p_var->flags &= ~SPV_REFLECT_VARIABLE_FLAGS_UNUSED; // Parsing arrays requires overriding the op type for // for the lowest dim's element type. - SpvOp op_type = p_var->type_description->op; + SpvReflectTypeDescription* p_type = p_var->type_description; + SpvOp op_type = p_type->op; if (override_op_type != (SpvOp)INVALID_VALUE) { op_type = override_op_type; } @@ -2508,7 +2721,6 @@ static SpvReflectResult ParseDescriptorBlockVariableUsage( case SpvOpTypeArray: { // Parse through array's type hierarchy to find the actual/non-array element type - SpvReflectTypeDescription* p_type = p_var->type_description; while ((p_type->op == SpvOpTypeArray) && (index_index < p_access_chain->index_count)) { // Find the array element type id SpvReflectPrvNode* p_node = FindNode(p_parser, p_type->id); @@ -2544,19 +2756,41 @@ static SpvReflectResult ParseDescriptorBlockVariableUsage( if (result != SPV_REFLECT_RESULT_SUCCESS) { return result; } - } - else { + } else { // Clear UNUSED flag for remaining variables MarkSelfAndAllMemberVarsAsUsed(p_var); } } break; + case SpvOpTypePointer: { + // Reference. Get to underlying struct type. + SpvReflectPrvNode* p_type_node = FindNode(p_parser, p_type->id); + if (IsNull(p_type_node)) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; + } + // Get the pointee type + p_type = FindType(p_module, p_type_node->type_id); + if (IsNull(p_type)) { + return SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ID_REFERENCE; + } + if (p_type->op != SpvOpTypeStruct) { + break; + } + FALLTHROUGH; + } + case SpvOpTypeStruct: { assert(p_var->member_count > 0); if (p_var->member_count == 0) { return SPV_REFLECT_RESULT_ERROR_SPIRV_UNEXPECTED_BLOCK_DATA; } + + // The access chain can have zero indexes, if used for a runtime array + if (p_access_chain->index_count == 0) { + return SPV_REFLECT_RESULT_SUCCESS; + } + // Get member variable at the access's chain current index uint32_t index = p_access_chain->indexes[index_index]; if (index >= p_var->member_count) { @@ -2586,23 +2820,13 @@ static SpvReflectResult ParseDescriptorBlockVariableUsage( return result; } } - else { + else if (IsPointerToPointer(p_parser, p_access_chain->result_type_id)) { + // Remember block var for this access chain for downstream dereference + p_access_chain->block_var = p_member_var; + } else { // Clear UNUSED flag for remaining variables MarkSelfAndAllMemberVarsAsUsed(p_member_var); } - //SpvReflectBlockVariable* p_member_var = &p_var->members[index]; - //if (index_index < p_access_chain->index_count) { - // SpvReflectResult result = ParseDescriptorBlockVariableUsage( - // p_parser, - // p_module, - // p_access_chain, - // index_index + 1, - // (SpvOp)INVALID_VALUE, - // p_member_var); - // if (result != SPV_REFLECT_RESULT_SUCCESS) { - // return result; - // } - //} } break; } @@ -2629,6 +2853,7 @@ static SpvReflectResult ParseDescriptorBlocks( // Mark UNUSED p_descriptor->block.flags |= SPV_REFLECT_VARIABLE_FLAGS_UNUSED; + p_parser->physical_pointer_count = 0; // Parse descriptor block SpvReflectResult result = ParseDescriptorBlockVariable(p_parser, p_module, p_type, &p_descriptor->block); if (result != SPV_REFLECT_RESULT_SUCCESS) { @@ -2682,6 +2907,15 @@ static SpvReflectResult ParseFormat( uint32_t component_count = p_type->traits.numeric.vector.component_count; if (p_type->type_flags & SPV_REFLECT_TYPE_FLAG_FLOAT) { switch (bit_width) { + case 16: { + switch (component_count) { + case 2: *p_format = SPV_REFLECT_FORMAT_R16G16_SFLOAT; break; + case 3: *p_format = SPV_REFLECT_FORMAT_R16G16B16_SFLOAT; break; + case 4: *p_format = SPV_REFLECT_FORMAT_R16G16B16A16_SFLOAT; break; + } + } + break; + case 32: { switch (component_count) { case 2: *p_format = SPV_REFLECT_FORMAT_R32G32_SFLOAT; break; @@ -2703,6 +2937,15 @@ static SpvReflectResult ParseFormat( } else if (p_type->type_flags & (SPV_REFLECT_TYPE_FLAG_INT | SPV_REFLECT_TYPE_FLAG_BOOL)) { switch (bit_width) { + case 16: { + switch (component_count) { + case 2: *p_format = signedness ? SPV_REFLECT_FORMAT_R16G16_SINT : SPV_REFLECT_FORMAT_R16G16_UINT; break; + case 3: *p_format = signedness ? SPV_REFLECT_FORMAT_R16G16B16_SINT : SPV_REFLECT_FORMAT_R16G16B16_UINT; break; + case 4: *p_format = signedness ? SPV_REFLECT_FORMAT_R16G16B16A16_SINT : SPV_REFLECT_FORMAT_R16G16B16A16_UINT; break; + } + } + break; + case 32: { switch (component_count) { case 2: *p_format = signedness ? SPV_REFLECT_FORMAT_R32G32_SINT : SPV_REFLECT_FORMAT_R32G32_UINT; break; @@ -2725,6 +2968,9 @@ static SpvReflectResult ParseFormat( } else if (p_type->type_flags & SPV_REFLECT_TYPE_FLAG_FLOAT) { switch(bit_width) { + case 16: + *p_format = SPV_REFLECT_FORMAT_R16_SFLOAT; + break; case 32: *p_format = SPV_REFLECT_FORMAT_R32_SFLOAT; break; @@ -2736,6 +2982,9 @@ static SpvReflectResult ParseFormat( } else if (p_type->type_flags & (SPV_REFLECT_TYPE_FLAG_INT | SPV_REFLECT_TYPE_FLAG_BOOL)) { switch(bit_width) { + case 16: + *p_format = signedness ? SPV_REFLECT_FORMAT_R16_SINT : SPV_REFLECT_FORMAT_R16_UINT; break; + break; case 32: *p_format = signedness ? SPV_REFLECT_FORMAT_R32_SINT : SPV_REFLECT_FORMAT_R32_UINT; break; break; @@ -2777,6 +3026,10 @@ static SpvReflectResult ParseInterfaceVariable( SpvReflectPrvDecorations* p_member_decorations = &p_type_node->member_decorations[member_index]; SpvReflectTypeDescription* p_member_type = &p_type->members[member_index]; SpvReflectInterfaceVariable* p_member_var = &p_var->members[member_index]; + + // Storage class is the same throughout the whole struct + p_member_var->storage_class = p_var->storage_class; + SpvReflectResult result = ParseInterfaceVariable(p_parser, NULL, p_member_decorations, p_module, p_member_type, p_member_var, p_has_built_in); if (result != SPV_REFLECT_RESULT_SUCCESS) { SPV_REFLECT_ASSERT(false); @@ -2789,7 +3042,12 @@ static SpvReflectResult ParseInterfaceVariable( p_var->decoration_flags = ApplyDecorations(p_type_node_decorations); if (p_var_node_decorations != NULL) { p_var->decoration_flags |= ApplyDecorations(p_var_node_decorations); + } else { + // Apply member decoration values to struct members + p_var->location = p_type_node_decorations->location.value; + p_var->component = p_type_node_decorations->component.value; } + p_var->built_in = p_type_node_decorations->built_in; ApplyNumericTraits(p_type, &p_var->numeric); if (p_type->op == SpvOpTypeArray) { @@ -2936,6 +3194,7 @@ static SpvReflectResult ParseInterfaceVariables( // Location is decorated on OpVariable node, not the type node. p_var->location = p_node->decorations.location.value; + p_var->component = p_node->decorations.component.value; p_var->word_offset.location = p_node->decorations.location.word_offset; // Built in @@ -3370,6 +3629,10 @@ static SpvReflectResult ParseExecutionModes( case SpvExecutionModeOutputLinesNV: case SpvExecutionModeOutputPrimitivesNV: case SpvExecutionModeOutputTrianglesNV: + case SpvExecutionModePixelInterlockOrderedEXT: + case SpvExecutionModePixelInterlockUnorderedEXT: + case SpvExecutionModeSampleInterlockOrderedEXT: + case SpvExecutionModeSampleInterlockUnorderedEXT: break; } p_entry_point->execution_mode_count++; @@ -3538,6 +3801,7 @@ static SpvReflectResult ParsePushConstantBlocks( SpvReflectBlockVariable* p_push_constant = &p_module->push_constant_blocks[push_constant_index]; p_push_constant->spirv_id = p_node->result_id; + p_parser->physical_pointer_count = 0; SpvReflectResult result = ParseDescriptorBlockVariable(p_parser, p_module, p_type, p_push_constant); if (result != SPV_REFLECT_RESULT_SUCCESS) { return result; @@ -3549,12 +3813,15 @@ static SpvReflectResult ParsePushConstantBlocks( SpvReflectPrvAccessChain* p_access_chain = &(p_parser->access_chains[access_chain_index]); // Skip any access chains that aren't touching this push constant block - if (p_push_constant->spirv_id != p_access_chain->base_id) { + if (p_push_constant->spirv_id != FindBaseId(p_parser, p_access_chain)) { continue; } + SpvReflectBlockVariable* p_var = + (p_access_chain->base_id == p_push_constant->spirv_id) + ? p_push_constant + : GetRefBlkVar(p_parser, p_access_chain); result = ParseDescriptorBlockVariableUsage( - p_parser, p_module, p_access_chain, 0, (SpvOp)INVALID_VALUE, - p_push_constant); + p_parser, p_module, p_access_chain, 0, (SpvOp)INVALID_VALUE, p_var); if (result != SPV_REFLECT_RESULT_SUCCESS) { return result; } @@ -3566,6 +3833,14 @@ static SpvReflectResult ParsePushConstantBlocks( return result; } + // Get minimum offset for whole Push Constant block + // It is not valid SPIR-V to have an empty Push Constant Block + p_push_constant->offset = UINT32_MAX; + for (uint32_t k = 0; k < p_push_constant->member_count; ++k) { + const uint32_t member_offset = p_push_constant->members[k].offset; + p_push_constant->offset = Min(p_push_constant->offset, member_offset); + } + ++push_constant_index; } @@ -5242,7 +5517,6 @@ SpvReflectResult spvReflectChangeOutputVariableLocation( const char* spvReflectSourceLanguage(SpvSourceLanguage source_lang) { switch (source_lang) { - case SpvSourceLanguageUnknown : return "Unknown"; case SpvSourceLanguageESSL : return "ESSL"; case SpvSourceLanguageGLSL : return "GLSL"; case SpvSourceLanguageOpenCL_C : return "OpenCL_C"; @@ -5250,10 +5524,14 @@ const char* spvReflectSourceLanguage(SpvSourceLanguage source_lang) case SpvSourceLanguageHLSL : return "HLSL"; case SpvSourceLanguageCPP_for_OpenCL : return "CPP_for_OpenCL"; case SpvSourceLanguageSYCL : return "SYCL"; - case SpvSourceLanguageMax: + case SpvSourceLanguageHERO_C : return "Hero C"; + case SpvSourceLanguageNZSL : return "NZSL"; + default: break; } - return ""; + // The source language is SpvSourceLanguageUnknown, SpvSourceLanguageMax, or + // some other value that does not correspond to a knonwn language. + return "Unknown"; } const char* spvReflectBlockVariableTypeName( diff --git a/thirdparty/spirv-reflect/spirv_reflect.h b/thirdparty/spirv-reflect/spirv_reflect.h index c7fd21bce6..759db682f4 100644 --- a/thirdparty/spirv-reflect/spirv_reflect.h +++ b/thirdparty/spirv-reflect/spirv_reflect.h @@ -79,15 +79,16 @@ typedef enum SpvReflectResult { SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_BLOCK_MEMBER_REFERENCE, SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_ENTRY_POINT, SPV_REFLECT_RESULT_ERROR_SPIRV_INVALID_EXECUTION_MODE, + SPV_REFLECT_RESULT_ERROR_SPIRV_MAX_RECURSIVE_EXCEEDED, } SpvReflectResult; /*! @enum SpvReflectModuleFlagBits -SPV_REFLECT_MODULE_FLAG_NO_COPY - Disables copying of SPIR-V code - when a SPIRV-Reflect shader module is created. It is the +SPV_REFLECT_MODULE_FLAG_NO_COPY - Disables copying of SPIR-V code + when a SPIRV-Reflect shader module is created. It is the responsibility of the calling program to ensure that the pointer remains valid and the memory it's pointing to is not freed while - SPIRV-Reflect operations are taking place. Freeing the backing + SPIRV-Reflect operations are taking place. Freeing the backing memory will cause undefined behavior or most likely a crash. This is flag is intended for cases where the memory overhead of storing the copied SPIR-V is undesirable. @@ -119,6 +120,7 @@ typedef enum SpvReflectTypeFlagBits { SPV_REFLECT_TYPE_FLAG_EXTERNAL_MASK = 0x00FF0000, SPV_REFLECT_TYPE_FLAG_STRUCT = 0x10000000, SPV_REFLECT_TYPE_FLAG_ARRAY = 0x20000000, + SPV_REFLECT_TYPE_FLAG_REF = 0x40000000, } SpvReflectTypeFlagBits; typedef uint32_t SpvReflectTypeFlags; @@ -165,6 +167,18 @@ typedef enum SpvReflectResourceType { */ typedef enum SpvReflectFormat { SPV_REFLECT_FORMAT_UNDEFINED = 0, // = VK_FORMAT_UNDEFINED + SPV_REFLECT_FORMAT_R16_UINT = 74, // = VK_FORMAT_R16_UINT + SPV_REFLECT_FORMAT_R16_SINT = 75, // = VK_FORMAT_R16_SINT + SPV_REFLECT_FORMAT_R16_SFLOAT = 76, // = VK_FORMAT_R16_SFLOAT + SPV_REFLECT_FORMAT_R16G16_UINT = 81, // = VK_FORMAT_R16G16_UINT + SPV_REFLECT_FORMAT_R16G16_SINT = 82, // = VK_FORMAT_R16G16_SINT + SPV_REFLECT_FORMAT_R16G16_SFLOAT = 83, // = VK_FORMAT_R16G16_SFLOAT + SPV_REFLECT_FORMAT_R16G16B16_UINT = 88, // = VK_FORMAT_R16G16B16_UINT + SPV_REFLECT_FORMAT_R16G16B16_SINT = 89, // = VK_FORMAT_R16G16B16_SINT + SPV_REFLECT_FORMAT_R16G16B16_SFLOAT = 90, // = VK_FORMAT_R16G16B16_SFLOAT + SPV_REFLECT_FORMAT_R16G16B16A16_UINT = 95, // = VK_FORMAT_R16G16B16A16_UINT + SPV_REFLECT_FORMAT_R16G16B16A16_SINT = 96, // = VK_FORMAT_R16G16B16A16_SINT + SPV_REFLECT_FORMAT_R16G16B16A16_SFLOAT = 97, // = VK_FORMAT_R16G16B16A16_SFLOAT SPV_REFLECT_FORMAT_R32_UINT = 98, // = VK_FORMAT_R32_UINT SPV_REFLECT_FORMAT_R32_SINT = 99, // = VK_FORMAT_R32_SINT SPV_REFLECT_FORMAT_R32_SFLOAT = 100, // = VK_FORMAT_R32_SFLOAT @@ -294,10 +308,17 @@ typedef struct SpvReflectImageTraits { SpvImageFormat image_format; } SpvReflectImageTraits; +typedef enum SpvReflectArrayDimType { + SPV_REFLECT_ARRAY_DIM_RUNTIME = 0, // OpTypeRuntimeArray + SPV_REFLECT_ARRAY_DIM_SPEC_CONSTANT = 0xFFFFFFFF // specialization constant +} SpvReflectArrayDimType; + typedef struct SpvReflectArrayTraits { uint32_t dims_count; - // Each entry is: 0xFFFFFFFF for a specialization constant dimension, - // 0 for a runtime array dimension, and the array length otherwise. + // Each entry is either: + // - specialization constant dimension + // - OpTypeRuntimeArray + // - the array length otherwise uint32_t dims[SPV_REFLECT_MAX_ARRAY_DIMS]; // Stores Ids for dimensions that are specialization constants uint32_t spec_constant_op_ids[SPV_REFLECT_MAX_ARRAY_DIMS]; @@ -310,12 +331,13 @@ typedef struct SpvReflectBindingArrayTraits { } SpvReflectBindingArrayTraits; /*! @struct SpvReflectTypeDescription - + @brief Information about an OpType* instruction */ typedef struct SpvReflectTypeDescription { uint32_t id; SpvOp op; const char* type_name; + // Non-NULL if type is member of a struct const char* struct_member_name; SpvStorageClass storage_class; SpvReflectTypeFlags type_flags; @@ -327,7 +349,13 @@ typedef struct SpvReflectTypeDescription { SpvReflectArrayTraits array; } traits; + // If underlying type is a struct (ex. array of structs) + // this gives access to the OpTypeStruct + struct SpvReflectTypeDescription* struct_type_description; + + // @deprecated use struct_type_description instead uint32_t member_count; + // @deprecated use struct_type_description instead struct SpvReflectTypeDescription* members; } SpvReflectTypeDescription; @@ -355,12 +383,13 @@ typedef struct SpvReflectSpecializationConstant { // -- GODOT end -- /*! @struct SpvReflectInterfaceVariable - + @brief The OpVariable that is either an Input or Output to the module */ typedef struct SpvReflectInterfaceVariable { uint32_t spirv_id; const char* name; uint32_t location; + uint32_t component; SpvStorageClass storage_class; const char* semantic; SpvReflectDecorationFlags decoration_flags; @@ -390,6 +419,7 @@ typedef struct SpvReflectInterfaceVariable { typedef struct SpvReflectBlockVariable { uint32_t spirv_id; const char* name; + // For Push Constants, this is the lowest offset of all memebers uint32_t offset; // Measured in bytes uint32_t absolute_offset; // Measured in bytes uint32_t size; // Measured in bytes @@ -458,10 +488,10 @@ typedef struct SpvReflectEntryPoint { SpvExecutionModel spirv_execution_model; SpvReflectShaderStageFlagBits shader_stage; - uint32_t input_variable_count; - SpvReflectInterfaceVariable** input_variables; - uint32_t output_variable_count; - SpvReflectInterfaceVariable** output_variables; + uint32_t input_variable_count; + SpvReflectInterfaceVariable** input_variables; + uint32_t output_variable_count; + SpvReflectInterfaceVariable** output_variables; uint32_t interface_variable_count; SpvReflectInterfaceVariable* interface_variables; @@ -1496,7 +1526,7 @@ const char* spvReflectBlockVariableTypeName( }; #endif -#if defined(__cplusplus) +#if defined(__cplusplus) && !defined(SPIRV_REFLECT_DISABLE_CPP_BINDINGS) #include <cstdlib> #include <string> #include <vector> @@ -1632,7 +1662,7 @@ inline ShaderModule::ShaderModule(size_t size, const void* p_code, SpvReflectMod /*! @fn ShaderModule @param code - + */ inline ShaderModule::ShaderModule(const std::vector<uint8_t>& code, SpvReflectModuleFlags flags) { m_result = spvReflectCreateShaderModule2( @@ -1645,7 +1675,7 @@ inline ShaderModule::ShaderModule(const std::vector<uint8_t>& code, SpvReflectMo /*! @fn ShaderModule @param code - + */ inline ShaderModule::ShaderModule(const std::vector<uint32_t>& code, SpvReflectModuleFlags flags) { m_result = spvReflectCreateShaderModule2( @@ -2348,5 +2378,5 @@ inline SpvReflectResult ShaderModule::ChangeOutputVariableLocation( } } // namespace spv_reflect -#endif // defined(__cplusplus) +#endif // defined(__cplusplus) && !defined(SPIRV_REFLECT_DISABLE_CPP_WRAPPER) #endif // SPIRV_REFLECT_H |