|
|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
-** Copyright (c) 2014-2019 The Khronos Group Inc.
|
|
|
+** Copyright (c) 2014-2020 The Khronos Group Inc.
|
|
|
**
|
|
|
** Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
** of this software and/or associated documentation files (the "Materials"),
|
|
|
@@ -57,7 +57,7 @@ typedef unsigned int SpvId;
|
|
|
#define SPV_REVISION 1
|
|
|
|
|
|
static const unsigned int SpvMagicNumber = 0x07230203;
|
|
|
-static const unsigned int SpvVersion = 0x00010400;
|
|
|
+static const unsigned int SpvVersion = 0x00010500;
|
|
|
static const unsigned int SpvRevision = 1;
|
|
|
static const unsigned int SpvOpCodeMask = 0xffff;
|
|
|
static const unsigned int SpvWordCountShift = 16;
|
|
|
@@ -82,11 +82,17 @@ typedef enum SpvExecutionModel_ {
|
|
|
SpvExecutionModelKernel = 6,
|
|
|
SpvExecutionModelTaskNV = 5267,
|
|
|
SpvExecutionModelMeshNV = 5268,
|
|
|
+ SpvExecutionModelRayGenerationKHR = 5313,
|
|
|
SpvExecutionModelRayGenerationNV = 5313,
|
|
|
+ SpvExecutionModelIntersectionKHR = 5314,
|
|
|
SpvExecutionModelIntersectionNV = 5314,
|
|
|
+ SpvExecutionModelAnyHitKHR = 5315,
|
|
|
SpvExecutionModelAnyHitNV = 5315,
|
|
|
+ SpvExecutionModelClosestHitKHR = 5316,
|
|
|
SpvExecutionModelClosestHitNV = 5316,
|
|
|
+ SpvExecutionModelMissKHR = 5317,
|
|
|
SpvExecutionModelMissNV = 5317,
|
|
|
+ SpvExecutionModelCallableKHR = 5318,
|
|
|
SpvExecutionModelCallableNV = 5318,
|
|
|
SpvExecutionModelMax = 0x7fffffff,
|
|
|
} SpvExecutionModel;
|
|
|
@@ -183,11 +189,17 @@ typedef enum SpvStorageClass_ {
|
|
|
SpvStorageClassAtomicCounter = 10,
|
|
|
SpvStorageClassImage = 11,
|
|
|
SpvStorageClassStorageBuffer = 12,
|
|
|
+ SpvStorageClassCallableDataKHR = 5328,
|
|
|
SpvStorageClassCallableDataNV = 5328,
|
|
|
+ SpvStorageClassIncomingCallableDataKHR = 5329,
|
|
|
SpvStorageClassIncomingCallableDataNV = 5329,
|
|
|
+ SpvStorageClassRayPayloadKHR = 5338,
|
|
|
SpvStorageClassRayPayloadNV = 5338,
|
|
|
+ SpvStorageClassHitAttributeKHR = 5339,
|
|
|
SpvStorageClassHitAttributeNV = 5339,
|
|
|
+ SpvStorageClassIncomingRayPayloadKHR = 5342,
|
|
|
SpvStorageClassIncomingRayPayloadNV = 5342,
|
|
|
+ SpvStorageClassShaderRecordBufferKHR = 5343,
|
|
|
SpvStorageClassShaderRecordBufferNV = 5343,
|
|
|
SpvStorageClassPhysicalStorageBuffer = 5349,
|
|
|
SpvStorageClassPhysicalStorageBufferEXT = 5349,
|
|
|
@@ -562,20 +574,35 @@ typedef enum SpvBuiltIn_ {
|
|
|
SpvBuiltInFragmentSizeNV = 5292,
|
|
|
SpvBuiltInFragInvocationCountEXT = 5293,
|
|
|
SpvBuiltInInvocationsPerPixelNV = 5293,
|
|
|
+ SpvBuiltInLaunchIdKHR = 5319,
|
|
|
SpvBuiltInLaunchIdNV = 5319,
|
|
|
+ SpvBuiltInLaunchSizeKHR = 5320,
|
|
|
SpvBuiltInLaunchSizeNV = 5320,
|
|
|
+ SpvBuiltInWorldRayOriginKHR = 5321,
|
|
|
SpvBuiltInWorldRayOriginNV = 5321,
|
|
|
+ SpvBuiltInWorldRayDirectionKHR = 5322,
|
|
|
SpvBuiltInWorldRayDirectionNV = 5322,
|
|
|
+ SpvBuiltInObjectRayOriginKHR = 5323,
|
|
|
SpvBuiltInObjectRayOriginNV = 5323,
|
|
|
+ SpvBuiltInObjectRayDirectionKHR = 5324,
|
|
|
SpvBuiltInObjectRayDirectionNV = 5324,
|
|
|
+ SpvBuiltInRayTminKHR = 5325,
|
|
|
SpvBuiltInRayTminNV = 5325,
|
|
|
+ SpvBuiltInRayTmaxKHR = 5326,
|
|
|
SpvBuiltInRayTmaxNV = 5326,
|
|
|
+ SpvBuiltInInstanceCustomIndexKHR = 5327,
|
|
|
SpvBuiltInInstanceCustomIndexNV = 5327,
|
|
|
+ SpvBuiltInObjectToWorldKHR = 5330,
|
|
|
SpvBuiltInObjectToWorldNV = 5330,
|
|
|
+ SpvBuiltInWorldToObjectKHR = 5331,
|
|
|
SpvBuiltInWorldToObjectNV = 5331,
|
|
|
+ SpvBuiltInHitTKHR = 5332,
|
|
|
SpvBuiltInHitTNV = 5332,
|
|
|
+ SpvBuiltInHitKindKHR = 5333,
|
|
|
SpvBuiltInHitKindNV = 5333,
|
|
|
+ SpvBuiltInIncomingRayFlagsKHR = 5351,
|
|
|
SpvBuiltInIncomingRayFlagsNV = 5351,
|
|
|
+ SpvBuiltInRayGeometryIndexKHR = 5352,
|
|
|
SpvBuiltInWarpsPerSMNV = 5374,
|
|
|
SpvBuiltInSMCountNV = 5375,
|
|
|
SpvBuiltInWarpIDNV = 5376,
|
|
|
@@ -713,6 +740,7 @@ typedef enum SpvScope_ {
|
|
|
SpvScopeInvocation = 4,
|
|
|
SpvScopeQueueFamily = 5,
|
|
|
SpvScopeQueueFamilyKHR = 5,
|
|
|
+ SpvScopeShaderCallKHR = 6,
|
|
|
SpvScopeMax = 0x7fffffff,
|
|
|
} SpvScope;
|
|
|
|
|
|
@@ -837,6 +865,8 @@ typedef enum SpvCapability_ {
|
|
|
SpvCapabilitySignedZeroInfNanPreserve = 4466,
|
|
|
SpvCapabilityRoundingModeRTE = 4467,
|
|
|
SpvCapabilityRoundingModeRTZ = 4468,
|
|
|
+ SpvCapabilityRayQueryProvisionalKHR = 4471,
|
|
|
+ SpvCapabilityRayTraversalPrimitiveCullingProvisionalKHR = 4478,
|
|
|
SpvCapabilityFloat16ImageAMD = 5008,
|
|
|
SpvCapabilityImageGatherBiasLodAMD = 5009,
|
|
|
SpvCapabilityFragmentMaskAMD = 5010,
|
|
|
@@ -890,6 +920,7 @@ typedef enum SpvCapability_ {
|
|
|
SpvCapabilityPhysicalStorageBufferAddresses = 5347,
|
|
|
SpvCapabilityPhysicalStorageBufferAddressesEXT = 5347,
|
|
|
SpvCapabilityComputeDerivativeGroupLinearNV = 5350,
|
|
|
+ SpvCapabilityRayTracingProvisionalKHR = 5353,
|
|
|
SpvCapabilityCooperativeMatrixNV = 5357,
|
|
|
SpvCapabilityFragmentShaderSampleInterlockEXT = 5363,
|
|
|
SpvCapabilityFragmentShaderShadingRateInterlockEXT = 5372,
|
|
|
@@ -907,6 +938,53 @@ typedef enum SpvCapability_ {
|
|
|
SpvCapabilityMax = 0x7fffffff,
|
|
|
} SpvCapability;
|
|
|
|
|
|
+typedef enum SpvRayFlagsShift_ {
|
|
|
+ SpvRayFlagsOpaqueKHRShift = 0,
|
|
|
+ SpvRayFlagsNoOpaqueKHRShift = 1,
|
|
|
+ SpvRayFlagsTerminateOnFirstHitKHRShift = 2,
|
|
|
+ SpvRayFlagsSkipClosestHitShaderKHRShift = 3,
|
|
|
+ SpvRayFlagsCullBackFacingTrianglesKHRShift = 4,
|
|
|
+ SpvRayFlagsCullFrontFacingTrianglesKHRShift = 5,
|
|
|
+ SpvRayFlagsCullOpaqueKHRShift = 6,
|
|
|
+ SpvRayFlagsCullNoOpaqueKHRShift = 7,
|
|
|
+ SpvRayFlagsSkipTrianglesKHRShift = 8,
|
|
|
+ SpvRayFlagsSkipAABBsKHRShift = 9,
|
|
|
+ SpvRayFlagsMax = 0x7fffffff,
|
|
|
+} SpvRayFlagsShift;
|
|
|
+
|
|
|
+typedef enum SpvRayFlagsMask_ {
|
|
|
+ SpvRayFlagsMaskNone = 0,
|
|
|
+ SpvRayFlagsOpaqueKHRMask = 0x00000001,
|
|
|
+ SpvRayFlagsNoOpaqueKHRMask = 0x00000002,
|
|
|
+ SpvRayFlagsTerminateOnFirstHitKHRMask = 0x00000004,
|
|
|
+ SpvRayFlagsSkipClosestHitShaderKHRMask = 0x00000008,
|
|
|
+ SpvRayFlagsCullBackFacingTrianglesKHRMask = 0x00000010,
|
|
|
+ SpvRayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020,
|
|
|
+ SpvRayFlagsCullOpaqueKHRMask = 0x00000040,
|
|
|
+ SpvRayFlagsCullNoOpaqueKHRMask = 0x00000080,
|
|
|
+ SpvRayFlagsSkipTrianglesKHRMask = 0x00000100,
|
|
|
+ SpvRayFlagsSkipAABBsKHRMask = 0x00000200,
|
|
|
+} SpvRayFlagsMask;
|
|
|
+
|
|
|
+typedef enum SpvRayQueryIntersection_ {
|
|
|
+ SpvRayQueryIntersectionRayQueryCandidateIntersectionKHR = 0,
|
|
|
+ SpvRayQueryIntersectionRayQueryCommittedIntersectionKHR = 1,
|
|
|
+ SpvRayQueryIntersectionMax = 0x7fffffff,
|
|
|
+} SpvRayQueryIntersection;
|
|
|
+
|
|
|
+typedef enum SpvRayQueryCommittedIntersectionType_ {
|
|
|
+ SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0,
|
|
|
+ SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1,
|
|
|
+ SpvRayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2,
|
|
|
+ SpvRayQueryCommittedIntersectionTypeMax = 0x7fffffff,
|
|
|
+} SpvRayQueryCommittedIntersectionType;
|
|
|
+
|
|
|
+typedef enum SpvRayQueryCandidateIntersectionType_ {
|
|
|
+ SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0,
|
|
|
+ SpvRayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1,
|
|
|
+ SpvRayQueryCandidateIntersectionTypeMax = 0x7fffffff,
|
|
|
+} SpvRayQueryCandidateIntersectionType;
|
|
|
+
|
|
|
typedef enum SpvOp_ {
|
|
|
SpvOpNop = 0,
|
|
|
SpvOpUndef = 1,
|
|
|
@@ -1258,6 +1336,13 @@ typedef enum SpvOp_ {
|
|
|
SpvOpSubgroupAnyKHR = 4429,
|
|
|
SpvOpSubgroupAllEqualKHR = 4430,
|
|
|
SpvOpSubgroupReadInvocationKHR = 4432,
|
|
|
+ SpvOpTypeRayQueryProvisionalKHR = 4472,
|
|
|
+ SpvOpRayQueryInitializeKHR = 4473,
|
|
|
+ SpvOpRayQueryTerminateKHR = 4474,
|
|
|
+ SpvOpRayQueryGenerateIntersectionKHR = 4475,
|
|
|
+ SpvOpRayQueryConfirmIntersectionKHR = 4476,
|
|
|
+ SpvOpRayQueryProceedKHR = 4477,
|
|
|
+ SpvOpRayQueryGetIntersectionTypeKHR = 4479,
|
|
|
SpvOpGroupIAddNonUniformAMD = 5000,
|
|
|
SpvOpGroupFAddNonUniformAMD = 5001,
|
|
|
SpvOpGroupFMinNonUniformAMD = 5002,
|
|
|
@@ -1272,11 +1357,17 @@ typedef enum SpvOp_ {
|
|
|
SpvOpImageSampleFootprintNV = 5283,
|
|
|
SpvOpGroupNonUniformPartitionNV = 5296,
|
|
|
SpvOpWritePackedPrimitiveIndices4x8NV = 5299,
|
|
|
+ SpvOpReportIntersectionKHR = 5334,
|
|
|
SpvOpReportIntersectionNV = 5334,
|
|
|
+ SpvOpIgnoreIntersectionKHR = 5335,
|
|
|
SpvOpIgnoreIntersectionNV = 5335,
|
|
|
+ SpvOpTerminateRayKHR = 5336,
|
|
|
SpvOpTerminateRayNV = 5336,
|
|
|
SpvOpTraceNV = 5337,
|
|
|
+ SpvOpTraceRayKHR = 5337,
|
|
|
+ SpvOpTypeAccelerationStructureKHR = 5341,
|
|
|
SpvOpTypeAccelerationStructureNV = 5341,
|
|
|
+ SpvOpExecuteCallableKHR = 5344,
|
|
|
SpvOpExecuteCallableNV = 5344,
|
|
|
SpvOpTypeCooperativeMatrixNV = 5358,
|
|
|
SpvOpCooperativeMatrixLoadNV = 5359,
|
|
|
@@ -1433,6 +1524,23 @@ typedef enum SpvOp_ {
|
|
|
SpvOpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814,
|
|
|
SpvOpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815,
|
|
|
SpvOpSubgroupAvcSicGetInterRawSadsINTEL = 5816,
|
|
|
+ SpvOpRayQueryGetRayTMinKHR = 6016,
|
|
|
+ SpvOpRayQueryGetRayFlagsKHR = 6017,
|
|
|
+ SpvOpRayQueryGetIntersectionTKHR = 6018,
|
|
|
+ SpvOpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019,
|
|
|
+ SpvOpRayQueryGetIntersectionInstanceIdKHR = 6020,
|
|
|
+ SpvOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021,
|
|
|
+ SpvOpRayQueryGetIntersectionGeometryIndexKHR = 6022,
|
|
|
+ SpvOpRayQueryGetIntersectionPrimitiveIndexKHR = 6023,
|
|
|
+ SpvOpRayQueryGetIntersectionBarycentricsKHR = 6024,
|
|
|
+ SpvOpRayQueryGetIntersectionFrontFaceKHR = 6025,
|
|
|
+ SpvOpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026,
|
|
|
+ SpvOpRayQueryGetIntersectionObjectRayDirectionKHR = 6027,
|
|
|
+ SpvOpRayQueryGetIntersectionObjectRayOriginKHR = 6028,
|
|
|
+ SpvOpRayQueryGetWorldRayDirectionKHR = 6029,
|
|
|
+ SpvOpRayQueryGetWorldRayOriginKHR = 6030,
|
|
|
+ SpvOpRayQueryGetIntersectionObjectToWorldKHR = 6031,
|
|
|
+ SpvOpRayQueryGetIntersectionWorldToObjectKHR = 6032,
|
|
|
SpvOpMax = 0x7fffffff,
|
|
|
} SpvOp;
|
|
|
|
|
|
@@ -1810,6 +1918,30 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy
|
|
|
case SpvOpTerminateRayNV: *hasResult = false; *hasResultType = false; break;
|
|
|
case SpvOpTraceNV: *hasResult = false; *hasResultType = false; break;
|
|
|
case SpvOpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break;
|
|
|
+ case SpvOpTypeRayQueryProvisionalKHR: *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 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 SpvOpExecuteCallableNV: *hasResult = false; *hasResultType = false; break;
|
|
|
case SpvOpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break;
|
|
|
case SpvOpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break;
|