Summary: | [swrast] piglit glsl-array-bounds-01 regression | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Drivers/DRI/swrast | Assignee: | mesa-dev |
Status: | RESOLVED MOVED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | CC: | kenneth, t_arceri |
Version: | 12.0 | Keywords: | bisected, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 98471 |
Description
Vinson Lee
2016-06-26 19:44:00 UTC
I can't reproduce this. I tried both classic swrast and llvmpipe and it seems to be working fine. I can reproduce this here so gave it a quick look: The GLSL IR is identical with _and_ w/o the optimisations (MESA_GLSL=nopt), yet the result changes to pass. Seems like the _mesa_optimize_program invocation from ir_to_mesa.cpp:get_mesa_program() is the one to blame. Something sounds quite fishy here... I think the test is wrong, it should not be expecting a specific outcome. The spec says: "Behavior is undefined if a shader subscripts an array with an index less than 0 or greater than or equal to the size the array was declared with." And the test is doing: float array[] = float [] (1.0, 2.0, 3.0, 4.0); void main() { int idx = 20; if (array[idx] == 5.0) gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0); else gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); } So the result is undefined. I've update the test to have the same outcome regardless of which branch is taken. https://patchwork.freedesktop.org/patch/147474/ This should fix the problem. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/321. |
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.