Closed jozefkucia closed 6 years ago
@johnkslang to do some research on this then assign @dgkoch to make the extension spec update.
From glslang generator number:
//return 2; // EOpAtomicCounterDecrement gets a post decrement, to map between GLSL -> SPIR-V
@jozefkucia in general the "Mapping to SPIR-V" section isn't considered normative, but included to aid in understanding. As @johnkslang noted, we've already accounted for these differences between GLSL/HLSL and SPIRV in the glslang producer. I've also proposed a note in the extension spec to call this out: https://github.com/KhronosGroup/OpenGL-Registry/pull/185
This should be resolved now by https://github.com/KhronosGroup/OpenGL-Registry/pull/185. Closing.
The ARB_gl_spirv spec contains the following mapping:
The mapping seems to be inaccurate for
atomicCounterDecrement
.atomicCounterDecrement
returns the value resulting from the decrement operation while theOpAtomicIDecrement
returns the original value.