Summary: | [swrast] piglit glsl-vs-clamp-1 regression | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | Mesa core | Assignee: | Abdiel Janulgue <abdiel.janulgue> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | abdiel.janulgue, huax.lu, idr, mattst88 |
Version: | git | Keywords: | bisected, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 83384 | ||
Attachments: | swrast fix |
Description
Vinson Lee
2014-09-03 23:00:38 UTC
We got an infinite loop in swrast which is caused by the back and forth ping-pong between saturate-to-clamp lowering pass and the clamp-to-saturate opt_algebraic optimization pass. I got a fix coming up which optionally disables the opt_algebraic optimization by adding an EmitNoSat toggle in gl_shader_compiler_options. Created attachment 105892 [details] [review] swrast fix Vinson, can you please try the attached patch if it fixes the issue? swrast should be able to handle ir_unop_saturate just fine - it shouldn't need the lowering pass at all, even in the vertex shader. This may still be necessary though - I don't know if r200 can do this (or if it even supports GLSL), or about pre-SM3 gallium drivers. It sounds like drivers should set options->EmitNoSat for the VS stages, and we should only add the SAT_TO_CLAMP flag when options->EmitNoSat is set (in addition to disabling the opt_algebraic optimization in that case). That way, saturate actually happens for drivers that can support it. attachment 105892 [details] [review] fixes swrast regression. Tested-by: Vinson Lee <vlee@freedesktop.org> These other piglit regressions were also introduced with commit 8f890b119eaff88a7fad64abbf183cbcc22edc7a. glsl-vs-raytrace-bug26691 vs-smoothstep-float-float-float vs-smoothstep-float-float-vec2 vs-smoothstep-float-float-vec3 vs-smoothstep-float-float-vec4 vs-smoothstep-vec2-vec2-vec2 vs-smoothstep-vec3-vec3-vec3 vs-smoothstep-vec4-vec4-vec4 fs-bool-less-compare-true vs-saturate-exp2 vs-saturate-pow vs-saturate-sqrt (In reply to Kenneth Graunke from comment #3) > swrast should be able to handle ir_unop_saturate just fine - it shouldn't > need the lowering pass at all, even in the vertex shader. > > This may still be necessary though - I don't know if r200 can do this (or if > it even supports GLSL), or about pre-SM3 gallium drivers. > > It sounds like drivers should set options->EmitNoSat for the VS stages, and > we should only add the SAT_TO_CLAMP flag when options->EmitNoSat is set (in > addition to disabling the opt_algebraic optimization in that case). That > way, saturate actually happens for drivers that can support it. Hi Ken! Sorry for the delay. I was not yet sure which drivers you mean. Do you mean *all* drivers (including r200)? Or if I understood this correctly, I would have to set EmitNoSat in the gallium state tracker and in ir_to_mesa as is done in this patch? *** Bug 83384 has been marked as a duplicate of this bug. *** Patch has now landed in 10.4: http://cgit.freedesktop.org/mesa/mesa/commit/?h=10.4&id=65f03e673310fe1cdf1416d30f14a7f3edc2cd4e |
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.