Summary: | piglit.spec.glsl-1_30.compiler.switch-statement.switch-case-duplicated.vert regression | ||
---|---|---|---|
Product: | Mesa | Reporter: | Mark Janes <mark.a.janes> |
Component: | Drivers/DRI/i965 | Assignee: | Tapani Pälli <lemody> |
Status: | VERIFIED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | idr, t_arceri, vlee |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Mark Janes
2016-08-11 21:41:39 UTC
*** Bug 97326 has been marked as a duplicate of this bug. *** The problem here is they way switch label hashtable is built, it uses case label as the key and in the test this key is '0'. Now when new hash table searches entries it has a check 'entry_is_present' that checks if key != NULL and this fails in the particular case where case label is 0. One easy way is just to store key + 1 to avoid using 0, I'll investigate if there would be nicer way. > One easy way is just to store key + 1 to avoid using 0
Which would obviously fail when value is -1 :) Anyway, basic idea would be to avoid using 0 as key.
I believe I have a working fix (uses _mesa_hash_data for key), will run testing and send to mesa-dev if no regressions. fixed by: --- 8< --- commit 68233801aeb73961cd47dbba276e5d6fcf5411fc Author: Tapani Pälli <tapani.palli@intel.com> Date: Fri Aug 19 13:44:54 2016 +0300 glsl: fix key used for hashing switch statement cases Implementation previously used value itself as the key, however after hash implementation change by ee02a5e we cannot use 0 as key. v2: use constant pointer as the key and implement comparison for contents (Eric Anholt) Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97309 |
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.