From fb5ba510ca9cff36669b623ff9ab434bc24bf659 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Sun, 16 Aug 2015 23:40:15 -0600 Subject: [PATCH] Implement GL_OES_shader_image_atomic. --- Test/310.frag | 67 ++++++ Test/310.vert | 34 +++ Test/baseResults/310.comp.out | 62 +++-- Test/baseResults/310.frag.out | 365 ++++++++++++++++++++++++++++- Test/baseResults/310.vert.out | 160 +++++++++++++ glslang/Include/revision.h | 2 +- glslang/MachineIndependent/Initialize.cpp | 28 ++- glslang/MachineIndependent/ParseHelper.cpp | 8 +- glslang/MachineIndependent/Versions.cpp | 2 +- 9 files changed, 705 insertions(+), 23 deletions(-) diff --git a/Test/310.frag b/Test/310.frag index 6aa54a5..0de75e8 100644 --- a/Test/310.frag +++ b/Test/310.frag @@ -274,3 +274,70 @@ void goodSample() mediump int n1 = gl_MaxSamples; mediump int n2 = gl_NumSamples; } + +uniform layout(r32f) highp image2D im2Df; +uniform layout(r32ui) highp uimage2D im2Du; +uniform layout(r32i) highp iimage2D im2Di; +uniform ivec2 P; + +void badImageAtom() +{ + float datf; + int dati; + uint datu; + + imageAtomicAdd( im2Di, P, dati); // ERROR, need extension + imageAtomicAdd( im2Du, P, datu); // ERROR, need extension + imageAtomicMin( im2Di, P, dati); // ERROR, need extension + imageAtomicMin( im2Du, P, datu); // ERROR, need extension + imageAtomicMax( im2Di, P, dati); // ERROR, need extension + imageAtomicMax( im2Du, P, datu); // ERROR, need extension + imageAtomicAnd( im2Di, P, dati); // ERROR, need extension + imageAtomicAnd( im2Du, P, datu); // ERROR, need extension + imageAtomicOr( im2Di, P, dati); // ERROR, need extension + imageAtomicOr( im2Du, P, datu); // ERROR, need extension + imageAtomicXor( im2Di, P, dati); // ERROR, need extension + imageAtomicXor( im2Du, P, datu); // ERROR, need extension + imageAtomicExchange(im2Di, P, dati); // ERROR, need extension + imageAtomicExchange(im2Du, P, datu); // ERROR, need extension + imageAtomicExchange(im2Df, P, datf); // ERROR, need extension + imageAtomicCompSwap(im2Di, P, 3, dati); // ERROR, need extension + imageAtomicCompSwap(im2Du, P, 5u, datu); // ERROR, need extension +} + +#ifdef GL_OES_shader_image_atomic +#extension GL_OES_shader_image_atomic : enable +#endif + +uniform layout(rgba32f) highp image2D badIm2Df; // ERROR, needs readonly or writeonly +uniform layout(rgba8ui) highp uimage2D badIm2Du; // ERROR, needs readonly or writeonly +uniform layout(rgba16i) highp iimage2D badIm2Di; // ERROR, needs readonly or writeonly + +void goodImageAtom() +{ + float datf; + int dati; + uint datu; + + imageAtomicAdd( im2Di, P, dati); + imageAtomicAdd( im2Du, P, datu); + imageAtomicMin( im2Di, P, dati); + imageAtomicMin( im2Du, P, datu); + imageAtomicMax( im2Di, P, dati); + imageAtomicMax( im2Du, P, datu); + imageAtomicAnd( im2Di, P, dati); + imageAtomicAnd( im2Du, P, datu); + imageAtomicOr( im2Di, P, dati); + imageAtomicOr( im2Du, P, datu); + imageAtomicXor( im2Di, P, dati); + imageAtomicXor( im2Du, P, datu); + imageAtomicExchange(im2Di, P, dati); + imageAtomicExchange(im2Du, P, datu); + imageAtomicExchange(im2Df, P, datf); + imageAtomicCompSwap(im2Di, P, 3, dati); + imageAtomicCompSwap(im2Du, P, 5u, datu); + + imageAtomicMax(badIm2Di, P, dati); // ERROR, not an allowed layout() on the image + imageAtomicMax(badIm2Du, P, datu); // ERROR, not an allowed layout() on the image + imageAtomicExchange(badIm2Df, P, datf); // ERROR, not an allowed layout() on the image +} diff --git a/Test/310.vert b/Test/310.vert index 5b25f3f..ae0fe3a 100644 --- a/Test/310.vert +++ b/Test/310.vert @@ -339,3 +339,37 @@ void MSA() ivec3 tfsb = textureSize(samp2DMSAi, 4); // ERROR, no lod ivec3 tfsu = textureSize(samp2DMSAu); } + +#ifdef GL_OES_shader_image_atomic +#extension GL_OES_shader_image_atomic : enable +#endif + +uniform layout(r32f) highp image2D im2Df; +uniform layout(r32ui) highp uimage2D im2Du; +uniform layout(r32i) highp iimage2D im2Di; +uniform ivec2 P; + +void goodImageAtom() +{ + float datf; + int dati; + uint datu; + + imageAtomicAdd( im2Di, P, dati); + imageAtomicAdd( im2Du, P, datu); + imageAtomicMin( im2Di, P, dati); + imageAtomicMin( im2Du, P, datu); + imageAtomicMax( im2Di, P, dati); + imageAtomicMax( im2Du, P, datu); + imageAtomicAnd( im2Di, P, dati); + imageAtomicAnd( im2Du, P, datu); + imageAtomicOr( im2Di, P, dati); + imageAtomicOr( im2Du, P, datu); + imageAtomicXor( im2Di, P, dati); + imageAtomicXor( im2Du, P, datu); + imageAtomicExchange(im2Di, P, dati); + imageAtomicExchange(im2Du, P, datu); + imageAtomicExchange(im2Df, P, datf); + imageAtomicCompSwap(im2Di, P, 3, dati); + imageAtomicCompSwap(im2Du, P, 5u, datu); +} diff --git a/Test/baseResults/310.comp.out b/Test/baseResults/310.comp.out index 8bc3838..cec584a 100644 --- a/Test/baseResults/310.comp.out +++ b/Test/baseResults/310.comp.out @@ -17,9 +17,11 @@ ERROR: 0:61: 'assign' : l-value required "ro" (can't modify a readonly buffer) ERROR: 0:66: 'buffer' : buffers can be declared only as blocks ERROR: 0:68: 'sampler/image' : type requires declaration of default precision qualifier ERROR: 0:76: '' : image variables not declared 'writeonly' must have a format layout qualifier -ERROR: 0:87: 'imageAtomicCompSwap' : no matching overloaded function found -ERROR: 0:88: 'imageAtomicAdd' : no matching overloaded function found -ERROR: 0:89: 'imageAtomicMin' : no matching overloaded function found +ERROR: 0:87: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:88: 'imageAtomicAdd' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:89: 'imageAtomicMin' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:89: 'readonly' : argument cannot drop memory qualifier when passed to formal parameter +ERROR: 0:89: 'imageAtomicMin' : only supported on image with format r32i or r32ui ERROR: 0:90: 'imageAtomicMax' : no matching overloaded function found ERROR: 0:94: 'writeonly' : argument cannot drop memory qualifier when passed to formal parameter ERROR: 0:97: '' : memory qualifiers cannot be used on this type @@ -76,7 +78,7 @@ ERROR: 0:227: 'input block' : not supported in this stage: compute ERROR: 0:231: 'output block' : not supported in this stage: compute WARNING: 0:235: 't__' : identifiers containing consecutive underscores ("__") are reserved WARNING: 0:238: '#define' : names containing consecutive underscores are reserved: __D -ERROR: 74 compilation errors. No code generated. +ERROR: 76 compilation errors. No code generated. Shader version: 310 @@ -132,12 +134,26 @@ ERROR: node is still EOpNull! 0:86 'i' (temp highp int) 0:86 Constant: 0:86 4 (const int) -0:87 Constant: -0:87 0.000000 -0:88 Constant: -0:88 0.000000 -0:89 Constant: -0:89 0.000000 +0:87 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global highp int) +0:87 'iimg2D' (layout(r32i ) uniform highp iimage2D) +0:87 Construct ivec2 (temp 2-component vector of int) +0:87 'i' (temp highp int) +0:87 'i' (temp highp int) +0:87 'i' (temp highp int) +0:87 'i' (temp highp int) +0:88 Function Call: imageAtomicAdd(uI21;vi2;u1; (global highp uint) +0:88 'uimg2D' (layout(r32ui ) uniform highp uimage2D) +0:88 Construct ivec2 (temp 2-component vector of int) +0:88 'i' (temp highp int) +0:88 'i' (temp highp int) +0:88 Convert int to uint (temp uint) +0:88 'i' (temp highp int) +0:89 Function Call: imageAtomicMin(iI21;vi2;i1; (global highp int) +0:89 'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D) +0:89 Construct ivec2 (temp 2-component vector of int) +0:89 'i' (temp highp int) +0:89 'i' (temp highp int) +0:89 'i' (temp highp int) 0:90 Constant: 0:90 0.000000 0:91 Sequence @@ -544,12 +560,26 @@ ERROR: node is still EOpNull! 0:86 'i' (temp highp int) 0:86 Constant: 0:86 4 (const int) -0:87 Constant: -0:87 0.000000 -0:88 Constant: -0:88 0.000000 -0:89 Constant: -0:89 0.000000 +0:87 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global highp int) +0:87 'iimg2D' (layout(r32i ) uniform highp iimage2D) +0:87 Construct ivec2 (temp 2-component vector of int) +0:87 'i' (temp highp int) +0:87 'i' (temp highp int) +0:87 'i' (temp highp int) +0:87 'i' (temp highp int) +0:88 Function Call: imageAtomicAdd(uI21;vi2;u1; (global highp uint) +0:88 'uimg2D' (layout(r32ui ) uniform highp uimage2D) +0:88 Construct ivec2 (temp 2-component vector of int) +0:88 'i' (temp highp int) +0:88 'i' (temp highp int) +0:88 Convert int to uint (temp uint) +0:88 'i' (temp highp int) +0:89 Function Call: imageAtomicMin(iI21;vi2;i1; (global highp int) +0:89 'iimg2Drgba' (layout(rgba32i ) readonly uniform highp iimage2D) +0:89 Construct ivec2 (temp 2-component vector of int) +0:89 'i' (temp highp int) +0:89 'i' (temp highp int) +0:89 'i' (temp highp int) 0:90 Constant: 0:90 0.000000 0:91 Sequence diff --git a/Test/baseResults/310.frag.out b/Test/baseResults/310.frag.out index 7cf8e48..c92a6c9 100644 --- a/Test/baseResults/310.frag.out +++ b/Test/baseResults/310.frag.out @@ -75,7 +75,30 @@ ERROR: 0:258: 'gl_SamplePosition' : required extension not requested: GL_OES_sam ERROR: 0:259: 'gl_SampleMaskIn' : required extension not requested: GL_OES_sample_variables ERROR: 0:260: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables ERROR: 0:261: 'gl_NumSamples' : required extension not requested: GL_OES_sample_variables -ERROR: 67 compilation errors. No code generated. +ERROR: 0:289: 'imageAtomicAdd' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:290: 'imageAtomicAdd' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:291: 'imageAtomicMin' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:292: 'imageAtomicMin' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:293: 'imageAtomicMax' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:294: 'imageAtomicMax' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:295: 'imageAtomicAnd' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:296: 'imageAtomicAnd' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:297: 'imageAtomicOr' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:298: 'imageAtomicOr' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:299: 'imageAtomicXor' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:300: 'imageAtomicXor' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:301: 'imageAtomicExchange' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:302: 'imageAtomicExchange' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:303: 'imageAtomicExchange' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:304: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:305: 'imageAtomicCompSwap' : required extension not requested: GL_OES_shader_image_atomic +ERROR: 0:312: 'rgba32f' : format requires readonly or writeonly memory qualifier +ERROR: 0:313: 'rgba8ui' : format requires readonly or writeonly memory qualifier +ERROR: 0:314: 'rgba16i' : format requires readonly or writeonly memory qualifier +ERROR: 0:340: 'imageAtomicMax' : only supported on image with format r32i or r32ui +ERROR: 0:341: 'imageAtomicMax' : only supported on image with format r32i or r32ui +ERROR: 0:342: 'imageAtomicExchange' : only supported on image with format r32f +ERROR: 90 compilation errors. No code generated. Shader version: 310 @@ -84,6 +107,7 @@ Requested GL_EXT_texture_cube_map_array Requested GL_OES_geometry_shader Requested GL_OES_gpu_shader5 Requested GL_OES_sample_variables +Requested GL_OES_shader_image_atomic Requested GL_OES_shader_io_blocks gl_FragCoord pixel center is integer gl_FragCoord origin is upper left @@ -550,6 +574,168 @@ ERROR: node is still EOpNull! 0:275 move second child to first child (temp mediump int) 0:275 'n2' (temp mediump int) 0:275 'gl_NumSamples' (uniform lowp int) +0:283 Function Definition: badImageAtom( (global void) +0:283 Function Parameters: +0:? Sequence +0:289 Function Call: imageAtomicAdd(iI21;vi2;i1; (global mediump int) +0:289 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:289 'P' (uniform mediump 2-component vector of int) +0:289 'dati' (temp mediump int) +0:290 Function Call: imageAtomicAdd(uI21;vi2;u1; (global mediump uint) +0:290 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:290 'P' (uniform mediump 2-component vector of int) +0:290 'datu' (temp mediump uint) +0:291 Function Call: imageAtomicMin(iI21;vi2;i1; (global mediump int) +0:291 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:291 'P' (uniform mediump 2-component vector of int) +0:291 'dati' (temp mediump int) +0:292 Function Call: imageAtomicMin(uI21;vi2;u1; (global mediump uint) +0:292 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:292 'P' (uniform mediump 2-component vector of int) +0:292 'datu' (temp mediump uint) +0:293 Function Call: imageAtomicMax(iI21;vi2;i1; (global mediump int) +0:293 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:293 'P' (uniform mediump 2-component vector of int) +0:293 'dati' (temp mediump int) +0:294 Function Call: imageAtomicMax(uI21;vi2;u1; (global mediump uint) +0:294 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:294 'P' (uniform mediump 2-component vector of int) +0:294 'datu' (temp mediump uint) +0:295 Function Call: imageAtomicAnd(iI21;vi2;i1; (global mediump int) +0:295 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:295 'P' (uniform mediump 2-component vector of int) +0:295 'dati' (temp mediump int) +0:296 Function Call: imageAtomicAnd(uI21;vi2;u1; (global mediump uint) +0:296 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:296 'P' (uniform mediump 2-component vector of int) +0:296 'datu' (temp mediump uint) +0:297 Function Call: imageAtomicOr(iI21;vi2;i1; (global mediump int) +0:297 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:297 'P' (uniform mediump 2-component vector of int) +0:297 'dati' (temp mediump int) +0:298 Function Call: imageAtomicOr(uI21;vi2;u1; (global mediump uint) +0:298 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:298 'P' (uniform mediump 2-component vector of int) +0:298 'datu' (temp mediump uint) +0:299 Function Call: imageAtomicXor(iI21;vi2;i1; (global mediump int) +0:299 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:299 'P' (uniform mediump 2-component vector of int) +0:299 'dati' (temp mediump int) +0:300 Function Call: imageAtomicXor(uI21;vi2;u1; (global mediump uint) +0:300 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:300 'P' (uniform mediump 2-component vector of int) +0:300 'datu' (temp mediump uint) +0:301 Function Call: imageAtomicExchange(iI21;vi2;i1; (global mediump int) +0:301 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:301 'P' (uniform mediump 2-component vector of int) +0:301 'dati' (temp mediump int) +0:302 Function Call: imageAtomicExchange(uI21;vi2;u1; (global mediump uint) +0:302 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:302 'P' (uniform mediump 2-component vector of int) +0:302 'datu' (temp mediump uint) +0:303 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:303 'im2Df' (layout(r32f ) uniform highp image2D) +0:303 'P' (uniform mediump 2-component vector of int) +0:303 'datf' (temp mediump float) +0:304 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global mediump int) +0:304 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:304 'P' (uniform mediump 2-component vector of int) +0:304 Constant: +0:304 3 (const int) +0:304 'dati' (temp mediump int) +0:305 Function Call: imageAtomicCompSwap(uI21;vi2;u1;u1; (global mediump uint) +0:305 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:305 'P' (uniform mediump 2-component vector of int) +0:305 Constant: +0:305 5 (const uint) +0:305 'datu' (temp mediump uint) +0:316 Function Definition: goodImageAtom( (global void) +0:316 Function Parameters: +0:? Sequence +0:322 Function Call: imageAtomicAdd(iI21;vi2;i1; (global mediump int) +0:322 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:322 'P' (uniform mediump 2-component vector of int) +0:322 'dati' (temp mediump int) +0:323 Function Call: imageAtomicAdd(uI21;vi2;u1; (global mediump uint) +0:323 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:323 'P' (uniform mediump 2-component vector of int) +0:323 'datu' (temp mediump uint) +0:324 Function Call: imageAtomicMin(iI21;vi2;i1; (global mediump int) +0:324 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:324 'P' (uniform mediump 2-component vector of int) +0:324 'dati' (temp mediump int) +0:325 Function Call: imageAtomicMin(uI21;vi2;u1; (global mediump uint) +0:325 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:325 'P' (uniform mediump 2-component vector of int) +0:325 'datu' (temp mediump uint) +0:326 Function Call: imageAtomicMax(iI21;vi2;i1; (global mediump int) +0:326 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:326 'P' (uniform mediump 2-component vector of int) +0:326 'dati' (temp mediump int) +0:327 Function Call: imageAtomicMax(uI21;vi2;u1; (global mediump uint) +0:327 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:327 'P' (uniform mediump 2-component vector of int) +0:327 'datu' (temp mediump uint) +0:328 Function Call: imageAtomicAnd(iI21;vi2;i1; (global mediump int) +0:328 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:328 'P' (uniform mediump 2-component vector of int) +0:328 'dati' (temp mediump int) +0:329 Function Call: imageAtomicAnd(uI21;vi2;u1; (global mediump uint) +0:329 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:329 'P' (uniform mediump 2-component vector of int) +0:329 'datu' (temp mediump uint) +0:330 Function Call: imageAtomicOr(iI21;vi2;i1; (global mediump int) +0:330 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:330 'P' (uniform mediump 2-component vector of int) +0:330 'dati' (temp mediump int) +0:331 Function Call: imageAtomicOr(uI21;vi2;u1; (global mediump uint) +0:331 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:331 'P' (uniform mediump 2-component vector of int) +0:331 'datu' (temp mediump uint) +0:332 Function Call: imageAtomicXor(iI21;vi2;i1; (global mediump int) +0:332 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:332 'P' (uniform mediump 2-component vector of int) +0:332 'dati' (temp mediump int) +0:333 Function Call: imageAtomicXor(uI21;vi2;u1; (global mediump uint) +0:333 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:333 'P' (uniform mediump 2-component vector of int) +0:333 'datu' (temp mediump uint) +0:334 Function Call: imageAtomicExchange(iI21;vi2;i1; (global mediump int) +0:334 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:334 'P' (uniform mediump 2-component vector of int) +0:334 'dati' (temp mediump int) +0:335 Function Call: imageAtomicExchange(uI21;vi2;u1; (global mediump uint) +0:335 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:335 'P' (uniform mediump 2-component vector of int) +0:335 'datu' (temp mediump uint) +0:336 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:336 'im2Df' (layout(r32f ) uniform highp image2D) +0:336 'P' (uniform mediump 2-component vector of int) +0:336 'datf' (temp mediump float) +0:337 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global mediump int) +0:337 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:337 'P' (uniform mediump 2-component vector of int) +0:337 Constant: +0:337 3 (const int) +0:337 'dati' (temp mediump int) +0:338 Function Call: imageAtomicCompSwap(uI21;vi2;u1;u1; (global mediump uint) +0:338 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:338 'P' (uniform mediump 2-component vector of int) +0:338 Constant: +0:338 5 (const uint) +0:338 'datu' (temp mediump uint) +0:340 Function Call: imageAtomicMax(iI21;vi2;i1; (global mediump int) +0:340 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D) +0:340 'P' (uniform mediump 2-component vector of int) +0:340 'dati' (temp mediump int) +0:341 Function Call: imageAtomicMax(uI21;vi2;u1; (global mediump uint) +0:341 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D) +0:341 'P' (uniform mediump 2-component vector of int) +0:341 'datu' (temp mediump uint) +0:342 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:342 'badIm2Df' (layout(rgba32f ) uniform highp image2D) +0:342 'P' (uniform mediump 2-component vector of int) +0:342 'datf' (temp mediump float) 0:? Linker Objects 0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float) 0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float) @@ -625,6 +811,13 @@ ERROR: node is still EOpNull! 0:? 'CA7' (uniform highp usamplerCubeArray) 0:? 'gl_SampleMaskIn' (flat in implicitly-sized array of highp int SampleMaskIn) 0:? 'gl_SampleMask' (out implicitly-sized array of highp int SampleMaskIn) +0:? 'im2Df' (layout(r32f ) uniform highp image2D) +0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:? 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:? 'P' (uniform mediump 2-component vector of int) +0:? 'badIm2Df' (layout(rgba32f ) uniform highp image2D) +0:? 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D) +0:? 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D) Linked fragment stage: @@ -637,6 +830,7 @@ Requested GL_EXT_texture_cube_map_array Requested GL_OES_geometry_shader Requested GL_OES_gpu_shader5 Requested GL_OES_sample_variables +Requested GL_OES_shader_image_atomic Requested GL_OES_shader_io_blocks gl_FragCoord pixel center is integer gl_FragCoord origin is upper left @@ -1103,6 +1297,168 @@ ERROR: node is still EOpNull! 0:275 move second child to first child (temp mediump int) 0:275 'n2' (temp mediump int) 0:275 'gl_NumSamples' (uniform lowp int) +0:283 Function Definition: badImageAtom( (global void) +0:283 Function Parameters: +0:? Sequence +0:289 Function Call: imageAtomicAdd(iI21;vi2;i1; (global mediump int) +0:289 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:289 'P' (uniform mediump 2-component vector of int) +0:289 'dati' (temp mediump int) +0:290 Function Call: imageAtomicAdd(uI21;vi2;u1; (global mediump uint) +0:290 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:290 'P' (uniform mediump 2-component vector of int) +0:290 'datu' (temp mediump uint) +0:291 Function Call: imageAtomicMin(iI21;vi2;i1; (global mediump int) +0:291 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:291 'P' (uniform mediump 2-component vector of int) +0:291 'dati' (temp mediump int) +0:292 Function Call: imageAtomicMin(uI21;vi2;u1; (global mediump uint) +0:292 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:292 'P' (uniform mediump 2-component vector of int) +0:292 'datu' (temp mediump uint) +0:293 Function Call: imageAtomicMax(iI21;vi2;i1; (global mediump int) +0:293 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:293 'P' (uniform mediump 2-component vector of int) +0:293 'dati' (temp mediump int) +0:294 Function Call: imageAtomicMax(uI21;vi2;u1; (global mediump uint) +0:294 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:294 'P' (uniform mediump 2-component vector of int) +0:294 'datu' (temp mediump uint) +0:295 Function Call: imageAtomicAnd(iI21;vi2;i1; (global mediump int) +0:295 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:295 'P' (uniform mediump 2-component vector of int) +0:295 'dati' (temp mediump int) +0:296 Function Call: imageAtomicAnd(uI21;vi2;u1; (global mediump uint) +0:296 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:296 'P' (uniform mediump 2-component vector of int) +0:296 'datu' (temp mediump uint) +0:297 Function Call: imageAtomicOr(iI21;vi2;i1; (global mediump int) +0:297 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:297 'P' (uniform mediump 2-component vector of int) +0:297 'dati' (temp mediump int) +0:298 Function Call: imageAtomicOr(uI21;vi2;u1; (global mediump uint) +0:298 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:298 'P' (uniform mediump 2-component vector of int) +0:298 'datu' (temp mediump uint) +0:299 Function Call: imageAtomicXor(iI21;vi2;i1; (global mediump int) +0:299 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:299 'P' (uniform mediump 2-component vector of int) +0:299 'dati' (temp mediump int) +0:300 Function Call: imageAtomicXor(uI21;vi2;u1; (global mediump uint) +0:300 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:300 'P' (uniform mediump 2-component vector of int) +0:300 'datu' (temp mediump uint) +0:301 Function Call: imageAtomicExchange(iI21;vi2;i1; (global mediump int) +0:301 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:301 'P' (uniform mediump 2-component vector of int) +0:301 'dati' (temp mediump int) +0:302 Function Call: imageAtomicExchange(uI21;vi2;u1; (global mediump uint) +0:302 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:302 'P' (uniform mediump 2-component vector of int) +0:302 'datu' (temp mediump uint) +0:303 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:303 'im2Df' (layout(r32f ) uniform highp image2D) +0:303 'P' (uniform mediump 2-component vector of int) +0:303 'datf' (temp mediump float) +0:304 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global mediump int) +0:304 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:304 'P' (uniform mediump 2-component vector of int) +0:304 Constant: +0:304 3 (const int) +0:304 'dati' (temp mediump int) +0:305 Function Call: imageAtomicCompSwap(uI21;vi2;u1;u1; (global mediump uint) +0:305 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:305 'P' (uniform mediump 2-component vector of int) +0:305 Constant: +0:305 5 (const uint) +0:305 'datu' (temp mediump uint) +0:316 Function Definition: goodImageAtom( (global void) +0:316 Function Parameters: +0:? Sequence +0:322 Function Call: imageAtomicAdd(iI21;vi2;i1; (global mediump int) +0:322 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:322 'P' (uniform mediump 2-component vector of int) +0:322 'dati' (temp mediump int) +0:323 Function Call: imageAtomicAdd(uI21;vi2;u1; (global mediump uint) +0:323 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:323 'P' (uniform mediump 2-component vector of int) +0:323 'datu' (temp mediump uint) +0:324 Function Call: imageAtomicMin(iI21;vi2;i1; (global mediump int) +0:324 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:324 'P' (uniform mediump 2-component vector of int) +0:324 'dati' (temp mediump int) +0:325 Function Call: imageAtomicMin(uI21;vi2;u1; (global mediump uint) +0:325 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:325 'P' (uniform mediump 2-component vector of int) +0:325 'datu' (temp mediump uint) +0:326 Function Call: imageAtomicMax(iI21;vi2;i1; (global mediump int) +0:326 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:326 'P' (uniform mediump 2-component vector of int) +0:326 'dati' (temp mediump int) +0:327 Function Call: imageAtomicMax(uI21;vi2;u1; (global mediump uint) +0:327 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:327 'P' (uniform mediump 2-component vector of int) +0:327 'datu' (temp mediump uint) +0:328 Function Call: imageAtomicAnd(iI21;vi2;i1; (global mediump int) +0:328 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:328 'P' (uniform mediump 2-component vector of int) +0:328 'dati' (temp mediump int) +0:329 Function Call: imageAtomicAnd(uI21;vi2;u1; (global mediump uint) +0:329 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:329 'P' (uniform mediump 2-component vector of int) +0:329 'datu' (temp mediump uint) +0:330 Function Call: imageAtomicOr(iI21;vi2;i1; (global mediump int) +0:330 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:330 'P' (uniform mediump 2-component vector of int) +0:330 'dati' (temp mediump int) +0:331 Function Call: imageAtomicOr(uI21;vi2;u1; (global mediump uint) +0:331 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:331 'P' (uniform mediump 2-component vector of int) +0:331 'datu' (temp mediump uint) +0:332 Function Call: imageAtomicXor(iI21;vi2;i1; (global mediump int) +0:332 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:332 'P' (uniform mediump 2-component vector of int) +0:332 'dati' (temp mediump int) +0:333 Function Call: imageAtomicXor(uI21;vi2;u1; (global mediump uint) +0:333 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:333 'P' (uniform mediump 2-component vector of int) +0:333 'datu' (temp mediump uint) +0:334 Function Call: imageAtomicExchange(iI21;vi2;i1; (global mediump int) +0:334 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:334 'P' (uniform mediump 2-component vector of int) +0:334 'dati' (temp mediump int) +0:335 Function Call: imageAtomicExchange(uI21;vi2;u1; (global mediump uint) +0:335 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:335 'P' (uniform mediump 2-component vector of int) +0:335 'datu' (temp mediump uint) +0:336 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:336 'im2Df' (layout(r32f ) uniform highp image2D) +0:336 'P' (uniform mediump 2-component vector of int) +0:336 'datf' (temp mediump float) +0:337 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global mediump int) +0:337 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:337 'P' (uniform mediump 2-component vector of int) +0:337 Constant: +0:337 3 (const int) +0:337 'dati' (temp mediump int) +0:338 Function Call: imageAtomicCompSwap(uI21;vi2;u1;u1; (global mediump uint) +0:338 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:338 'P' (uniform mediump 2-component vector of int) +0:338 Constant: +0:338 5 (const uint) +0:338 'datu' (temp mediump uint) +0:340 Function Call: imageAtomicMax(iI21;vi2;i1; (global mediump int) +0:340 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D) +0:340 'P' (uniform mediump 2-component vector of int) +0:340 'dati' (temp mediump int) +0:341 Function Call: imageAtomicMax(uI21;vi2;u1; (global mediump uint) +0:341 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D) +0:341 'P' (uniform mediump 2-component vector of int) +0:341 'datu' (temp mediump uint) +0:342 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:342 'badIm2Df' (layout(rgba32f ) uniform highp image2D) +0:342 'P' (uniform mediump 2-component vector of int) +0:342 'datf' (temp mediump float) 0:? Linker Objects 0:? 'gl_FragCoord' (smooth in mediump 4-component vector of float) 0:? 'v3' (layout(location=2 ) smooth in mediump 3-component vector of float) @@ -1178,4 +1534,11 @@ ERROR: node is still EOpNull! 0:? 'CA7' (uniform highp usamplerCubeArray) 0:? 'gl_SampleMaskIn' (flat in 1-element array of highp int SampleMaskIn) 0:? 'gl_SampleMask' (out 1-element array of highp int SampleMaskIn) +0:? 'im2Df' (layout(r32f ) uniform highp image2D) +0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:? 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:? 'P' (uniform mediump 2-component vector of int) +0:? 'badIm2Df' (layout(rgba32f ) uniform highp image2D) +0:? 'badIm2Du' (layout(rgba8ui ) uniform highp uimage2D) +0:? 'badIm2Di' (layout(rgba16i ) uniform highp iimage2D) diff --git a/Test/baseResults/310.vert.out b/Test/baseResults/310.vert.out index 315c6b0..afb2b91 100644 --- a/Test/baseResults/310.vert.out +++ b/Test/baseResults/310.vert.out @@ -96,6 +96,7 @@ ERROR: 86 compilation errors. No code generated. Shader version: 310 Requested GL_EXT_texture_buffer Requested GL_OES_gpu_shader5 +Requested GL_OES_shader_image_atomic Requested GL_OES_shader_io_blocks Requested GL_OES_texture_buffer Requested GL_OES_texture_cube_map_array @@ -776,6 +777,81 @@ ERROR: node is still EOpNull! 0:340 'tfsu' (temp highp 3-component vector of int) 0:340 Function Call: textureSize(usA2M1; (global highp 3-component vector of int) 0:340 'samp2DMSAu' (uniform highp usampler2DMSArray) +0:352 Function Definition: goodImageAtom( (global void) +0:352 Function Parameters: +0:? Sequence +0:358 Function Call: imageAtomicAdd(iI21;vi2;i1; (global highp int) +0:358 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:358 'P' (uniform highp 2-component vector of int) +0:358 'dati' (temp highp int) +0:359 Function Call: imageAtomicAdd(uI21;vi2;u1; (global highp uint) +0:359 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:359 'P' (uniform highp 2-component vector of int) +0:359 'datu' (temp highp uint) +0:360 Function Call: imageAtomicMin(iI21;vi2;i1; (global highp int) +0:360 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:360 'P' (uniform highp 2-component vector of int) +0:360 'dati' (temp highp int) +0:361 Function Call: imageAtomicMin(uI21;vi2;u1; (global highp uint) +0:361 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:361 'P' (uniform highp 2-component vector of int) +0:361 'datu' (temp highp uint) +0:362 Function Call: imageAtomicMax(iI21;vi2;i1; (global highp int) +0:362 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:362 'P' (uniform highp 2-component vector of int) +0:362 'dati' (temp highp int) +0:363 Function Call: imageAtomicMax(uI21;vi2;u1; (global highp uint) +0:363 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:363 'P' (uniform highp 2-component vector of int) +0:363 'datu' (temp highp uint) +0:364 Function Call: imageAtomicAnd(iI21;vi2;i1; (global highp int) +0:364 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:364 'P' (uniform highp 2-component vector of int) +0:364 'dati' (temp highp int) +0:365 Function Call: imageAtomicAnd(uI21;vi2;u1; (global highp uint) +0:365 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:365 'P' (uniform highp 2-component vector of int) +0:365 'datu' (temp highp uint) +0:366 Function Call: imageAtomicOr(iI21;vi2;i1; (global highp int) +0:366 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:366 'P' (uniform highp 2-component vector of int) +0:366 'dati' (temp highp int) +0:367 Function Call: imageAtomicOr(uI21;vi2;u1; (global highp uint) +0:367 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:367 'P' (uniform highp 2-component vector of int) +0:367 'datu' (temp highp uint) +0:368 Function Call: imageAtomicXor(iI21;vi2;i1; (global highp int) +0:368 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:368 'P' (uniform highp 2-component vector of int) +0:368 'dati' (temp highp int) +0:369 Function Call: imageAtomicXor(uI21;vi2;u1; (global highp uint) +0:369 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:369 'P' (uniform highp 2-component vector of int) +0:369 'datu' (temp highp uint) +0:370 Function Call: imageAtomicExchange(iI21;vi2;i1; (global highp int) +0:370 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:370 'P' (uniform highp 2-component vector of int) +0:370 'dati' (temp highp int) +0:371 Function Call: imageAtomicExchange(uI21;vi2;u1; (global highp uint) +0:371 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:371 'P' (uniform highp 2-component vector of int) +0:371 'datu' (temp highp uint) +0:372 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:372 'im2Df' (layout(r32f ) uniform highp image2D) +0:372 'P' (uniform highp 2-component vector of int) +0:372 'datf' (temp highp float) +0:373 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global highp int) +0:373 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:373 'P' (uniform highp 2-component vector of int) +0:373 Constant: +0:373 3 (const int) +0:373 'dati' (temp highp int) +0:374 Function Call: imageAtomicCompSwap(uI21;vi2;u1;u1; (global highp uint) +0:374 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:374 'P' (uniform highp 2-component vector of int) +0:374 Constant: +0:374 5 (const uint) +0:374 'datu' (temp highp uint) 0:? Linker Objects 0:? 's' (shared highp 4-component vector of float) 0:? 'v' (buffer highp 4-component vector of float) @@ -873,6 +949,10 @@ ERROR: node is still EOpNull! 0:? 'samp2DMSA' (uniform highp sampler2DMSArray) 0:? 'samp2DMSAi' (uniform highp isampler2DMSArray) 0:? 'samp2DMSAu' (uniform highp usampler2DMSArray) +0:? 'im2Df' (layout(r32f ) uniform highp image2D) +0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:? 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:? 'P' (uniform highp 2-component vector of int) 0:? 'gl_VertexID' (gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId) @@ -883,6 +963,7 @@ Linked vertex stage: Shader version: 310 Requested GL_EXT_texture_buffer Requested GL_OES_gpu_shader5 +Requested GL_OES_shader_image_atomic Requested GL_OES_shader_io_blocks Requested GL_OES_texture_buffer Requested GL_OES_texture_cube_map_array @@ -1563,6 +1644,81 @@ ERROR: node is still EOpNull! 0:340 'tfsu' (temp highp 3-component vector of int) 0:340 Function Call: textureSize(usA2M1; (global highp 3-component vector of int) 0:340 'samp2DMSAu' (uniform highp usampler2DMSArray) +0:352 Function Definition: goodImageAtom( (global void) +0:352 Function Parameters: +0:? Sequence +0:358 Function Call: imageAtomicAdd(iI21;vi2;i1; (global highp int) +0:358 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:358 'P' (uniform highp 2-component vector of int) +0:358 'dati' (temp highp int) +0:359 Function Call: imageAtomicAdd(uI21;vi2;u1; (global highp uint) +0:359 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:359 'P' (uniform highp 2-component vector of int) +0:359 'datu' (temp highp uint) +0:360 Function Call: imageAtomicMin(iI21;vi2;i1; (global highp int) +0:360 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:360 'P' (uniform highp 2-component vector of int) +0:360 'dati' (temp highp int) +0:361 Function Call: imageAtomicMin(uI21;vi2;u1; (global highp uint) +0:361 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:361 'P' (uniform highp 2-component vector of int) +0:361 'datu' (temp highp uint) +0:362 Function Call: imageAtomicMax(iI21;vi2;i1; (global highp int) +0:362 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:362 'P' (uniform highp 2-component vector of int) +0:362 'dati' (temp highp int) +0:363 Function Call: imageAtomicMax(uI21;vi2;u1; (global highp uint) +0:363 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:363 'P' (uniform highp 2-component vector of int) +0:363 'datu' (temp highp uint) +0:364 Function Call: imageAtomicAnd(iI21;vi2;i1; (global highp int) +0:364 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:364 'P' (uniform highp 2-component vector of int) +0:364 'dati' (temp highp int) +0:365 Function Call: imageAtomicAnd(uI21;vi2;u1; (global highp uint) +0:365 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:365 'P' (uniform highp 2-component vector of int) +0:365 'datu' (temp highp uint) +0:366 Function Call: imageAtomicOr(iI21;vi2;i1; (global highp int) +0:366 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:366 'P' (uniform highp 2-component vector of int) +0:366 'dati' (temp highp int) +0:367 Function Call: imageAtomicOr(uI21;vi2;u1; (global highp uint) +0:367 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:367 'P' (uniform highp 2-component vector of int) +0:367 'datu' (temp highp uint) +0:368 Function Call: imageAtomicXor(iI21;vi2;i1; (global highp int) +0:368 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:368 'P' (uniform highp 2-component vector of int) +0:368 'dati' (temp highp int) +0:369 Function Call: imageAtomicXor(uI21;vi2;u1; (global highp uint) +0:369 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:369 'P' (uniform highp 2-component vector of int) +0:369 'datu' (temp highp uint) +0:370 Function Call: imageAtomicExchange(iI21;vi2;i1; (global highp int) +0:370 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:370 'P' (uniform highp 2-component vector of int) +0:370 'dati' (temp highp int) +0:371 Function Call: imageAtomicExchange(uI21;vi2;u1; (global highp uint) +0:371 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:371 'P' (uniform highp 2-component vector of int) +0:371 'datu' (temp highp uint) +0:372 Function Call: imageAtomicExchange(I21;vi2;f1; (global highp float) +0:372 'im2Df' (layout(r32f ) uniform highp image2D) +0:372 'P' (uniform highp 2-component vector of int) +0:372 'datf' (temp highp float) +0:373 Function Call: imageAtomicCompSwap(iI21;vi2;i1;i1; (global highp int) +0:373 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:373 'P' (uniform highp 2-component vector of int) +0:373 Constant: +0:373 3 (const int) +0:373 'dati' (temp highp int) +0:374 Function Call: imageAtomicCompSwap(uI21;vi2;u1;u1; (global highp uint) +0:374 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:374 'P' (uniform highp 2-component vector of int) +0:374 Constant: +0:374 5 (const uint) +0:374 'datu' (temp highp uint) 0:? Linker Objects 0:? 's' (shared highp 4-component vector of float) 0:? 'v' (buffer highp 4-component vector of float) @@ -1660,6 +1816,10 @@ ERROR: node is still EOpNull! 0:? 'samp2DMSA' (uniform highp sampler2DMSArray) 0:? 'samp2DMSAi' (uniform highp isampler2DMSArray) 0:? 'samp2DMSAu' (uniform highp usampler2DMSArray) +0:? 'im2Df' (layout(r32f ) uniform highp image2D) +0:? 'im2Du' (layout(r32ui ) uniform highp uimage2D) +0:? 'im2Di' (layout(r32i ) uniform highp iimage2D) +0:? 'P' (uniform highp 2-component vector of int) 0:? 'gl_VertexID' (gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' (gl_InstanceId highp int InstanceId) diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index d2b8064..13626c9 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "2.3.719" +#define GLSLANG_REVISION "2.3.720" #define GLSLANG_DATE "16-Aug-2015" diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp index 354a1aa..47b5194 100644 --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -1990,7 +1990,8 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi commonBuiltins.append(prefixes[sampler.type]); commonBuiltins.append("vec4);\n"); - if (profile != EEsProfile) { + if ( profile != EEsProfile || + (profile == EEsProfile && version >= 310)) { if (sampler.type == EbtInt || sampler.type == EbtUint) { const char* dataType = sampler.type == EbtInt ? "int" : "uint"; @@ -2027,7 +2028,8 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi // not int or uint // GL_ARB_ES3_1_compatibility // TODO: spec issue: are there restrictions on the kind of layout() that can be used? what about dropping memory qualifiers? - if (version >= 450) { + if ((profile != EEsProfile && version >= 450) || + (profile == EEsProfile && version >= 310)) { commonBuiltins.append("float imageAtomicExchange(volatile coherent "); commonBuiltins.append(imageParams); commonBuiltins.append(", float);\n"); @@ -2852,6 +2854,17 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb symbolTable.setFunctionExtensions("fma", Num_AEP_gpu_shader5, AEP_gpu_shader5); } + if (profile == EEsProfile) { + symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicAnd", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicOr", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicXor", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic); + } + // Fall through case EShLangTessControl: @@ -3053,6 +3066,17 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb symbolTable.setVariableExtensions("gl_FragDepthEXT", 1, &E_GL_EXT_frag_depth); symbolTable.setVariableExtensions("gl_PrimitiveID", Num_AEP_geometry_shader, AEP_geometry_shader); symbolTable.setVariableExtensions("gl_Layer", Num_AEP_geometry_shader, AEP_geometry_shader); + + if (profile == EEsProfile) { + symbolTable.setFunctionExtensions("imageAtomicAdd", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicMin", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicMax", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicAnd", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicOr", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicXor", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicExchange", 1, &E_GL_OES_shader_image_atomic); + symbolTable.setFunctionExtensions("imageAtomicCompSwap", 1, &E_GL_OES_shader_image_atomic); + } break; case EShLangCompute: diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 4f44376..297a2fb 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1428,8 +1428,12 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn if (imageType.getSampler().type == EbtInt || imageType.getSampler().type == EbtUint) { if (imageType.getQualifier().layoutFormat != ElfR32i && imageType.getQualifier().layoutFormat != ElfR32ui) error(loc, "only supported on image with format r32i or r32ui", fnCandidate.getName().c_str(), ""); - } else if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0) - error(loc, "only supported on integer images", fnCandidate.getName().c_str(), ""); + } else { + if (fnCandidate.getName().compare(0, 19, "imageAtomicExchange") != 0) + error(loc, "only supported on integer images", fnCandidate.getName().c_str(), ""); + else if (imageType.getQualifier().layoutFormat != ElfR32f && profile == EEsProfile) + error(loc, "only supported on image with format r32f", fnCandidate.getName().c_str(), ""); + } } } diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index d5abaee..b0a3718 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -182,7 +182,7 @@ void TParseContext::initializeExtensionBehavior() extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisablePartial; extensionBehavior[E_GL_KHR_blend_equation_advanced] = EBhDisablePartial; extensionBehavior[E_GL_OES_sample_variables] = EBhDisable; - extensionBehavior[E_GL_OES_shader_image_atomic] = EBhDisablePartial; + extensionBehavior[E_GL_OES_shader_image_atomic] = EBhDisable; extensionBehavior[E_GL_OES_shader_multisample_interpolation] = EBhDisablePartial; extensionBehavior[E_GL_OES_texture_storage_multisample_2d_array] = EBhDisable; extensionBehavior[E_GL_EXT_geometry_shader] = EBhDisable; -- 2.7.4