--- src/compiler/spirv/spirv.core.grammar.json | 95 ++++++++++++++++++++-- src/compiler/spirv/spirv.h | 24 ++++++ 2 files changed, 114 insertions(+), 5 deletions(-)
diff --git a/src/compiler/spirv/spirv.core.grammar.json b/src/compiler/spirv/spirv.core.grammar.json index cb641420d07..978353ae97c 100644 --- a/src/compiler/spirv/spirv.core.grammar.json +++ b/src/compiler/spirv/spirv.core.grammar.json @@ -4010,6 +4010,32 @@ "parameters" : [ { "kind" : "IdRef" } ] + }, + { + "enumerant" : "MakeTexelAvailableKHR", + "value" : "0x0100", + "capabilities" : [ "VulkanMemoryModelKHR" ], + "parameters" : [ + { "kind" : "IdScope" } + ] + }, + { + "enumerant" : "MakeTexelVisibleKHR", + "value" : "0x0200", + "capabilities" : [ "VulkanMemoryModelKHR" ], + "parameters" : [ + { "kind" : "IdScope" } + ] + }, + { + "enumerant" : "NonPrivateTexelKHR", + "value" : "0x0400", + "capabilities" : [ "VulkanMemoryModelKHR" ] + }, + { + "enumerant" : "VolatileTexelKHR", + "value" : "0x0800", + "capabilities" : [ "VulkanMemoryModelKHR" ] } ] }, @@ -4176,6 +4202,21 @@ { "enumerant" : "ImageMemory", "value" : "0x0800" + }, + { + "enumerant" : "OutputMemoryKHR", + "value" : "0x1000", + "capabilities" : [ "VulkanMemoryModelKHR" ] + }, + { + "enumerant" : "MakeAvailableKHR", + "value" : "0x2000", + "capabilities" : [ "VulkanMemoryModelKHR" ] + }, + { + "enumerant" : "MakeVisibleKHR", + "value" : "0x4000", + "capabilities" : [ "VulkanMemoryModelKHR" ] } ] }, @@ -4201,6 +4242,27 @@ { "enumerant" : "Nontemporal", "value" : "0x0004" + }, + { + "enumerant" : "MakePointerAvailableKHR", + "value" : "0x0008", + "parameters" : [ + { "kind" : "IdScope" } + ], + "capabilities" : [ "VulkanMemoryModelKHR" ] + }, + { + "enumerant" : "MakePointerVisibleKHR", + "value" : "0x0010", + "parameters" : [ + { "kind" : "IdScope" } + ], + "capabilities" : [ "VulkanMemoryModelKHR" ] + }, + { + "enumerant" : "NonPrivatePointerKHR", + "value" : "0x0020", + "capabilities" : [ "VulkanMemoryModelKHR" ] } ] }, @@ -4328,6 +4390,11 @@ "enumerant" : "OpenCL", "value" : 2, "capabilities" : [ "Kernel" ] + }, + { + "enumerant" : "VulkanKHR", + "value" : 3, + "capabilities" : [ "VulkanMemoryModelKHR" ] } ] }, @@ -4659,11 +4726,12 @@ { "enumerant" : "1D", "value" : 0, - "capabilities" : [ "Sampled1D" ] + "capabilities" : [ "Sampled1D", "Image1D" ] }, { "enumerant" : "2D", - "value" : 1 + "value" : 1, + "capabilities" : [ "Shader", "Kernel", "ImageMSArray" ] }, { "enumerant" : "3D", @@ -4672,17 +4740,17 @@ { "enumerant" : "Cube", "value" : 3, - "capabilities" : [ "Shader" ] + "capabilities" : [ "Shader", "ImageCubeArray" ] }, { "enumerant" : "Rect", "value" : 4, - "capabilities" : [ "SampledRect" ] + "capabilities" : [ "SampledRect", "ImageRect" ] }, { "enumerant" : "Buffer", "value" : 5, - "capabilities" : [ "SampledBuffer" ] + "capabilities" : [ "SampledBuffer", "ImageBuffer" ] }, { "enumerant" : "SubpassData", @@ -6018,6 +6086,11 @@ { "enumerant" : "Invocation", "value" : 4 + }, + { + "enumerant" : "QueueFamilyKHR", + "value" : 5, + "capabilities" : [ "VulkanMemoryModelKHR" ] } ] }, @@ -6746,6 +6819,18 @@ "value" : 5297, "extensions" : [ "SPV_NV_shader_subgroup_partitioned" ], "version" : "None" + }, + { + "enumerant" : "VulkanMemoryModelKHR", + "value" : 5345, + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "None" + }, + { + "enumerant" : "VulkanMemoryModelDeviceScopeKHR", + "value" : 5346, + "extensions" : [ "SPV_KHR_vulkan_memory_model" ], + "version" : "None" } ] }, diff --git a/src/compiler/spirv/spirv.h b/src/compiler/spirv/spirv.h index 4c90c936ce0..314c5f97cff 100644 --- a/src/compiler/spirv/spirv.h +++ b/src/compiler/spirv/spirv.h @@ -91,6 +91,7 @@ typedef enum SpvMemoryModel_ { SpvMemoryModelSimple = 0, SpvMemoryModelGLSL450 = 1, SpvMemoryModelOpenCL = 2, + SpvMemoryModelVulkanKHR = 3, SpvMemoryModelMax = 0x7fffffff, } SpvMemoryModel; @@ -279,6 +280,10 @@ typedef enum SpvImageOperandsShift_ { SpvImageOperandsConstOffsetsShift = 5, SpvImageOperandsSampleShift = 6, SpvImageOperandsMinLodShift = 7, + SpvImageOperandsMakeTexelAvailableKHRShift = 8, + SpvImageOperandsMakeTexelVisibleKHRShift = 9, + SpvImageOperandsNonPrivateTexelKHRShift = 10, + SpvImageOperandsVolatileTexelKHRShift = 11, SpvImageOperandsMax = 0x7fffffff, } SpvImageOperandsShift; @@ -292,6 +297,10 @@ typedef enum SpvImageOperandsMask_ { SpvImageOperandsConstOffsetsMask = 0x00000020, SpvImageOperandsSampleMask = 0x00000040, SpvImageOperandsMinLodMask = 0x00000080, + SpvImageOperandsMakeTexelAvailableKHRMask = 0x00000100, + SpvImageOperandsMakeTexelVisibleKHRMask = 0x00000200, + SpvImageOperandsNonPrivateTexelKHRMask = 0x00000400, + SpvImageOperandsVolatileTexelKHRMask = 0x00000800, } SpvImageOperandsMask; typedef enum SpvFPFastMathModeShift_ { @@ -532,6 +541,9 @@ typedef enum SpvMemorySemanticsShift_ { SpvMemorySemanticsCrossWorkgroupMemoryShift = 9, SpvMemorySemanticsAtomicCounterMemoryShift = 10, SpvMemorySemanticsImageMemoryShift = 11, + SpvMemorySemanticsOutputMemoryKHRShift = 12, + SpvMemorySemanticsMakeAvailableKHRShift = 13, + SpvMemorySemanticsMakeVisibleKHRShift = 14, SpvMemorySemanticsMax = 0x7fffffff, } SpvMemorySemanticsShift; @@ -547,12 +559,18 @@ typedef enum SpvMemorySemanticsMask_ { SpvMemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, SpvMemorySemanticsAtomicCounterMemoryMask = 0x00000400, SpvMemorySemanticsImageMemoryMask = 0x00000800, + SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000, + SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000, + SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000, } SpvMemorySemanticsMask; typedef enum SpvMemoryAccessShift_ { SpvMemoryAccessVolatileShift = 0, SpvMemoryAccessAlignedShift = 1, SpvMemoryAccessNontemporalShift = 2, + SpvMemoryAccessMakePointerAvailableKHRShift = 3, + SpvMemoryAccessMakePointerVisibleKHRShift = 4, + SpvMemoryAccessNonPrivatePointerKHRShift = 5, SpvMemoryAccessMax = 0x7fffffff, } SpvMemoryAccessShift; @@ -561,6 +579,9 @@ typedef enum SpvMemoryAccessMask_ { SpvMemoryAccessVolatileMask = 0x00000001, SpvMemoryAccessAlignedMask = 0x00000002, SpvMemoryAccessNontemporalMask = 0x00000004, + SpvMemoryAccessMakePointerAvailableKHRMask = 0x00000008, + SpvMemoryAccessMakePointerVisibleKHRMask = 0x00000010, + SpvMemoryAccessNonPrivatePointerKHRMask = 0x00000020, } SpvMemoryAccessMask; typedef enum SpvScope_ { @@ -569,6 +590,7 @@ typedef enum SpvScope_ { SpvScopeWorkgroup = 2, SpvScopeSubgroup = 3, SpvScopeInvocation = 4, + SpvScopeQueueFamilyKHR = 5, SpvScopeMax = 0x7fffffff, } SpvScope; @@ -712,6 +734,8 @@ typedef enum SpvCapability_ { SpvCapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, SpvCapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, SpvCapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + SpvCapabilityVulkanMemoryModelKHR = 5345, + SpvCapabilityVulkanMemoryModelDeviceScopeKHR = 5346, SpvCapabilitySubgroupShuffleINTEL = 5568, SpvCapabilitySubgroupBufferBlockIOINTEL = 5569, SpvCapabilitySubgroupImageBlockIOINTEL = 5570, -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev