Summary: | GLSL compiler (linker I think) emits assertion upon call to glAttachShader | ||
---|---|---|---|
Product: | Mesa | Reporter: | bugReporter92 |
Component: | glsl-compiler | Assignee: | Kenneth Graunke <kenneth> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
API trace of the crash. Only 2 frames long.
Shaders that linked together cause the crash Patch #1 Patch #2 |
Description
bugReporter92
2016-04-27 05:36:17 UTC
This ought to be a really simple bug to fix, but I can't seem to reproduce it with your apitrace. I compiled Mesa 11.1.3 in debug mode and your apitrace didn't seem to trigger any assertions... I actually didn't try to get the assert to happen by replaying. I'll figure out what conditions (env vars possibly) cause it to crash by using the replay function when I get home from work tonight. Seeing as glAttachShader was the last call in the apitrace output, I assumed that it was the one crashing. After doing a proper gdb session, it was actually in the glLinkShader call that crashes, and it is not recorded in the apitrace, which is why we aren't seeing it in the apitrace that I attached. (I tried and failed to reproduce using replay, for reasons now obvious) I'm just going to attach the three shaders that are being linked (I think, from the trace) to cause the crash. I can't get src/glsl/glsl_compiler to compile the shaders, for a reason that looks unrelated, but if I could maybe the crash could be re-produced that way. If you don't have any better ideas, Kenneth, then I'll write a small GL program that reads in these three shaders and attempts to link them. It will take me a couple of days to find time for that though. Thanks for your help! Created attachment 123312 [details]
Shaders that linked together cause the crash
Thanks! I can reproduce the problem now. Created attachment 123314 [details] [review] Patch #1 Created attachment 123315 [details] [review] Patch #2 Can you try and apply the two patches I attached (git am 000*) and see if that fixes the assertion? (It might also fix the misrendering...) Amazing. Fixes both the missing compilation and the rendering issues. This defect can be closed once those are committed. Thank-you very much for your help, Kenneth! Do you know if this is likely to make stable branch? (Don't close bugs until the patches are upstream) Duly noted. Thanks. Fixed in master with the following commits: commit 750c38fad1f19e2403b4960674006c5f932075ad Author: Kenneth Graunke <kenneth@whitecape.org> Date: Wed Apr 27 21:07:07 2016 -0700 glsl: Lower vector_extracts to swizzles after lower_vector_derefs. commit 1cd600dbb975cce616da376a680692afb2da47f9 Author: Kenneth Graunke <kenneth@whitecape.org> Date: Wed Apr 27 20:51:36 2016 -0700 glsl: Convert lower_vec_index_to_swizzle to a rvalue visitor. Both are CC'd to stable, so they should show up in an upcoming point release. |
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.