Status: fail
Result: fail
| Detail | Value |
|---|---|
| returncode | 1 |
| time | 0.236459970474 |
| note | Returncode was 1 |
| command | /home/mks-hackers/piglit/framework/../bin/glslparsertest tests/spec/glsl-1.30/compiler/constant-expressions/sampler-array-index-03.frag fail 1.30 |
| errors |
|
| info | Returncode: 1
Errors:
Successfully compiled fragment shader tests/spec/glsl-1.30/compiler/constant-expressions/sampler-array-index-03.frag: 0(21) : warning C7555: 'varying' is deprecated, use 'in/out' instead
0(30) : warning C7533: global variable gl_FragColor is deprecated after version 120
Output:
Shader source:
// [config]
// expect_result: fail
// glsl_version: 1.30
// [end config]
//
// Check that sampler arrays cannot be indexed with non-constant expressions.
//
// From page 23 (29 of PDF) of GLSL 1.30 spec:
// Samplers aggregated into arrays within a shader (using square brackets
// [ ]) can only be indexed with integral constant expressions
//
// See also
// spec/glsl-1.10/compiler/constant-expressions/sampler-array-index-01.frag.
//
// This test verifies that the compiler will reject something sensible. This is
// to the letter of the spec. It is likely that many compilers will accept this
// case.
#version 130
varying vec2 tc[gl_MaxTextureImageUnits];
uniform sampler2D s[gl_MaxTextureImageUnits];
void main() {
vec4 c = vec4(0.0);
for (int i = 0; i < gl_MaxTextureImageUnits; i++)
c += texture(s[i], tc[i]);
gl_FragColor = c;
}
|