mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-06 09:21:01 +00:00
[qfcc] Correct the atomic functions
They needed Scope and MemorySemantics.
This commit is contained in:
parent
db8c9b6a03
commit
27c33abf58
1 changed files with 50 additions and 16 deletions
|
@ -1140,22 +1140,56 @@ static const char *glsl_atomic_functions =
|
|||
SRC_LINE
|
||||
"#define uint unsigned" "\n"
|
||||
"#define inout @inout" "\n"
|
||||
"@overload uint atomicAdd(inout uint mem, const uint data) = " SPV(OpAtomicIAdd) ";" "\n"
|
||||
"@overload int atomicAdd(inout int mem, const int data) = " SPV(OpAtomicIAdd) ";" "\n"
|
||||
"@overload uint atomicMin(inout uint mem, const uint data) = " SPV(OpAtomicUMin) ";" "\n"
|
||||
"@overload int atomicMin(inout int mem, const int data) = " SPV(OpAtomicSMin) ";" "\n"
|
||||
"@overload uint atomicMax(inout uint mem, const uint data) = " SPV(OpAtomicUMax) ";" "\n"
|
||||
"@overload int atomicMax(inout int mem, const int data) = " SPV(OpAtomicUMax) ";" "\n"
|
||||
"@overload uint atomicAnd(inout uint mem, const uint data) = " SPV(OpAtomicAnd) ";" "\n"
|
||||
"@overload int atomicAnd(inout int mem, const int data) = " SPV(OpAtomicAnd) ";" "\n"
|
||||
"@overload uint atomicOr(inout uint mem, const uint data) = " SPV(OpAtomicOr) ";" "\n"
|
||||
"@overload int atomicOr(inout int mem, const int data) = " SPV(OpAtomicOr) ";" "\n"
|
||||
"@overload uint atomicXor(inout uint mem, const uint data) = " SPV(OpAtomicXor) ";" "\n"
|
||||
"@overload int atomicXor(inout int mem, const int data) = " SPV(OpAtomicXor) ";" "\n"
|
||||
"@overload uint atomicExchange(inout uint mem, const uint data) = " SPV(OpAtomicExchange) ";" "\n"
|
||||
"@overload int atomicExchange(inout int mem, const int data) = " SPV(OpAtomicExchange) ";" "\n"
|
||||
"@overload uint atomicCompSwap(inout uint mem, const uint compare, const uint data) = " SPV(OpAtomicCompareExchange) ";" "\n"
|
||||
"@overload int atomicCompSwap(inout int mem, const int compare, const int data) = " SPV(OpAtomicCompareExchange) ";" "\n"
|
||||
"@overload uint atomicAdd(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicIAdd) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicAdd(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicIAdd) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicMin(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicUMin) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicMin(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicSMin) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicMax(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicUMax) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicMax(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicUMax) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicAnd(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicAnd) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicAnd(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicAnd) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicOr(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicOr) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicOr(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicOr) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicXor(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicXor) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicXor(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicXor) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicExchange(inout uint mem, const uint data)" "\n"
|
||||
"= " SPV(OpAtomicExchange) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicExchange(inout int mem, const int data)" "\n"
|
||||
"= " SPV(OpAtomicExchange) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload uint atomicCompSwap(inout uint mem, const uint compare," "\n"
|
||||
"const uint data)" "\n"
|
||||
"= " SPV(OpAtomicCompareExchange) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"@overload int atomicCompSwap(inout int mem, const int compare," "\n"
|
||||
"const int data)" "\n"
|
||||
"= " SPV(OpAtomicCompareExchange) "[mem, Scope.Device," "\n"
|
||||
"MemorySemantics.None, data];" "\n"
|
||||
"#undef uint" "\n"
|
||||
"#undef inout" "\n";
|
||||
|
||||
|
|
Loading…
Reference in a new issue