Results for spec/glsl-1.30/compiler/constant-expressions/sampler-array-index-02.frag

Overview

Status: fail
Result: fail

Back to summary

Details

Detail Value
returncode 1
time 0.254899024963
note
Returncode was 1
errors
  • Successfully compiled fragment shader tests/spec/glsl-1.30/compiler/constant-expressions/sampler-array-index-02.frag:
command
/home/mks-hackers/piglit/framework/../bin/glslparsertest tests/spec/glsl-1.30/compiler/constant-expressions/sampler-array-index-02.frag fail 1.30
info
Returncode: 1

Errors:
Successfully compiled fragment shader tests/spec/glsl-1.30/compiler/constant-expressions/sampler-array-index-02.frag: 


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



#version 130

uniform int x = 0;
uniform sampler2D a[4];

float f() {
	vec4 v = texture(a[x], vec2(0.0, 0.0));
	return 0.0;
}

Back to summary