2014-08-18 21:27:53 +00:00
|
|
|
#version 420 core
|
|
|
|
|
|
|
|
layout(depth_any) out float gl_FragDepth;
|
|
|
|
layout(depth_greater) out float gl_FragDepth; // ERROR: redeclaration with different qualifier
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
gl_FragDepth = 0.3;
|
|
|
|
}
|
|
|
|
|
|
|
|
layout(depth_less) in float depth; // ERROR: depth_less only applies to gl_FragDepth
|
|
|
|
layout(depth_any) out float gl_FragDepth; // ERROR, done after use
|
2016-07-19 21:50:58 +00:00
|
|
|
|
|
|
|
layout(binding=0) uniform atomic_uint a[];
|
2020-04-20 02:47:54 +00:00
|
|
|
|
|
|
|
uniform writeonly image2D i2D;
|
|
|
|
ivec2 iv2dim = imageSize(i2D); // ERROR: imageSize called without enabling GL_ARB_shader_image_size extension
|
|
|
|
#extension GL_ARB_shader_image_size : enable
|
|
|
|
ivec2 iv2dim1 = imageSize(i2D);
|
2020-04-23 04:46:52 +00:00
|
|
|
|
|
|
|
#extension GL_ARB_shader_storage_buffer_object : enable
|
|
|
|
|
|
|
|
layout(binding = 0,std430) buffer Buffer
|
|
|
|
{
|
|
|
|
int atomi;
|
|
|
|
uint atomu;
|
|
|
|
};
|
|
|
|
|
|
|
|
void atomicOpPass()
|
|
|
|
{
|
|
|
|
int origi = atomicAdd(atomi, 3);
|
|
|
|
uint origu = atomicAnd(atomu, 7u);
|
|
|
|
origi = atomicExchange(atomi, 4);
|
|
|
|
origu = atomicCompSwap(atomu, 10u, 8u);
|
|
|
|
}
|
|
|
|
|
Add Shared/Std140 SSBO process & top-level array elements related (#2231)
* Add Shared/Std140 SSBO process & top-level array elements related
process
1.Add process options for shared/std140 ssbo, following ubo process
2.Add IO Variables reflection option, would keep all input/output
variables in reflection
3.Add Top-level related process, fix top-level array size issues,
following spec
4.Split ssbo/ubo reflection options, merge blowup expanding all into
function blowupActiveAggregate to allow other functions keep same entry
format.
Add options in StandAlone and test symbols.
1. Add options in StandAlone for std140/shared ubo/ssbo and all io variables reflection.
2. Add test for ssbo. When EShReflectionSharedStd140SSBO turns on, generated symbol and output would be different, to remind the difference. Defaultly disabled and nothing would change, nor blocking normal test.
* Add options in runtest script, refresh test results.
Add options in StandAlone:
--reflect-all-io-variables --reflect-shared-std140-ubo --reflect-shared-std140-ssbo
refresh test results.
Now the index, size of unsized array are expected.
2020-06-04 07:47:18 +00:00
|
|
|
layout(binding = 2,std430) buffer ssboElem01
|
|
|
|
{
|
|
|
|
int member01;
|
|
|
|
int memberArr01[2];
|
|
|
|
int memberUnsizedArr01[];
|
|
|
|
} ssboStd430Arr[2];
|
|
|
|
|
|
|
|
// if turns on EShReflectionSharedStd140SSBO, SPIR-V would be different
|
|
|
|
layout(binding = 3,shared) buffer ssboElem02
|
|
|
|
{
|
|
|
|
int member02;
|
|
|
|
int memberArr02[2];
|
|
|
|
int memberUnsizedArr02[];
|
|
|
|
} ssboSharedArr[2];
|
|
|
|
|
2020-04-23 04:46:52 +00:00
|
|
|
#extension GL_ARB_shader_storage_buffer_object : disable
|
|
|
|
|
|
|
|
layout(binding = 1,std430) buffer BufferFail // Error std430 and "buffer" block support disabled
|
|
|
|
{
|
|
|
|
int atom1i;
|
|
|
|
};
|