Commit 47bfaf3a authored by Chad Versace's avatar Chad Versace
Browse files

glsl-1.00: Add tests for highp in FS

Check that highp is available if and only if GL_FRAGMENT_PRECISION_HIGH is
defined.
parent 33046d41
// [config]
// expect_result: pass
// glsl_version: 1.00
// [end config]
//
// If high precision is available in the fragment shader, then it should be
// legal to use it.
//
// From section 4.5.4 of the GLSL 1.00 spec:
// "The built-in macro GL_FRAGMENT_PRECISION_HIGH is defined to one on
// systems supporting highp precision in the fragment language
// #define GL_FRAGMENT_PRECISION_HIGH 1
// and is not defined on systems not supporting highp precision in the
// fragment language."
#version 100
#ifdef GL_FRAGMENT_PRECISION_HIGH
highp float x;
#endif
float f() {
return 0.0;
}
// [config]
// expect_result: fail
// glsl_version: 1.00
// [end config]
//
// If high precision is unavailable in the fragment shader, then it should be
// illegal to use it.
//
// From section 4.5.4 of the GLSL 1.00 spec:
// "The built-in macro GL_FRAGMENT_PRECISION_HIGH is defined to one on
// systems supporting highp precision in the fragment language
// #define GL_FRAGMENT_PRECISION_HIGH 1
// and is not defined on systems not supporting highp precision in the
// fragment language."
#version 100
#ifndef GL_FRAGMENT_PRECISION_HIGH
highp float x;
#else
#error
#endif
float f() {
return 0.0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment