Summary: | layout(location=0) emits error >= MAX_UNIFORM_LOCATIONS due to integer underflow | ||
---|---|---|---|
Product: | Mesa | Reporter: | Micael Dias <kam1kaz3> |
Component: | glsl-compiler | Assignee: | Tapani Pälli <lemody> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | huax.lu |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
will take a look Micael, would be cool to have your shader as a test case. a new piglit test case and fix for the bug has been sent for review .. (In reply to comment #2) > Micael, would be cool to have your shader as a test case. As you created the piglit test, am I right to believe this is no longer needed? The shader is a very simple one basically calling texture() on the uniform sampler2D. Yep no additional tests needed. I sent another fix to the list, all explicit uniform Piglit tests are passing with this. fix has been on the list for some time now .. http://lists.freedesktop.org/archives/mesa-dev/2014-August/066681.html *** Bug 83124 has been marked as a duplicate of this bug. *** fixed in master |
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.
I have a layout(location=0) uniform sampler2D diffuseTex; in my shader, and it fails to compile with error: "location(s) consumed by uniform diffuseTex >= MAX_UNIFORM_LOCATIONS (65536)". I think this is because of this line in ast_to_hir.cpp: > unsigned max_loc = qual->location + var->type->uniform_locations() - 1; If "var->type->uniform_locations()" returns zero and qual->location is zero, we have an integer underflow, and therefore the following checks will fail.