Summary: | program/ir_to_mesa.cpp:1440: virtual void ir_to_mesa_visitor::visit(ir_dereference_variable*): Assertion `var->location != -1' failed. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | medium | ||
Version: | git | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Vinson Lee
2011-06-23 16:26:00 UTC
I posted a patch to the mesa-dev mailing list that should fix this issue. http://marc.info/?l=mesa3d-dev&m=130929376131870&w=2 Fixed on master by the commits below. These commits have been cherry picked to 7.11 (127bd9d and 98af042) and 7.10 (c286f78 and 4e2a5d0). commit d32d4f780f9dad122adb63086da266aec6e88850 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Mon Jun 27 17:59:58 2011 -0700 linker: Assign locations for fragment shader output Fixes an assertion failure in the piglib out-01.frag ARB_explicit_attrib_location test. The locations set via the layout qualifier in fragment shader were not being applied to the shader outputs. As a result all of these variables still had a location of -1 set. This may need some more work for pre-3.0 contexts. The problem is dealing with generic outputs that lack a layout qualifier. There is no way for the application to specify a location (glBindFragDataLocation is not supported) or query the location assigned by the linker (glGetFragDataLocation is not supported). NOTE: This is a candidate for the 7.10 and 7.11 branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624 Reviewed-by: Eric Anholt <eric@anholt.net> Cc: Kenneth Graunke <kenneth@whitecape.org> Cc: Vinson Lee <vlee@vmware.com> commit b078aad8ab22d840456688480a8c27d4664297ce Author: Paul Berry <stereotype441@gmail.com> Date: Tue Jun 28 09:42:24 2011 -0700 glsl: permit explicit locations on fragment shader outputs, not inputs From the OpenGL docs for GL_ARB_explicit_attrib_location: This extension provides a method to pre-assign attribute locations to named vertex shader inputs and color numbers to named fragment shader outputs. This was accidentally implemented for fragment shader inputs. This patch fixes it to apply to fragment shader outputs. Fixes piglit tests spec/ARB_explicit_attrib_location/1.{10,20}/compiler/layout-{01,03,06,07,08,09,10}.frag Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> NOTE: This is a candidate for the 7.10 and 7.11 branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624 mesa: ccecc08f79afc020c8c0acface04a8e53e3a7c32 (master) Verified fixed. |
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.