GLSL 4.6: Implement atomic counter ops and SPV_KHR_shader_atomic_counter_ops.

This commit is contained in:
John Kessenich
2017-07-23 16:08:26 -06:00
parent de16e52b25
commit 0d0c6d38f0
10 changed files with 202 additions and 8 deletions

View File

@@ -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