Jeff Bolz | 9f2aec4 | 2019-01-06 17:58:04 -0600 | [diff] [blame] | 1 | #version 450
|
| 2 | #extension GL_EXT_shader_16bit_storage : enable
|
| 3 | #extension GL_EXT_shader_8bit_storage : enable
|
| 4 | #extension GL_EXT_buffer_reference : enable
|
| 5 |
|
| 6 | layout(std140, binding = 0) buffer AcBlock { highp uint ac_numPassed; };
|
| 7 |
|
| 8 | layout(std140, buffer_reference) buffer Block
|
| 9 | {
|
| 10 | uint8_t var;
|
| 11 | };
|
| 12 | layout (push_constant, std430) uniform PC {
|
| 13 | Block block;
|
| 14 | };
|
| 15 |
|
| 16 | bool compare_uint8_t (highp uint a, highp uint b) { return a == b; }
|
| 17 |
|
| 18 | void main (void)
|
| 19 | {
|
| 20 | bool allOk = true;
|
| 21 | allOk = allOk && compare_uint8_t(uint(block.var), 7u);
|
| 22 | if (allOk)
|
| 23 | ac_numPassed++;
|
| 24 |
|
| 25 | block.var = uint8_t(9u);
|
| 26 | } |