Summary: | [hsw bisected][PATCH] atomic counters doesn't work for a binding point different to zero | ||
---|---|---|---|
Product: | Mesa | Reporter: | Alejandro Piñeiro (freenode IRC: apinheiro) <apinheiro> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | t_arceri |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Simple program to test the bug
Fixes the bug |
Description
Alejandro Piñeiro (freenode IRC: apinheiro)
2015-04-25 16:37:08 UTC
Created attachment 115326 [details] [review] Fixes the bug Taking into account the explanation on the header about the variable binding (ast.h:553) /** * Binding specified via GL_ARB_shading_language_420pack's "binding" keyword. * * \note * This field is only valid if \c explicit_binding is set. */ int binding; The binding is correct (and should be updated) if explicit_binding is true. But the correct behaviour was updating it if it was false. This was not detected by piglit because all the calls to glBindBufferBase(GL_ATOMIC_COUNTER_BUFFER are using 0. I tested this patch by running all piglit on my system, and I didn't detect regression. I also runned make check without issues. (In reply to Alejandro Piñeiro (freenode IRC: apinheiro) from comment #1) > The binding is correct (and should be updated) if explicit_binding is true. > But the correct behaviour was updating it if it was false. ^^^^^^ typo: current Forgot to mention that I sent the patch to the mailing list. Second version already available here: http://lists.freedesktop.org/archives/mesa-dev/2015-April/082917.html During the review of the first version of the patch, it was suggested to add a piglit test to catch this problem. First version of a piglit test here: http://lists.freedesktop.org/archives/piglit/2015-April/015877.html Update: (In reply to Alejandro Piñeiro (freenode IRC: apinheiro) from comment #3) > Forgot to mention that I sent the patch to the mailing list. Second version > already available here: > > http://lists.freedesktop.org/archives/mesa-dev/2015-April/082917.html Timothy Arceri is providing an alternative solution as part of his work of ARB_arrays_of_arrays GLSL ES. Last patch here: http://lists.freedesktop.org/archives/mesa-dev/2015-July/090103.html > During the review of the first version of the patch, it was suggested to add > a piglit test to catch this problem. First version of a piglit test here: > > http://lists.freedesktop.org/archives/piglit/2015-April/015877.html The fourth version of the same patch got reviewed and pushed by Timothy Arceri to piglit: http://cgit.freedesktop.org/piglit/commit/?id=25f58b2ef0ef80a9dbcb43e6976927fdcb28b617 Fix pushed as part of commit a3d0359aff7a glsl: keep track of intra-stage indices for atomics This is more optimal as it means we no longer have to upload the same set of ABO surfaces to all stages in the program. This also fixes a bug where since commit c0cd5b var->data.binding was being used as a replacement for atomic buffer index, but they don't have to be the same value they just happened to end up the same when binding is 0. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Alejandro Piñeiro <apinheiro@igalia.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90175 |
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.