""
end
+ case identifier_with_double_underscore
+ values { output float out0 = 1.0; }
+ both ""
+ precision mediump float;
+ ${DECLARATIONS}
+ # define __VALUE__ 1
+
+ void main()
+ {
+ // __VALUE__ not used since it might be set by an "underlying software layer"
+ out0 = float(1.0);
+ ${OUTPUT}
+ }
+ ""
+ end
end # basic
group definitions "Symbol Definition Tests"
group invalid_redefinitions "Invalid Redefinitions Tests"
- case invalid_identifier_1
- expect compile_fail
- both ""
- precision mediump float;
- # define __VALUE__ 1
-
- void main()
- {
- ${POSITION_FRAG_COLOR} = vec4(__VALUE__);
- }
- ""
- end
-
case invalid_identifier_2
expect compile_fail
both ""
GLint vMatUnif = glGetUniformLocation(program.getProgram(), "vMatrix"); // mat4
GLint fSamplerUnif = glGetUniformLocation(program.getProgram(), "fSampler"); // sampler2D
+ m_log << program;
+
if (vMatUnif == -1 || fSamplerUnif == -1)
{
m_log << TestLog::Message << "// ERROR: Failed to retrieve uniform location" << TestLog::EndMessage;
glu::ShaderProgram program(m_context.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
glUseProgram(program.getProgram());
+ m_log << program;
+
std::vector<GLfloat> data(16);
m_log << tcu::TestLog::Section("", "GL_INVALID_OPERATION is generated if location is an invalid uniform location for the current program object and location is not equal to -1.");
glUseProgram(program.getProgram());
GLint vMatUnif = glGetUniformLocation(program.getProgram(), "vMatrix"); // mat4
+ m_log << program;
+
if (vMatUnif == -1)
{
m_log << TestLog::Message << "// ERROR: Failed to retrieve uniform location" << TestLog::EndMessage;
glu::ShaderProgram program(m_context.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
glUseProgram(program.getProgram());
+ m_log << program;
+
std::vector<GLfloat> data(16);
m_log << tcu::TestLog::Section("", "GL_INVALID_VALUE is generated if transpose is not GL_FALSE.");