@@ -18,80 +18,80 @@ namespace spirv
18
18
19
19
#pragma region ATOMICS
20
20
template<typename T>
21
- T atomicAdd ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
21
+ T atomicAdd ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
22
22
template<>
23
23
[[vk::ext_instruction (spv::OpAtomicIAdd)]]
24
- int atomicAdd ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
24
+ int32_t atomicAdd ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
25
25
template<>
26
- [[vk::ext_instruction (/* OpAtomicIAdd */ 234 )]]
27
- uint atomicAdd ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
26
+ [[vk::ext_instruction ( spv:: OpAtomicIAdd )]]
27
+ uint32_t atomicAdd ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
28
28
29
29
template<typename T>
30
- T atomicAnd ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
30
+ T atomicAnd ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
31
31
template<>
32
- [[vk::ext_instruction (/* OpAtomicAnd */ 240 )]]
33
- int atomicAnd ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
32
+ [[vk::ext_instruction ( spv:: OpAtomicAnd )]]
33
+ int32_t atomicAnd ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
34
34
template<>
35
- [[vk::ext_instruction (/* OpAtomicAnd */ 240 )]]
36
- uint atomicAnd ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
35
+ [[vk::ext_instruction ( spv:: OpAtomicAnd )]]
36
+ uint32_t atomicAnd ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
37
37
38
38
template<typename T>
39
- T atomicOr ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
39
+ T atomicOr ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
40
40
template<>
41
- [[vk::ext_instruction (/* OpAtomicOr */ 241 )]]
42
- int atomicOr ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
41
+ [[vk::ext_instruction ( spv:: OpAtomicOr )]]
42
+ int32_t atomicOr ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
43
43
template<>
44
- [[vk::ext_instruction (/* OpAtomicOr */ 241 )]]
45
- uint atomicOr ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
44
+ [[vk::ext_instruction ( spv:: OpAtomicOr )]]
45
+ uint32_t atomicOr ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
46
46
47
47
template<typename T>
48
- T atomicXor ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
48
+ T atomicXor ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
49
49
template<>
50
- [[vk::ext_instruction (/* OpAtomicXor */ 242 )]]
51
- int atomicXor ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
50
+ [[vk::ext_instruction ( spv:: OpAtomicXor )]]
51
+ int32_t atomicXor ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
52
52
template<>
53
- [[vk::ext_instruction (/* OpAtomicXor */ 242 )]]
54
- uint atomicXor ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
53
+ [[vk::ext_instruction ( spv:: OpAtomicXor )]]
54
+ uint32_t atomicXor ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
55
55
56
56
template<typename T>
57
- T atomicMin ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
57
+ T atomicMin ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
58
58
template<>
59
- [[vk::ext_instruction (/* OpAtomicSMin */ 236 )]]
60
- int atomicMin ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
59
+ [[vk::ext_instruction ( spv:: OpAtomicSMin )]]
60
+ int32_t atomicMin ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
61
61
template<>
62
- [[vk::ext_instruction (/* OpAtomicSMin */ 236 )]]
63
- uint atomicMin ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
62
+ [[vk::ext_instruction ( spv:: OpAtomicSMin )]]
63
+ uint32_t atomicMin ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
64
64
65
65
template<typename T>
66
- T atomicMax ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
66
+ T atomicMax ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
67
67
template<>
68
- [[vk::ext_instruction (/* OpAtomicSMax */ 238 )]]
69
- int atomicMax ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
68
+ [[vk::ext_instruction ( spv:: OpAtomicSMax )]]
69
+ int32_t atomicMax ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
70
70
template<>
71
- [[vk::ext_instruction (/* OpAtomicSMax */ 238 )]]
72
- uint atomicMax ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
71
+ [[vk::ext_instruction ( spv:: OpAtomicSMax )]]
72
+ uint32_t atomicMax ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
73
73
74
74
template<typename T>
75
- T atomicExchange ([[vk::ext_reference]] T ptr, uint memoryScope, uint memorySemantics, T value);
75
+ T atomicExchange ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memorySemantics, T value);
76
76
template<>
77
- [[vk::ext_instruction (/* OpAtomicExchange */ 229 )]]
78
- int atomicExchange ([[vk::ext_reference]] int ptr, uint memoryScope, uint memorySemantics, int value);
77
+ [[vk::ext_instruction ( spv:: OpAtomicExchange )]]
78
+ int32_t atomicExchange ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, int32_t value);
79
79
template<>
80
- [[vk::ext_instruction (/* OpAtomicExchange */ 229 )]]
81
- uint atomicExchange ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memorySemantics, uint value);
80
+ [[vk::ext_instruction ( spv:: OpAtomicExchange )]]
81
+ uint32_t atomicExchange ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, uint32_t value);
82
82
template<>
83
- [[vk::ext_instruction (/* OpAtomicExchange */ 229 )]]
84
- float atomicExchange ([[vk::ext_reference]] float ptr, uint memoryScope, uint memorySemantics, float value);
83
+ [[vk::ext_instruction ( spv:: OpAtomicExchange )]]
84
+ float32_t atomicExchange ([[vk::ext_reference]] float32_t ptr, uint32_t memoryScope, uint32_t memorySemantics, float32_t value);
85
85
86
86
87
87
template<typename T>
88
- T atomicCompSwap ([[vk::ext_reference]] T ptr, uint memoryScope, uint memSemanticsEqual, uint memSemanticsUnequal, T value, T comparator);
88
+ T atomicCompSwap ([[vk::ext_reference]] T ptr, uint32_t memoryScope, uint32_t memSemanticsEqual, uint32_t memSemanticsUnequal, T value, T comparator);
89
89
template<>
90
- [[vk::ext_instruction (/* OpAtomicCompareExchange */ 230 )]]
91
- int atomicCompSwap ([[vk::ext_reference]] int ptr, uint memoryScope, uint memSemanticsEqual, uint memSemanticsUnequal, int value, int comparator);
90
+ [[vk::ext_instruction ( spv:: OpAtomicCompareExchange )]]
91
+ int32_t atomicCompSwap ([[vk::ext_reference]] int32_t ptr, uint32_t memoryScope, uint32_t memSemanticsEqual, uint32_t memSemanticsUnequal, int32_t value, int32_t comparator);
92
92
template<>
93
- [[vk::ext_instruction (/* OpAtomicCompareExchange */ 230 )]]
94
- uint atomicCompSwap ([[vk::ext_reference]] uint ptr, uint memoryScope, uint memSemanticsEqual, uint memSemanticsUnequal, uint value, uint comparator);
93
+ [[vk::ext_instruction ( spv:: OpAtomicCompareExchange )]]
94
+ uint32_t atomicCompSwap ([[vk::ext_reference]] uint32_t ptr, uint32_t memoryScope, uint32_t memSemanticsEqual, uint32_t memSemanticsUnequal, uint32_t value, uint32_t comparator);
95
95
#pragma endregion ATOMICS
96
96
97
97
#pragma region BARRIERS
@@ -100,11 +100,11 @@ uint atomicCompSwap([[vk::ext_reference]] uint ptr, uint memoryScope, uint memSe
100
100
// https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_memory_semantics_id
101
101
// By providing memory semantics None we do both control and memory barrier as is done in GLSL
102
102
103
- [[vk::ext_instruction (/* OpControlBarrier */ 224 )]]
104
- void controlBarrier (uint executionScope, uint memoryScope, uint memorySemantics);
103
+ [[vk::ext_instruction ( spv:: OpControlBarrier )]]
104
+ void controlBarrier (uint32_t executionScope, uint32_t memoryScope, uint32_t memorySemantics);
105
105
106
- [[vk::ext_instruction (/* OpMemoryBarrier */ 225 )]]
107
- void memoryBarrier (uint memoryScope, uint memorySemantics);
106
+ [[vk::ext_instruction ( spv:: OpMemoryBarrier )]]
107
+ void memoryBarrier (uint32_t memoryScope, uint32_t memorySemantics);
108
108
#pragma endregion BARRIERS
109
109
110
110
#pragma region CONVERSION
@@ -122,5 +122,5 @@ T bitcast(U);
122
122
#endif
123
123
}
124
124
}
125
-
126
- #endif
125
+
126
+ #endif
0 commit comments