Bug 42514 - [r300g] EVE online: some shaders are failing
Summary: [r300g] EVE online: some shaders are failing
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 42930
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 06:41 UTC by Pavel Ondračka
Modified: 2011-11-22 13:44 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
terminal output (37.42 KB, text/plain)
2011-11-02 06:42 UTC, Pavel Ondračka
Details
RADEON_DEBUG=fp log (433.72 KB, text/plain)
2011-11-02 06:42 UTC, Pavel Ondračka
Details

Description Pavel Ondračka 2011-11-02 06:41:27 UTC
There are failing shaders in EVE Online:

Part of wine output, full log attached:

fixme:d3d_shader:print_glsl_info_log Info log received from GLSL shader #32:
fixme:d3d_shader:print_glsl_info_log     0:84(30): error: array index must be < 245
fixme:d3d_shader:print_glsl_info_log     0:84(35): error: type mismatch
fixme:d3d_shader:print_glsl_info_log     0:84(35): error: Operands to arithmetic operators must be numeric
fixme:d3d_shader:print_glsl_info_log     0:91(30): error: array index must be < 245
fixme:d3d_shader:print_glsl_info_log     0:91(35): error: type mismatch
fixme:d3d_shader:print_glsl_info_log     0:91(35): error: Operands to arithmetic operators must be numeric
fixme:d3d_shader:print_glsl_info_log     0:93(17): error: array index must be < 245
fixme:d3d_shader:print_glsl_info_log     0:93(22): error: type mismatch

Apitrace here: http://pavel.ondracka.cz/EVE.trace 

Mesa: 6d3d0ca9e9ef0d0a1e3ba0940f7127298e078a7d
Kernel: 3.1.0-5.fc16
libdrm: 2.4.26-3.fc16
Wine: 1.3.31
Comment 1 Pavel Ondračka 2011-11-02 06:42:01 UTC
Created attachment 53053 [details]
terminal output
Comment 2 Pavel Ondračka 2011-11-02 06:42:30 UTC
Created attachment 53054 [details]
RADEON_DEBUG=fp log
Comment 3 Pavel Ondračka 2011-11-02 06:43:44 UTC
Forgot to mention, GPU is RV530.
Comment 4 Pavel Ondračka 2011-11-21 14:11:58 UTC
I'm wondering if this should be reassigned to glsl-compiler since the error messages come from src/glsl/ast_to_hir.cpp not the r300 driver? Tom, Marek, can you comment on this?
Comment 5 Marek Olšák 2011-11-21 14:31:48 UTC
Yes, the component should be glsl-compiler.
Comment 6 Pavel Ondračka 2011-11-22 01:38:28 UTC
Reassigning per comment 5.
Comment 7 Ian Romanick 2011-11-22 11:36:50 UTC
The shader declares the array VC to have 245 elements:

uniform vec4 VC[245];

then it tries to access the 246th element of the array:

R0.xyz = (VC[245].xyz);

This is explicitly forbidden by GLSL, and it should be rejected by any GLSL compiler.  Page 31 of the GLSL 1.30 spec says:

    "It is illegal to declare an array with a size, and then
    later (in the same shader) index the same array with an
    integral constant expression greater than or equal to the
    declared size."

I tried this same shader with AMD's closed-source driver and piglits glslparser test, and it failed to compile there as well:

Failed to compile vertex shader wine-from-eve.vert: Vertex shader failed to compile with the following errors:
ERROR: 0:84: error(#147) '[' array index out of range '245'
ERROR: 0:91: error(#147) '[' array index out of range '245'
ERROR: 0:93: error(#147) '[' array index out of range '245'
ERROR: error(#273) 3 compilation errors.  No code generated
Comment 8 Pavel Ondračka 2011-11-22 13:44:27 UTC
One idea, in this cases, can something like "This is an application bug, do not report it" be printed so an average user like me saves himself some time opening a bug here?


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.