Summary: | glsl-texcoord-array fails GLSL compilation | ||
---|---|---|---|
Product: | piglit | Reporter: | Vinson Lee <vlee> |
Component: | tests | Assignee: | Kenneth Graunke <kenneth> |
Status: | CLOSED FIXED | QA Contact: | Eric Anholt <eric> |
Severity: | normal | ||
Priority: | medium | CC: | brianp, idr |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 29044 |
Description
Vinson Lee
2010-05-10 15:54:42 UTC
piglit: c29c45f21eef7378e1c93cef8ac452e65c1ec6f8 glsl-texcoord-array compiles with fglrx now, but still fails with the NVIDIA and Apple compilers. NVIDIA Failed to link: Vertex info ----------- 0(6) : error C5025: lvalue in assignment too complex Fragment info ------------- 0(4) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable Mac OS X 10.6.4 Failed to compile VS: ERROR: 0:6: '[' : array must be redeclared with a size before being indexed with a variable The test is incorrect. The gl_TexCoord array should be explicitly sized before being variably accessed. We should do two things: 1. Add 'varying vec4 gl_TexCoord[5];' declarations to both the vertex and fragment shader in this test. 2. Add a parser test that tries to access gl_TexCoord with a variable index without an explicit size. This test should expect the compiler to generate an error. I'm going to assign this bug to Ken to fix. This should be fixed in piglit master. I created a new failing parser test, unsized-array-non-const-index.vert, based on glsl-texcoord-array's vertex shader. The only change is an extra cast so it's 1.10 compatible...there isn't any real reason it has to be 1.20. I then added the array redeclarations as idr suggested. glsl-texcoord-array now compiles on ATI and nVidia. piglit: 1d7d2a04e29f2986212225461d65ee24acd06a35 glsl-texcoord-array compiles now with the fglrx and Apple compilers, but still fails with the NVIDIA GLSL compiler. Both NVIDIA 197.45 and 256.35 result in the following error. Failed to link: Vertex info ----------- 0(7) : error C5025: lvalue in assignment too complex Fragment info ------------- 0(5) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable The NVIDIA compiler error is dependent on the hardware or possibly the OpenGL version. GeForce 9600 3.3.0 NVIDIA 256.35 - pass GeForce 7300 2.1.2 NVIDIA 256.35 - fail GeForce 6600 2.1.2 NVIDIA 197.45 - fail The NVIDIA GLSL compilation error seems to be attributable to the shading language version of the NVIDIA Cg compiler. GeForce 6600 1.20 Cg - fail GeForce 7300 1.20 Cg - fail GeForce 8800 3.30 Cg - pass GeForce 9600 3.30 Cg - pass Marking is bug as resolved again. (In reply to comment #6) > The NVIDIA GLSL compilation error seems to be attributable to the shading > language version of the NVIDIA Cg compiler. > > GeForce 6600 1.20 Cg - fail > GeForce 7300 1.20 Cg - fail > GeForce 8800 3.30 Cg - pass > GeForce 9600 3.30 Cg - pass > > > Marking is bug as resolved again. It's more likely that the Geforce6 and Geforce7 hardware can't do the required indexing of arrays. I'm pretty sure the Geforce6 can't do it (neither can R300), but I'm not so sure about Geforce7. Either way, it's not our problem (as you noted). :) Closing this bug. For the record, glsl-texcoord-array also compiles with the Windows Intel GLSL compiler. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.