Front-end: Implement GL_OES_gpu_shader5.
This commit is contained in:
parent
ace4c45afc
commit
e3933d684d
16 changed files with 785 additions and 104 deletions
|
|
@ -30,11 +30,11 @@ void main()
|
|||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), i); // ERROR, last argument not const
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 4); // ERROR, last argument out of range
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(1), 1+2);
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i));
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(0.5));
|
||||
iv4 = textureGatherOffset(isamp2DA, vec3(0.1), ivec2(i)); // ERROR, offset not constant
|
||||
}
|
||||
|
||||
out vec4 outp;
|
||||
|
||||
void foo23()
|
||||
{
|
||||
const ivec2[3] offsets = ivec2[3](ivec2(1,2), ivec2(3,4), ivec2(15,16));
|
||||
|
|
@ -193,3 +193,32 @@ void foo_GS()
|
|||
highp int l = gl_Layer;
|
||||
highp int p = gl_PrimitiveID;
|
||||
}
|
||||
|
||||
in vec2 inf, ing;
|
||||
uniform ivec2 offsets[4];
|
||||
uniform sampler2D sArray[4];
|
||||
uniform int sIndex;
|
||||
layout(binding = 0) uniform atomic_uint auArray[2];
|
||||
uniform ubName { int i; } ubInst[4];
|
||||
buffer bbName { int i; } bbInst[4];
|
||||
uniform writeonly image2D iArray[5];
|
||||
const ivec2 constOffsets[4] = ivec2[4](ivec2(0.1), ivec2(0.2), ivec2(0.3), ivec2(0.4));
|
||||
|
||||
void pfooBad()
|
||||
{
|
||||
precise vec2 h; // ERROR reserved
|
||||
h = fma(inf, ing, h); // ERROR, not available
|
||||
textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf)); // ERROR, offset not constant
|
||||
textureGatherOffsets(sArray[0], vec2(0.1), constOffsets); // ERROR, not available
|
||||
}
|
||||
|
||||
#extension GL_OES_gpu_shader5 : enable
|
||||
|
||||
void pfoo()
|
||||
{
|
||||
precise vec2 h;
|
||||
h = fma(inf, ing, h);
|
||||
textureGatherOffset(sArray[0], vec2(0.1), ivec2(inf));
|
||||
textureGatherOffsets(sArray[0], vec2(0.1), constOffsets);
|
||||
textureGatherOffsets(sArray[0], vec2(0.1), offsets); // ERROR, offset not constant
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue