Wrong shaders in glcParallelShaderCompileTests.cpp
authorRahul Jain <Rahul.Jain@amd.com>
Mon, 21 May 2018 11:48:01 +0000 (17:18 +0530)
committerRahul Jain <Rahul.Jain@amd.com>
Mon, 21 May 2018 11:48:01 +0000 (17:18 +0530)
In glcParallelShaderCompileTests.cpp:50
it is written as
"int main() {\n"

which is invalid as per spec.

As per spec GLSL 4.60, section 6.1 last paragraph:
It is a compile-time or link-time error to declare or define a function
main with any other parameters or return type.

in glcParallelShaderCompileTests.cpp:55

it is written as "out ver4 fragColor;\n"
it should be "out vec4 fragColor;\n"

there is no data type as "ver4"

Affects:
KHR-GL46.parallel_shader_compile.compilation_completion_parallel

Components: OpenGL

VK-GL-CTS issue: 1182

Change-Id: I2f213eeaf28039c1f36b7772257090d81e1f013e

external/openglcts/modules/common/glcParallelShaderCompileTests.cpp

index a4bf32b..1079122 100644 (file)
@@ -47,14 +47,14 @@ static const char* shaderVersionGL = "#version 450\n";
 static const char* vShader                = "\n"
                                                         "in vec3 vertex;\n"
                                                         "\n"
-                                                        "int main() {\n"
+                                                        "void main() {\n"
                                                         "    gl_Position = vec4(vertex, 1);\n"
                                                         "}\n";
 
 static const char* fShader = "\n"
-                                                        "out ver4 fragColor;\n"
+                                                        "out vec4 fragColor;\n"
                                                         "\n"
-                                                        "int main() {\n"
+                                                        "void main() {\n"
                                                         "    fragColor = vec4(1, 1, 1, 1);\n"
                                                         "}\n";