Add Volatile to Memory Semantics, for SPV_KHR_vulkan_memory_model
authorDavid Neto <dneto@google.com>
Wed, 12 Jun 2019 21:56:03 +0000 (17:56 -0400)
committerDavid Neto <dneto@google.com>
Wed, 12 Jun 2019 21:58:43 +0000 (17:58 -0400)
From Khronos-internal issue 476: Update SPV_KHR_vulkan_memory_model
to be able to express volatile OpAtomic* operations.

Also regenerate the language-specific headers.  This step fixes
two problems with UserTypeGOOGLE in those headers.

include/spirv/unified1/spirv.core.grammar.json
include/spirv/unified1/spirv.cs
include/spirv/unified1/spirv.h
include/spirv/unified1/spirv.hpp
include/spirv/unified1/spirv.hpp11
include/spirv/unified1/spirv.json
include/spirv/unified1/spirv.lua
include/spirv/unified1/spirv.py
include/spirv/unified1/spv.d

index c3f4239..13a2618 100644 (file)
           "value" : "0x4000",
           "capabilities" : [ "VulkanMemoryModelKHR" ],
           "version" : "None"
+        },
+        {
+          "enumerant" : "Volatile",
+          "value" : "0x8000",
+          "capabilities" : [ "VulkanMemoryModelKHR" ],
+          "version" : "None"
         }
       ]
     },
index 24470e0..99e95e7 100644 (file)
@@ -453,6 +453,7 @@ namespace Spv
             HlslCounterBufferGOOGLE = 5634,
             HlslSemanticGOOGLE = 5635,
             UserSemantic = 5635,
+            UserTypeGOOGLE = 5636,
         }
 
         public enum BuiltIn
@@ -633,6 +634,7 @@ namespace Spv
             OutputMemoryKHR = 12,
             MakeAvailableKHR = 13,
             MakeVisibleKHR = 14,
+            Volatile = 15,
         }
 
         public enum MemorySemanticsMask
@@ -651,6 +653,7 @@ namespace Spv
             OutputMemoryKHR = 0x00001000,
             MakeAvailableKHR = 0x00002000,
             MakeVisibleKHR = 0x00004000,
+            Volatile = 0x00008000,
         }
 
         public enum MemoryAccessShift
index 73389fe..67e3ae0 100644 (file)
@@ -637,6 +637,7 @@ typedef enum SpvMemorySemanticsShift_ {
     SpvMemorySemanticsOutputMemoryKHRShift = 12,
     SpvMemorySemanticsMakeAvailableKHRShift = 13,
     SpvMemorySemanticsMakeVisibleKHRShift = 14,
+    SpvMemorySemanticsVolatileShift = 15,
     SpvMemorySemanticsMax = 0x7fffffff,
 } SpvMemorySemanticsShift;
 
@@ -655,6 +656,7 @@ typedef enum SpvMemorySemanticsMask_ {
     SpvMemorySemanticsOutputMemoryKHRMask = 0x00001000,
     SpvMemorySemanticsMakeAvailableKHRMask = 0x00002000,
     SpvMemorySemanticsMakeVisibleKHRMask = 0x00004000,
+    SpvMemorySemanticsVolatileMask = 0x00008000,
 } SpvMemorySemanticsMask;
 
 typedef enum SpvMemoryAccessShift_ {
index 6a8a6ff..d6dd5d6 100644 (file)
@@ -633,6 +633,7 @@ enum MemorySemanticsShift {
     MemorySemanticsOutputMemoryKHRShift = 12,
     MemorySemanticsMakeAvailableKHRShift = 13,
     MemorySemanticsMakeVisibleKHRShift = 14,
+    MemorySemanticsVolatileShift = 15,
     MemorySemanticsMax = 0x7fffffff,
 };
 
@@ -651,6 +652,7 @@ enum MemorySemanticsMask {
     MemorySemanticsOutputMemoryKHRMask = 0x00001000,
     MemorySemanticsMakeAvailableKHRMask = 0x00002000,
     MemorySemanticsMakeVisibleKHRMask = 0x00004000,
+    MemorySemanticsVolatileMask = 0x00008000,
 };
 
 enum MemoryAccessShift {
index 949435c..ea82d53 100644 (file)
@@ -633,6 +633,7 @@ enum class MemorySemanticsShift : unsigned {
     OutputMemoryKHR = 12,
     MakeAvailableKHR = 13,
     MakeVisibleKHR = 14,
+    Volatile = 15,
     Max = 0x7fffffff,
 };
 
@@ -651,6 +652,7 @@ enum class MemorySemanticsMask : unsigned {
     OutputMemoryKHR = 0x00001000,
     MakeAvailableKHR = 0x00002000,
     MakeVisibleKHR = 0x00004000,
+    Volatile = 0x00008000,
 };
 
 enum class MemoryAccessShift : unsigned {
index f57b42f..93d3de0 100644 (file)
                     "ImageMemory": 11,
                     "OutputMemoryKHR": 12,
                     "MakeAvailableKHR": 13,
-                    "MakeVisibleKHR": 14
+                    "MakeVisibleKHR": 14,
+                    "Volatile": 15
                 }
             },
             {
index 76576ed..b51e847 100644 (file)
@@ -601,6 +601,7 @@ spv = {
         OutputMemoryKHR = 12,
         MakeAvailableKHR = 13,
         MakeVisibleKHR = 14,
+        Volatile = 15,
     },
 
     MemorySemanticsMask = {
@@ -618,6 +619,7 @@ spv = {
         OutputMemoryKHR = 0x00001000,
         MakeAvailableKHR = 0x00002000,
         MakeVisibleKHR = 0x00004000,
+        Volatile = 0x00008000,
     },
 
     MemoryAccessShift = {
index 6ce550b..298c2c6 100644 (file)
@@ -428,7 +428,7 @@ spv = {
         'HlslCounterBufferGOOGLE' : 5634,
         'HlslSemanticGOOGLE' : 5635,
         'UserSemantic' : 5635,
-        'UserTypeGOOGLE' : 5635,
+        'UserTypeGOOGLE' : 5636,
     },
 
     'BuiltIn' : {
@@ -601,6 +601,7 @@ spv = {
         'OutputMemoryKHR' : 12,
         'MakeAvailableKHR' : 13,
         'MakeVisibleKHR' : 14,
+        'Volatile' : 15,
     },
 
     'MemorySemanticsMask' : {
@@ -618,6 +619,7 @@ spv = {
         'OutputMemoryKHR' : 0x00001000,
         'MakeAvailableKHR' : 0x00002000,
         'MakeVisibleKHR' : 0x00004000,
+        'Volatile' : 0x00008000,
     },
 
     'MemoryAccessShift' : {
index bde15c3..b3a18ad 100644 (file)
@@ -456,6 +456,7 @@ enum Decoration : uint
     HlslCounterBufferGOOGLE = 5634,
     HlslSemanticGOOGLE = 5635,
     UserSemantic = 5635,
+    UserTypeGOOGLE = 5636,
 }
 
 enum BuiltIn : uint
@@ -636,6 +637,7 @@ enum MemorySemanticsShift : uint
     OutputMemoryKHR = 12,
     MakeAvailableKHR = 13,
     MakeVisibleKHR = 14,
+    Volatile = 15,
 }
 
 enum MemorySemanticsMask : uint
@@ -654,6 +656,7 @@ enum MemorySemanticsMask : uint
     OutputMemoryKHR = 0x00001000,
     MakeAvailableKHR = 0x00002000,
     MakeVisibleKHR = 0x00004000,
+    Volatile = 0x00008000,
 }
 
 enum MemoryAccessShift : uint