diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json index e73a2fc06..541f4fdc1 100644 --- a/include/spirv/unified1/spirv.core.grammar.json +++ b/include/spirv/unified1/spirv.core.grammar.json @@ -5373,6 +5373,7 @@ { "kind" : "IdRef", "name": "'Node Index'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -5383,6 +5384,7 @@ { "kind" : "IdRef", "name": "'Payload Array'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -5394,6 +5396,7 @@ { "kind" : "IdRef", "name": "'Payload Type'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -5406,6 +5409,7 @@ { "kind" : "IdRef", "name": "'Payload'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -5418,6 +5422,7 @@ { "kind" : "IdRef", "name": "'Payload Array'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -5431,6 +5436,7 @@ { "kind" : "IdRef", "name": "'Node Index'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version": "None" }, { @@ -5442,6 +5448,7 @@ { "kind" : "LiteralString", "name": "'Literal String'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version": "None" }, { @@ -5453,6 +5460,7 @@ { "kind" : "LiteralString", "name": "'Literal String'" } ], "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version": "None" }, { @@ -11610,6 +11618,7 @@ "enumerant" : "CoalescingAMDX", "value" : 5069, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -11619,6 +11628,7 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Is Entry'" } ], + "provisional" : true, "version" : "None" }, { @@ -11628,6 +11638,7 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Number of recursions'" } ], + "provisional" : true, "version" : "None" }, { @@ -11639,6 +11650,7 @@ { "kind" : "IdRef", "name" : "'y size'" }, { "kind" : "IdRef", "name" : "'z size'" } ], + "provisional" : true, "version" : "None" }, { @@ -11648,6 +11660,7 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Shader Index'" } ], + "provisional" : true, "version" : "None" }, { @@ -11659,6 +11672,7 @@ { "kind" : "IdRef", "name" : "'y size'" }, { "kind" : "IdRef", "name" : "'z size'" } ], + "provisional" : true, "version" : "None" }, { @@ -11723,6 +11737,7 @@ { "kind" : "IdRef", "name" : "'Node Name'" }, { "kind" : "IdRef", "name" : "'Shader Index'" } ], + "provisional" : true, "version" : "None" }, { @@ -12066,6 +12081,7 @@ "enumerant" : "NodePayloadAMDX", "value" : 5068, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -13409,6 +13425,7 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Payload Type'" } ], + "provisional" : true, "version" : "None" }, { @@ -13418,12 +13435,14 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Max number of payloads'" } ], + "provisional" : true, "version" : "None" }, { "enumerant" : "TrackFinishWritingAMDX", "value" : 5078, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -13433,6 +13452,7 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Node Name'" } ], + "provisional" : true, "version" : "None" }, { @@ -13442,12 +13462,14 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Base Index'" } ], + "provisional" : true, "version" : "None" }, { "enumerant" : "PayloadNodeSparseArrayAMDX", "value" : 5099, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -13457,12 +13479,14 @@ "parameters" : [ { "kind" : "IdRef", "name" : "'Array Size'" } ], + "provisional" : true, "version" : "None" }, { "enumerant" : "PayloadDispatchIndirectAMDX", "value" : 5105, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -14544,12 +14568,14 @@ "enumerant" : "RemainingRecursionLevelsAMDX", "value" : 5021, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { "enumerant" : "ShaderIndexAMDX", "value" : 5073, "capabilities" : [ "ShaderEnqueueAMDX" ], + "provisional" : true, "version" : "None" }, { @@ -15733,6 +15759,7 @@ "value" : 5067, "capabilities" : [ "Shader" ], "extensions" : [ "SPV_AMDX_shader_enqueue" ], + "provisional" : true, "version" : "None" }, { diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h index f588d6625..22d5c0fb7 100644 --- a/include/spirv/unified1/spirv.h +++ b/include/spirv/unified1/spirv.h @@ -177,12 +177,24 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeRoundingModeRTZ = 4463, SpvExecutionModeEarlyAndLateFragmentTestsAMD = 5017, SpvExecutionModeStencilRefReplacingEXT = 5027, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeCoalescingAMDX = 5069, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeIsApiEntryAMDX = 5070, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeMaxNodeRecursionAMDX = 5071, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeStaticNumWorkgroupsAMDX = 5072, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeShaderIndexAMDX = 5073, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeMaxNumWorkgroupsAMDX = 5077, +#endif SpvExecutionModeStencilRefUnchangedFrontAMD = 5079, SpvExecutionModeStencilRefGreaterFrontAMD = 5080, SpvExecutionModeStencilRefLessFrontAMD = 5081, @@ -191,7 +203,9 @@ typedef enum SpvExecutionMode_ { SpvExecutionModeStencilRefLessBackAMD = 5084, SpvExecutionModeQuadDerivativesKHR = 5088, SpvExecutionModeRequireFullQuadsKHR = 5089, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvExecutionModeSharesInputWithAMDX = 5102, +#endif SpvExecutionModeOutputLinesEXT = 5269, SpvExecutionModeOutputLinesNV = 5269, SpvExecutionModeOutputPrimitivesEXT = 5270, @@ -244,7 +258,9 @@ typedef enum SpvStorageClass_ { SpvStorageClassImage = 11, SpvStorageClassStorageBuffer = 12, SpvStorageClassTileImageEXT = 4172, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvStorageClassNodePayloadAMDX = 5068, +#endif SpvStorageClassCallableDataKHR = 5328, SpvStorageClassCallableDataNV = 5328, SpvStorageClassIncomingCallableDataKHR = 5329, @@ -553,14 +569,30 @@ typedef enum SpvDecoration_ { SpvDecorationBlockMatchTextureQCOM = 4488, SpvDecorationBlockMatchSamplerQCOM = 4499, SpvDecorationExplicitInterpAMD = 4999, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationNodeSharesPayloadLimitsWithAMDX = 5019, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationNodeMaxPayloadsAMDX = 5020, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationTrackFinishWritingAMDX = 5078, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationPayloadNodeNameAMDX = 5091, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationPayloadNodeBaseIndexAMDX = 5098, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationPayloadNodeSparseArrayAMDX = 5099, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationPayloadNodeArraySizeAMDX = 5100, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvDecorationPayloadDispatchIndirectAMDX = 5105, +#endif SpvDecorationOverrideCoverageNV = 5248, SpvDecorationPassthroughNV = 5250, SpvDecorationViewportRelativeNV = 5252, @@ -724,8 +756,12 @@ typedef enum SpvBuiltIn_ { SpvBuiltInBaryCoordSmoothSampleAMD = 4997, SpvBuiltInBaryCoordPullModelAMD = 4998, SpvBuiltInFragStencilRefEXT = 5014, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvBuiltInRemainingRecursionLevelsAMDX = 5021, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvBuiltInShaderIndexAMDX = 5073, +#endif SpvBuiltInViewportMaskNV = 5253, SpvBuiltInSecondaryPositionNV = 5257, SpvBuiltInSecondaryViewportMaskNV = 5258, @@ -1103,7 +1139,9 @@ typedef enum SpvCapability_ { SpvCapabilityImageReadWriteLodAMD = 5015, SpvCapabilityInt64ImageEXT = 5016, SpvCapabilityShaderClockKHR = 5055, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvCapabilityShaderEnqueueAMDX = 5067, +#endif SpvCapabilityQuadControlKHR = 5087, SpvCapabilitySampleMaskOverrideCoverageNV = 5249, SpvCapabilityGeometryShaderPassthroughNV = 5251, @@ -1900,14 +1938,30 @@ typedef enum SpvOp_ { SpvOpFragmentMaskFetchAMD = 5011, SpvOpFragmentFetchAMD = 5012, SpvOpReadClockKHR = 5056, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpAllocateNodePayloadsAMDX = 5074, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpEnqueueNodePayloadsAMDX = 5075, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpTypeNodePayloadArrayAMDX = 5076, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpFinishWritingNodePayloadAMDX = 5078, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpNodePayloadArrayLengthAMDX = 5090, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpIsNodePayloadValidAMDX = 5101, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpConstantStringAMDX = 5103, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS SpvOpSpecConstantStringAMDX = 5104, +#endif SpvOpGroupNonUniformQuadAllKHR = 5110, SpvOpGroupNonUniformQuadAnyKHR = 5111, SpvOpHitObjectRecordHitMotionNV = 5249, diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp index 76e07a6b5..904825aa7 100644 --- a/include/spirv/unified1/spirv.hpp +++ b/include/spirv/unified1/spirv.hpp @@ -173,12 +173,24 @@ enum ExecutionMode { ExecutionModeRoundingModeRTZ = 4463, ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, ExecutionModeStencilRefReplacingEXT = 5027, +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeCoalescingAMDX = 5069, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeIsApiEntryAMDX = 5070, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeMaxNodeRecursionAMDX = 5071, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeStaticNumWorkgroupsAMDX = 5072, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeShaderIndexAMDX = 5073, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeMaxNumWorkgroupsAMDX = 5077, +#endif ExecutionModeStencilRefUnchangedFrontAMD = 5079, ExecutionModeStencilRefGreaterFrontAMD = 5080, ExecutionModeStencilRefLessFrontAMD = 5081, @@ -187,7 +199,9 @@ enum ExecutionMode { ExecutionModeStencilRefLessBackAMD = 5084, ExecutionModeQuadDerivativesKHR = 5088, ExecutionModeRequireFullQuadsKHR = 5089, +#ifdef SPV_ENABLE_BETA_EXTENSIONS ExecutionModeSharesInputWithAMDX = 5102, +#endif ExecutionModeOutputLinesEXT = 5269, ExecutionModeOutputLinesNV = 5269, ExecutionModeOutputPrimitivesEXT = 5270, @@ -240,7 +254,9 @@ enum StorageClass { StorageClassImage = 11, StorageClassStorageBuffer = 12, StorageClassTileImageEXT = 4172, +#ifdef SPV_ENABLE_BETA_EXTENSIONS StorageClassNodePayloadAMDX = 5068, +#endif StorageClassCallableDataKHR = 5328, StorageClassCallableDataNV = 5328, StorageClassIncomingCallableDataKHR = 5329, @@ -549,14 +565,30 @@ enum Decoration { DecorationBlockMatchTextureQCOM = 4488, DecorationBlockMatchSamplerQCOM = 4499, DecorationExplicitInterpAMD = 4999, +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationNodeSharesPayloadLimitsWithAMDX = 5019, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationNodeMaxPayloadsAMDX = 5020, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationTrackFinishWritingAMDX = 5078, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationPayloadNodeNameAMDX = 5091, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationPayloadNodeBaseIndexAMDX = 5098, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationPayloadNodeSparseArrayAMDX = 5099, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationPayloadNodeArraySizeAMDX = 5100, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS DecorationPayloadDispatchIndirectAMDX = 5105, +#endif DecorationOverrideCoverageNV = 5248, DecorationPassthroughNV = 5250, DecorationViewportRelativeNV = 5252, @@ -720,8 +752,12 @@ enum BuiltIn { BuiltInBaryCoordSmoothSampleAMD = 4997, BuiltInBaryCoordPullModelAMD = 4998, BuiltInFragStencilRefEXT = 5014, +#ifdef SPV_ENABLE_BETA_EXTENSIONS BuiltInRemainingRecursionLevelsAMDX = 5021, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS BuiltInShaderIndexAMDX = 5073, +#endif BuiltInViewportMaskNV = 5253, BuiltInSecondaryPositionNV = 5257, BuiltInSecondaryViewportMaskNV = 5258, @@ -1099,7 +1135,9 @@ enum Capability { CapabilityImageReadWriteLodAMD = 5015, CapabilityInt64ImageEXT = 5016, CapabilityShaderClockKHR = 5055, +#ifdef SPV_ENABLE_BETA_EXTENSIONS CapabilityShaderEnqueueAMDX = 5067, +#endif CapabilityQuadControlKHR = 5087, CapabilitySampleMaskOverrideCoverageNV = 5249, CapabilityGeometryShaderPassthroughNV = 5251, @@ -1896,14 +1934,30 @@ enum Op { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpAllocateNodePayloadsAMDX = 5074, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpEnqueueNodePayloadsAMDX = 5075, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpTypeNodePayloadArrayAMDX = 5076, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpFinishWritingNodePayloadAMDX = 5078, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpNodePayloadArrayLengthAMDX = 5090, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpIsNodePayloadValidAMDX = 5101, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpConstantStringAMDX = 5103, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpSpecConstantStringAMDX = 5104, +#endif OpGroupNonUniformQuadAllKHR = 5110, OpGroupNonUniformQuadAnyKHR = 5111, OpHitObjectRecordHitMotionNV = 5249, diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11 index 030f0314a..08fd9c67c 100644 --- a/include/spirv/unified1/spirv.hpp11 +++ b/include/spirv/unified1/spirv.hpp11 @@ -173,12 +173,24 @@ enum class ExecutionMode : unsigned { RoundingModeRTZ = 4463, EarlyAndLateFragmentTestsAMD = 5017, StencilRefReplacingEXT = 5027, +#ifdef SPV_ENABLE_BETA_EXTENSIONS CoalescingAMDX = 5069, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS IsApiEntryAMDX = 5070, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS MaxNodeRecursionAMDX = 5071, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS StaticNumWorkgroupsAMDX = 5072, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ShaderIndexAMDX = 5073, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS MaxNumWorkgroupsAMDX = 5077, +#endif StencilRefUnchangedFrontAMD = 5079, StencilRefGreaterFrontAMD = 5080, StencilRefLessFrontAMD = 5081, @@ -187,7 +199,9 @@ enum class ExecutionMode : unsigned { StencilRefLessBackAMD = 5084, QuadDerivativesKHR = 5088, RequireFullQuadsKHR = 5089, +#ifdef SPV_ENABLE_BETA_EXTENSIONS SharesInputWithAMDX = 5102, +#endif OutputLinesEXT = 5269, OutputLinesNV = 5269, OutputPrimitivesEXT = 5270, @@ -240,7 +254,9 @@ enum class StorageClass : unsigned { Image = 11, StorageBuffer = 12, TileImageEXT = 4172, +#ifdef SPV_ENABLE_BETA_EXTENSIONS NodePayloadAMDX = 5068, +#endif CallableDataKHR = 5328, CallableDataNV = 5328, IncomingCallableDataKHR = 5329, @@ -549,14 +565,30 @@ enum class Decoration : unsigned { BlockMatchTextureQCOM = 4488, BlockMatchSamplerQCOM = 4499, ExplicitInterpAMD = 4999, +#ifdef SPV_ENABLE_BETA_EXTENSIONS NodeSharesPayloadLimitsWithAMDX = 5019, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS NodeMaxPayloadsAMDX = 5020, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS TrackFinishWritingAMDX = 5078, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS PayloadNodeNameAMDX = 5091, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS PayloadNodeBaseIndexAMDX = 5098, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS PayloadNodeSparseArrayAMDX = 5099, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS PayloadNodeArraySizeAMDX = 5100, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS PayloadDispatchIndirectAMDX = 5105, +#endif OverrideCoverageNV = 5248, PassthroughNV = 5250, ViewportRelativeNV = 5252, @@ -720,8 +752,12 @@ enum class BuiltIn : unsigned { BaryCoordSmoothSampleAMD = 4997, BaryCoordPullModelAMD = 4998, FragStencilRefEXT = 5014, +#ifdef SPV_ENABLE_BETA_EXTENSIONS RemainingRecursionLevelsAMDX = 5021, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS ShaderIndexAMDX = 5073, +#endif ViewportMaskNV = 5253, SecondaryPositionNV = 5257, SecondaryViewportMaskNV = 5258, @@ -1099,7 +1135,9 @@ enum class Capability : unsigned { ImageReadWriteLodAMD = 5015, Int64ImageEXT = 5016, ShaderClockKHR = 5055, +#ifdef SPV_ENABLE_BETA_EXTENSIONS ShaderEnqueueAMDX = 5067, +#endif QuadControlKHR = 5087, SampleMaskOverrideCoverageNV = 5249, GeometryShaderPassthroughNV = 5251, @@ -1896,14 +1934,30 @@ enum class Op : unsigned { OpFragmentMaskFetchAMD = 5011, OpFragmentFetchAMD = 5012, OpReadClockKHR = 5056, +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpAllocateNodePayloadsAMDX = 5074, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpEnqueueNodePayloadsAMDX = 5075, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpTypeNodePayloadArrayAMDX = 5076, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpFinishWritingNodePayloadAMDX = 5078, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpNodePayloadArrayLengthAMDX = 5090, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpIsNodePayloadValidAMDX = 5101, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpConstantStringAMDX = 5103, +#endif +#ifdef SPV_ENABLE_BETA_EXTENSIONS OpSpecConstantStringAMDX = 5104, +#endif OpGroupNonUniformQuadAllKHR = 5110, OpGroupNonUniformQuadAnyKHR = 5111, OpHitObjectRecordHitMotionNV = 5249, diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 88a956c4e..622082fe2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -25,18 +25,18 @@ # MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. add_executable(spirv_headers_simple_test example.cpp) -target_compile_definitions(spirv_headers_simple_test PRIVATE SPV_ENABLE_UTILITY_CODE) +target_compile_definitions(spirv_headers_simple_test PRIVATE SPV_ENABLE_UTILITY_CODE SPV_ENABLE_BETA_EXTENSIONS) target_link_libraries(spirv_headers_simple_test PRIVATE SPIRV-Headers::SPIRV-Headers) add_test(NAME spirv_headers_simple_test COMMAND spirv_headers_simple_test) add_executable(spirv_headers_simple_test_cpp11 example11.cpp) -target_compile_definitions(spirv_headers_simple_test_cpp11 PRIVATE SPV_ENABLE_UTILITY_CODE) +target_compile_definitions(spirv_headers_simple_test_cpp11 PRIVATE SPV_ENABLE_UTILITY_CODE SPV_ENABLE_BETA_EXTENSIONS) target_link_libraries(spirv_headers_simple_test_cpp11 PRIVATE SPIRV-Headers::SPIRV-Headers) set_target_properties(spirv_headers_simple_test_cpp11 PROPERTIES CXX_STANDARD 11) add_test(NAME spirv_headers_simple_test_cpp11 COMMAND spirv_headers_simple_test_cpp11) add_executable(spirv_headers_simple_test_c example.c) -target_compile_definitions(spirv_headers_simple_test_c PRIVATE SPV_ENABLE_UTILITY_CODE) +target_compile_definitions(spirv_headers_simple_test_c PRIVATE SPV_ENABLE_UTILITY_CODE SPV_ENABLE_BETA_EXTENSIONS) target_link_libraries(spirv_headers_simple_test_c PRIVATE SPIRV-Headers::SPIRV-Headers) set_target_properties(spirv_headers_simple_test_c PROPERTIES C_STANDARD 99 LINKER_LANGUAGE C) add_test(NAME spirv_headers_simple_test_c COMMAND spirv_headers_simple_test_c) diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp index 4f89aa616..a77d85ed7 100644 --- a/tools/buildHeaders/header.cpp +++ b/tools/buildHeaders/header.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -123,6 +124,8 @@ namespace { enumStyle_t style) const { return enumFmt(s, v, style, true); } + virtual std::string enumProvisionalStart(const std::string& name) const { return ""; }; + virtual std::string enumProvisionalEnd(const std::string& name) const { return ""; }; virtual std::string fmtConstInt(unsigned val, const std::string& name, const char* fmt, bool isLast = false) const { @@ -153,6 +156,8 @@ namespace { void addComment(Json::Value& node, const std::string& str); Json::Value spvRoot; // JSON SPIR-V data + + std::unordered_set provisionalNames; }; // Format value as mask or value @@ -247,6 +252,10 @@ IN THE MATERIALS. for (auto& alias : enumRow.aliases) { enums[e - spv::OperandSource]["Values"][alias] = enumRow.value; } + + if (enumRow.provisional) { + provisionalNames.insert(name); + } } enums[e - spv::OperandSource]["Type"] = mask ? "Bit" : "Value"; @@ -263,6 +272,10 @@ IN THE MATERIALS. for (auto& alias : enumRow.aliases) { entry["Values"][alias] = enumRow.value; } + + if (enumRow.provisional) { + provisionalNames.insert(name); + } } entry["Type"] = "Value"; entry["Name"] = "Op"; @@ -358,8 +371,11 @@ IN THE MATERIALS. bool printMax = (style != enumMask && maxEnum.size() > 0); - for (const auto& v : sorted) + for (const auto& v : sorted) { + out << enumProvisionalStart(v.second); out << enumFmt(opPrefix, v, style, !printMax && v.second == sorted.back().second); + out << enumProvisionalEnd(v.second); + } if (printMax) out << maxEnum; @@ -528,6 +544,14 @@ IN THE MATERIALS. out << "#endif /* SPV_ENABLE_UTILITY_CODE */" << std::endl << std::endl; } + std::string enumProvisionalStart(const std::string& name) const override { + return (provisionalNames.count(name) > 0) ? "#ifdef SPV_ENABLE_BETA_EXTENSIONS\n" : ""; + } + + std::string enumProvisionalEnd(const std::string& name) const override { + return (provisionalNames.count(name) > 0) ? "#endif\n" : ""; + } + void printHasResultType(std::ostream& out) const { const Json::Value& enums = spvRoot["spv"]["enum"]; diff --git a/tools/buildHeaders/jsonToSpirv.cpp b/tools/buildHeaders/jsonToSpirv.cpp index 44ca7c08d..5270e0bec 100644 --- a/tools/buildHeaders/jsonToSpirv.cpp +++ b/tools/buildHeaders/jsonToSpirv.cpp @@ -592,6 +592,10 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) const auto opcode = inst["opcode"].asUInt(); const std::string name = inst["opname"].asString(); std::string version = inst["version"].asString(); + bool provisional = false; + if (!inst["provisional"].isNull()) { + provisional = inst["provisional"].asBool(); + } if (firstOpcode) { maxOpcode = opcode; maxName = name; @@ -632,8 +636,8 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) InstructionDesc.emplace_back( std::move(EnumValue(opcode, name, std::move(aliases), std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), - std::move(operands))), - printingClass, defTypeId, defResultId); + std::move(operands), provisional)), + printingClass, defTypeId, defResultId, provisional); if (!InstructionDesc.back().IsValid(OperandOpcode, "instruction")) { errorCount++; } @@ -669,6 +673,10 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) std::tie(value, skip_zero_in_bitfield) = getValue(enumerant); std::string name = enumerant["enumerant"].asString(); std::string version = enumerant["version"].asString(); + bool provisional = false; + if (!enumerant["provisional"].isNull()) { + provisional = enumerant["provisional"].asBool(); + } if (skip_zero_in_bitfield) continue; if (firstValue) { @@ -709,7 +717,7 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) } dest->emplace_back( value, enumerant["enumerant"].asString(), std::move(aliases), - std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(params)); + std::move(caps), std::move(version), std::move(lastVersion), std::move(exts), std::move(params), provisional); } }; diff --git a/tools/buildHeaders/jsonToSpirv.h b/tools/buildHeaders/jsonToSpirv.h index 263abb05f..763cba368 100644 --- a/tools/buildHeaders/jsonToSpirv.h +++ b/tools/buildHeaders/jsonToSpirv.h @@ -213,10 +213,10 @@ class EnumValue { EnumValue() : value(0), desc(nullptr) {} EnumValue(unsigned int the_value, const std::string& the_name, Aliases&& the_aliases, EnumCaps&& the_caps, const std::string& the_firstVersion, const std::string& the_lastVersion, - Extensions&& the_extensions, OperandParameters&& the_operands) : + Extensions&& the_extensions, OperandParameters&& the_operands, bool is_provisional) : value(the_value), name(the_name), aliases(std::move(the_aliases)), capabilities(std::move(the_caps)), firstVersion(std::move(the_firstVersion)), lastVersion(std::move(the_lastVersion)), - extensions(std::move(the_extensions)), operands(std::move(the_operands)), desc(nullptr) { } + extensions(std::move(the_extensions)), operands(std::move(the_operands)), provisional(is_provisional), desc(nullptr) { } bool hasAliases() const { return !aliases.empty(); } @@ -235,6 +235,7 @@ class EnumValue { // other enums and instructions are enabled by those capabilities. Extensions extensions; OperandParameters operands; + bool provisional; const char* desc; // Returns true if this enum is valid, in isolation. @@ -282,9 +283,10 @@ class EnumDefinition { // per OperandParameters above. class InstructionValue : public EnumValue { public: - InstructionValue(EnumValue&& e, const std::string& printClass, bool has_type, bool has_result) + InstructionValue(EnumValue&& e, const std::string& printClass, bool has_type, bool has_result, bool is_provisional) : EnumValue(std::move(e)), printingClass(printClass), + provisional(is_provisional), opDesc("TBD."), typePresent(has_type), resultPresent(has_result) { } @@ -297,6 +299,7 @@ class InstructionValue : public EnumValue { bool hasType() const { return typePresent != 0; } std::string printingClass; + bool provisional; const char* opDesc; protected: