Bug 16856 - GLSL indexing of unsized array results in assertion failure
Summary: GLSL indexing of unsized array results in assertion failure
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29044
  Show dependency treegraph
 
Reported: 2008-07-25 17:53 UTC by Ian Romanick
Modified: 2010-08-17 09:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Offending shader code (283 bytes, text/plain)
2008-07-25 17:53 UTC, Ian Romanick
Details

Description Ian Romanick 2008-07-25 17:53:40 UTC
Created attachment 17902 [details]
Offending shader code

Compiling the attached vertex shader results in:

vstest: shader/slang/slang_emit.c:194: storage_to_dst_reg: Assertion `st->Index >= 0' failed.

Adding '#define SEGV_INSTEAD' eliminates the assertion failure but results in a segfault instead.
Comment 1 Brian Paul 2008-07-29 15:59:52 UTC
I believe I've fixed this assertion/segfault on the gallium-0.1 branch.  There's a number of GLSL things on that branch I should bring into 7.1... I probably won't have time for a 7.1 release until next week anyway.
Comment 2 Brian Paul 2008-07-29 16:52:45 UTC
OK, I've brought over the GLSL fixes to master from gallium-0.1.

This shader still doesn't compile however, because we don't yet support indexing a vec4 with a variable index.  A mat4 is basically an array[4] of vec4.
Comment 3 Adam Jackson 2009-08-24 12:30:44 UTC
Mass version move, cvs -> git
Comment 4 Eric Anholt 2010-08-17 09:03:56 UTC
After fixing the shader to use a constant expression for the array sizing, it looks like glsl2 is fine with this.


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.