diff options
author | Brian Paul <brianp@vmware.com> | 2010-09-22 11:01:23 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-09-22 11:01:26 -0600 |
commit | 390b0392f25dc85080a9a5c2a69926c290873e38 (patch) | |
tree | c8ae3efde802bf7ef427b205b6d77919f22792d4 | |
parent | aa1e912f8334942eef32f169859166088e5f5a6b (diff) |
glsl1: fix the texcoord varying test
Redeclare the gl_TexCoord[] array with a specific size, per the GLSL spec.
Note that the GLSL Orange book says that gl_TexCoord[] is declared with
gl_MaxTextureCoords size while the GLSL 1.x specs declare it unsized.
-rw-r--r-- | src/glean/tglsl1.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp index 79844a8..5d46353 100644 --- a/src/glean/tglsl1.cpp +++ b/src/glean/tglsl1.cpp @@ -4047,12 +4047,14 @@ static const ShaderProgram Programs[] = { // Does the linker correctly recognize that texcoord[1] is // written by the vertex shader and read by the fragment shader? // vert shader: + "varying vec4 gl_TexCoord[4]; \n" "void main() { \n" " int i = 1; \n" " gl_TexCoord[i] = vec4(0.5, 0, 0, 0); \n" " gl_Position = ftransform(); \n" "} \n", // frag shader: + "varying vec4 gl_TexCoord[4]; \n" "void main() { \n" " gl_FragColor = gl_TexCoord[1]; \n" "} \n", |