GLSL 4.6: Implement atomic counter ops and SPV_KHR_shader_atomic_counter_ops.
This commit is contained in:
@@ -22,8 +22,20 @@ out SA outSA;
|
||||
struct SS { float f; S s; };
|
||||
out SS outSS;
|
||||
|
||||
layout(binding = 0) uniform atomic_uint aui;
|
||||
uint ui;
|
||||
|
||||
void foo()
|
||||
{
|
||||
SS::f;
|
||||
atomicCounterAdd(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterSubtract(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterMin(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterMax(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterAnd(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterOr(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterXor(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterExchange(aui, ui); // ERROR, need 4.6
|
||||
atomicCounterCompSwap(aui, ui, ui); // ERROR, need 4.6
|
||||
}
|
||||
; // ERROR: no extraneous semicolons
|
||||
|
||||
Reference in New Issue
Block a user