Commit 0a218e49 authored by Andres Gomez's avatar Andres Gomez

arb_separate_shader_objects: remove misleading comments

And also redefined built-ins that are not used.

From Section 7.4.1 (Shader Interface Matching) of the OpenGL 4.60
spec:

  " To use any built-in input or output in the gl_PerVertex block in
    separable program objects, shader code must redeclare that block
    prior to use. A separable program will fail to link if:

      * it contains multiple shaders of a single type with different
         redeclarations of this built-in block; or

      * any shader uses a built-in block member not found in the
        redeclaration of that block.

    There is one exception to this rule described below.

    As described above, an exact interface match requires matching
    built-in input and output blocks. At an interface between two
    non-fragment shader stages, the gl_PerVertex input and output
    blocks are considered to match if and only if the block members
    match exactly in name, type, qualification, and declaration order.
    At an interface involving the fragment shader stage, the presence
    or absence of any built-in output does not affect interface
    matching."
Signed-off-by: Andres Gomez's avatarAndres Gomez <agomez@igalia.com>
Reviewed-by: Tapani Pälli's avatarTapani Pälli <tapani.palli@intel.com>
Reviewed-by: Martin Peres's avatarMartin Peres <martin.peres@linux.intel.com>
parent 7b4ed86f
......@@ -101,10 +101,6 @@ piglit_init(int argc, char **argv)
static const char vs_source[] =
"#if __VERSION__ > 140\n"
"/* At least some versions of AMD's closed-source driver\n"
" * contain a bug that requires redeclaration of gl_PerVertex\n"
" * interface block in core profile shaders.\n"
" */\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
"};\n"
......@@ -129,20 +125,12 @@ piglit_init(int argc, char **argv)
" color = vec4(0.0, 1.0, 0.0, 0.0);\n"
"}\n";
static const char gs_source[] =
"/* At least some versions of AMD's closed-source driver\n"
" * contain a bug that requires redeclaration of gl_PerVertex\n"
" * interface block in core profile shaders.\n"
" */\n"
"in gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"};\n"
"\n"
"layout(triangles) in;\n"
......@@ -156,20 +144,12 @@ piglit_init(int argc, char **argv)
"}\n";
static const char tc_source[] =
"#extension GL_ARB_tessellation_shader: require\n"
"/* At least some versions of AMD's closed-source driver\n"
" * contain a bug that requires redeclaration of gl_PerVertex\n"
" * interface block in core profile shaders.\n"
" */\n"
"in gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_out[];\n"
"\n"
"layout(vertices = 3) out;\n"
......@@ -184,20 +164,12 @@ piglit_init(int argc, char **argv)
"}\n";
static const char te_source[] =
"#extension GL_ARB_tessellation_shader: require\n"
"/* At least some versions of AMD's closed-source driver\n"
" * contain a bug that requires redeclaration of gl_PerVertex\n"
" * interface block in core profile shaders.\n"
" */\n"
"in gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"};\n"
"\n"
"layout(triangles, equal_spacing) in;\n"
......
......@@ -36,8 +36,6 @@ static const char vs_source_template[] =
"#if __VERSION__ > 140\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"};\n"
"\n"
"in vec4 position;\n"
......@@ -69,14 +67,10 @@ static const char gs_source_template[] =
"\n"
"in gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"};\n"
"\n"
"layout(triangles) in;\n"
......@@ -96,14 +90,10 @@ static const char tc_source_template[] =
"\n"
"in gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_out[];\n"
"\n"
"layout(vertices = 3) out;\n"
......@@ -123,14 +113,10 @@ static const char te_source_template[] =
"\n"
"in gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"} gl_in[];\n"
"\n"
"out gl_PerVertex {\n"
" vec4 gl_Position;\n"
" float gl_PointSize;\n"
" float gl_ClipDistance[];\n"
"};\n"
"\n"
"layout(triangles, equal_spacing) in;\n"
......
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