Results for spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-and-gl_FragData-dead.frag

Overview

Status: fail
Result: fail

Back to summary

Details

Detail Value
returncode 1
time 0.583799123764
note
Returncode was 1
command
/home/airlied/piglit/framework/../bin/glslparsertest tests/spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-and-gl_FragData-dead.frag fail 1.10
errors
  • Successfully compiled fragment shader tests/spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-and-gl_FragData-dead.frag: Fragment shader was successfully compiled to run on hardware.
info
Returncode: 1

Errors:
Successfully compiled fragment shader tests/spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-and-gl_FragData-dead.frag: Fragment shader was successfully compiled to run on hardware.



Output:
Shader source:
/* [config]
 * expect_result: fail
 * glsl_version: 1.10
 * [end config]
 *
 * From page 49 of the GLSL 1.10 spec:
 *
 *     "If a shader statically assigns a value to gl_FragColor, it may not
 *     assign a value to any element of gl_FragData. If a shader statically
 *     writes a value to any element of gl_FragData, it may not assign a value
 *     to gl_FragColor. That is, a shader may assign values to either
 *     gl_FragColor or gl_FragData, but not both."
 *
 * Since these are compile time errors and are based on static assignments,
 * the check must happen before any dead-code removal or other optimizations.
 */
void main()
{
	gl_FragColor = vec4(1.0);
	if (false)
		gl_FragData[0] = vec4(1.0);
}

Back to summary