Summary: | r600g fails shader, tries to run with failed shader, freezes. | ||
---|---|---|---|
Product: | Mesa | Reporter: | David L. <equinox-freedesktopbugs> |
Component: | Drivers/Gallium/r600 | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
R600_DUMP_SHADERS + errors for first failing shader
debug output debug output |
Description
David L.
2011-06-21 22:04:29 UTC
Created attachment 48266 [details]
R600_DUMP_SHADERS + errors for first failing shader
(please note that I added more debug statements, so the line numbers are a few lines off in those last 3 error lines)
i hacked up a counter to tell me which instruction is failing, it seems to be 2517: ADD TEMP[161].x, -TEMP[158].xxxx, CONST[0].wwww if i'm not totally wrong. (my counter says 2518, but it is an ADD that fails so i think I'm off by one...) Do you have the original glsl shader ? (env var MESA_GLSL="dump" should dump it) This shader is awfully big, issue is that it use more temporary than hw has, i am guessing we never check for this. A proper compiler might be able to cut down the number of temporary as there is a lot of scalar operation (only one component of a vector use). (In reply to comment #3) > Do you have the original glsl shader ? (env var MESA_GLSL="dump" should dump > it) I can't dump the shader due to #38584. Also, I'm sorry, I misidentified the failing instruction. TGSI 0x09 isn't ADD but DP3, and my hacked-in instruction counter was not off by one after all... so the instruction that fails is 2517: ADD TEMP[161].x, -TEMP[158].xxxx, CONST[0].wwww 2518>>> DP3 TEMP[162].x, TEMP[138].xyzz, -TEMP[153].xyzz 2519: MOV TEMP[20].w, TEMP[162].xxxx 2520: ADD TEMP[163].xy, -TEMP[147].yyyy, TEMP[20].xwww It fails to compile two more shaders before it crashes, those bail out on: 472: ADD TEMP[150].x, -TEMP[147].xxxx, -CONST[0].wwww 473>>> DP3 TEMP[151].x, TEMP[127].xyzz, -TEMP[142].xyzz 474: ADD TEMP[152].x, -TEMP[136].yyyy, TEMP[136].xxxx 475: ADD TEMP[153].x, -TEMP[136].yyyy, TEMP[151].xxxx and 473: ADD TEMP[151].x, -TEMP[148].xxxx, -CONST[0].wwww 474>>> DP3 TEMP[152].x, TEMP[128].xyzz, -TEMP[143].xyzz 475: ADD TEMP[153].x, -TEMP[137].yyyy, TEMP[137].xxxx 476: ADD TEMP[154].x, -TEMP[137].yyyy, TEMP[152].xxxx I have, however, also seen it crash on ADDs (opcode 0x08) - can't reproduce that right now though. Is there a register limit at around 150...160? The mesa dump shader should at least print the shader that you already pasted here. Really need the glsl one Created attachment 48391 [details]
debug output
debug output attached, started on the game screen before the one using the failing shader. i can't quite make out what source belongs to what... look for "#2518" to find the error.
(no idea if the SEGV at the end is related)
Created attachment 48392 [details]
debug output
debug output, really. turns out c++filt doesn't consider its arguments filenames...
AFAIK, the driver can translate all shaders just fine, so this shouldn't occur anymore. |
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.