Bug 29675 - Variable indexing of variable arrays in the FS unsupported
Summary: Variable indexing of variable arrays in the FS unsupported
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Eric Anholt
QA Contact:
Keywords: NEEDINFO
Depends on:
Reported: 2010-08-19 06:05 UTC by Sven Arvidsson
Modified: 2010-09-03 14:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

shader from RenderFeatTest32 (3.90 KB, text/plain)
2010-08-19 06:05 UTC, Sven Arvidsson

Description Sven Arvidsson 2010-08-19 06:05:09 UTC
Created attachment 37980 [details]
shader from RenderFeatTest32


Shaders fail to work in a couple of applications: "Variable indexing of variable arrays in the FS unsupported"

Among them are the game Coldest:

And the render test for the upcoming game Amnesia:

Not sure if this is a problem with glsl2, or a limitation in i965.

I'm using git master c54dea66fd86f6000e334c703ea4890179c39c81

One of the failing shaders from RenderFeatTest32 is attached.
Comment 1 Eric Anholt 2010-08-23 13:13:51 UTC
This will probably go away when idr lands loop unrolling, which is the reason it could have worked on 7.8.  But if that doesn't happen in time, I should get this fixed with the glsl2-965 branch.
Comment 2 Ian Romanick 2010-08-30 10:46:55 UTC
Could you retest with my glsl2-loops branch?  It's in my personal Mesa repository at:


For what it's worth, I don't see anything in the attached test case that should lead to variable indexing of anything.  The loop counter is only used to control the loop.  It is not referenced in the loop body *at all*.
Comment 3 Sven Arvidsson 2010-09-03 14:45:37 UTC
These errors are gone now with loop unrolling merged.

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.