Summary: | Bizarre vertex shader results (warped geometry) unless a never executed if-branch is added. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Luca Deltodesco <delta_luca> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED INVALID | 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: |
GLSL code for the 3 vertex shaders, work-around highlighted in each case.
screenshot with workaround in place. Screenshot without workaround in place GLSL and IR dumps for the 3 vertex shaders without workarounds GLSL and IR dumps for the 3 vertex shaders with workarounds |
Description
Luca Deltodesco
2014-09-17 15:19:08 UTC
Created attachment 106439 [details]
screenshot with workaround in place.
Created attachment 106440 [details]
Screenshot without workaround in place
For quick referenece, the work-around in each case for the 3 vertex shaders consists of: if (distance < -10.0) { devicePos = 0.0; } where distance is a local variable resulting from a call to length(_) ( and so can never be less than -10.0) and devicePos is another local variable used later in the function. The particular choice was not important, only that our compile step to GLSL from CG did not strip the if-branch from the code. Can you provide the output of the with and without work-around shaders with the following environment variables set? INTEL_DEBUG=vs MESA_GLSL=dump Looking at differences in the IR and the final generated assembly might shed some light on the situation. The most likely scenario is one of the optimization passes is making a bad choice... Created attachment 106493 [details]
GLSL and IR dumps for the 3 vertex shaders without workarounds
No assembly was found for these 3 shaders in the logs.
Created attachment 106494 [details]
GLSL and IR dumps for the 3 vertex shaders with workarounds
No assembly dumps were found for these 3 shaders in the logs.
Does this still happen with a recent version of Mesa? Its little hard to do anything about this just with the shaders an example app would be useful. There is nothing obvious in the dumps either. It's been over a year since more information was requested, and a lot longer since the bug was filed. Assuming this was has been fixed and the bug is no longer valid. |
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.