glslang/Test/spv.140.frag
Roy.li 08328fea5a
Fix xfb stride limit issue (#2088)
* Fix xfb_stride limit issue

Unsized array can't apply to transform trace. layout qualifier "offset" require GL_ARB_enhanced_layouts enable or glsl core version > 440.

* Add negative test for xfb limit

* update case result

* Fix compile information issue

Fix compile information issue and test comment issue.

* remove es profile condition, use profileRequires to limit.

* Fix xfb_stride limit issue

Unsized array can't apply to transform trace. layout qualifier "offset" require GL_ARB_enhanced_layouts enable or glsl core version > 440.
Add negative test for xfb limit

* Move es profile check out of version number check

* Adjust error information and related cases

remove the new version check, refine original version check.

* Revert condition for vulkan, and remove redundant test code.
2020-06-09 02:30:14 -06:00

48 lines
893 B
GLSL

#version 140
#extension GL_ARB_enhanced_layouts : require
in vec4 k;
out vec4 o;
in float gl_ClipDistance[5];
layout(row_major) uniform;
uniform sampler2D samp2Da[3];
layout(std140) uniform bn {
layout(row_major) mat4 matra[4];
layout(column_major) mat4 matca[4];
layout(row_major) mat4 matr;
layout(column_major) mat4 matc;
layout(align=512, offset=1024) mat4 matrdef;
};
uniform sampler2DRect sampR;
uniform isamplerBuffer sampB;
float foo();
void main()
{
o.y = gl_ClipDistance[2];
o.z = gl_ClipDistance[int(k)];
o.w = float(textureSize(sampR) + textureSize(sampB)) / 100.0;
o.z = foo();
}
// Test extra-function initializers
float i1 = gl_FrontFacing ? -2.0 : 2.0;
float i2 = 102;
float foo()
{
return i1 + i2;
}
// test arrayed block
layout(std140) uniform bi {
vec3 v[2];
} bname[4];