Created attachment 113550 [details] Frame obtained by driver with Mesa 10.3 System Environment: -------------------------- chipset: IVB system architecture: x86-64 xf86-video-intel:2:2.99.912+git20140714.e0523ade xserver: x.org 1.15.1 mesa: 10.4.0, 10.5.0~git20150204.661c8bb2 libdrm: 2.4.54+git20140628.e8c3c135 kernel: 3.13.0 Bug detailed description: ------------------------- I run Mass Effect on VMware Workstation and there are frames with rendering issues. Issues appeared after updating Mesa to 10.4 version. Screenshots with frames obtained by driver with Mesa 10.3 and 10.4 are in attachments.
Created attachment 113551 [details] Frame obtained by driver with Mesa 10.4
Additional info about Workstation: VMware Workstation ver.11.0.0 build 2281183, VMware Tools ver.9.9.0, build 1541296
Can you either bisect to determine when the problem was introduced (preferred) or provide us an apitrace so that we can reproduce it locally?
Also... does this occur on other chipsets or just IVB?
I have found guilty commit between 10.3 and 10.4 - 0e2ba3ee827f77af0b1f322d95c650f6f7f4da88 (glsl: Optimize clamp(x, b, 1.0), where b > 0.0 as max(saturate(x),b)). http://cgit.freedesktop.org/mesa/mesa/commit/?id=0e2ba3ee827f77af0b1f322d95c650f6f7f4da88 Looks like a mistake in second part of changes: In second condition, ir_binop_max should be replaced to ir_binop_min: if (outer_const->is_one() && is_greater_than_zero(inner_val_b->as_constant())) return expr(ir_binop_max, saturate(inner_val_a), inner_val_b); if (inner_val_b->as_constant()->is_one() && is_greater_than_zero(outer_const)) - return expr(ir_binop_max, saturate(inner_val_a), outer_const); + return expr(ir_binop_min, saturate(inner_val_a), outer_const); } } Issue was gone in 2 cases: - optimization was deleted; - optimization was changed like described above. Please check my fix or suggest more appropriate fix.
Yes, that's definitely a bug. Looking through it though, I see some others as well. :( I'll take a stab at it. Thanks a bunch for the report and narrowing it down so far. That is extremely helpful.
Created attachment 113798 [details] [review] patch Please give this patch a try.
(In reply to Matt Turner from comment #7) > Created attachment 113798 [details] [review] [review] > patch > > Please give this patch a try. Ok, patch fixed rendering issues. Thanks!
(In reply to Svyatoslav Pankratov from comment #8) > (In reply to Matt Turner from comment #7) > > Created attachment 113798 [details] [review] [review] [review] > > patch > > > > Please give this patch a try. > > Ok, patch fixed rendering issues. Thanks! Great. Thank you for testing! I'll put a > Tested-by: Svyatoslav Pankratov <svyatoslav.pankratov@intel.com> on it and commit it tomorrow. (Hoping the original author will review it)
(In reply to Matt Turner from comment #9) > (In reply to Svyatoslav Pankratov from comment #8) > > (In reply to Matt Turner from comment #7) > > > Created attachment 113798 [details] [review] [review] [review] [review] > > > patch > > > > > > Please give this patch a try. > > > > Ok, patch fixed rendering issues. Thanks! > > Great. Thank you for testing! > > I'll put a > > > Tested-by: Svyatoslav Pankratov <svyatoslav.pankratov@intel.com> > > on it and commit it tomorrow. (Hoping the original author will review it) Thanks again. Committed as commit cb25087c7bd5f1ad2515647278b32d3f07803f77 Author: Matt Turner <mattst88@gmail.com> Date: Tue Feb 24 10:41:52 2015 -0800 glsl: Rewrite and fix min/max to saturate optimization. The patch will be in the next 10.4.x release and 10.5.
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.