New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620188 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 308366
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Add GLSL workaround for use of unary - operator in second param of atan() on Intel

Project Member Reported by bsalo...@google.com, Jun 15 2016

Issue description

When unary - is used with the second parameter to atan() in GLSL shaders on at least some Intel OpenGL drivers the parameter is incorrectly converted to an integer. This causes a rendering error with Skia's sweep gradient.

Skia has a workaround for this bug (multiply the parameter by -1 instead of negating it). However, because vendor detection doesn't work in Chromium the workaround is not triggered.

This was caught by our Mac/Intel bot that runs Skia's GM tests through the command buffer. I believe our original discovery of this bug some years ago was on a different OS, perhaps Windows, but I'm not certain.

Example incorrect images:
https://gold.skia.org/detail?test=radial_gradient2&digest=fb1d71ec3308bdc4d893936d607f6716
https://gold.skia.org/detail?test=gradients&digest=f803136eada5e6aea5f81e84c8cff0a8
https://gold.skia.org/detail?test=shallow_gradient_sweep&digest=634a6a41e58f43b8a5fb46e9ed96fe45

These all should have sweep gradients. Instead the gradient draws as two colors, one for y>0 and one for y<0 (in the space of the gradient).
 

Comment 1 by bsalo...@google.com, Jun 15 2016

I labeled this Internals>GPU>ANGLE, please correct if that is not the right component.
Cc: kbr@chromium.org zmo@chromium.org
Well, vendor detection not working seems like a separate problem, cc'ed Mo and Ken for that. If we need to add the workaround to ANGLE's translator then the label makes sense. Not clear on which direction to proceed.
Project Member

Comment 3 by sheriffbot@chromium.org, Jun 15 2016

Labels: Hotlist-Google

Comment 4 by bsalo...@google.com, Jun 15 2016

I meant that Chromium presents its own GL strings to Skia which mask the driver behind the command buffer service side. It's a conscious design choice. I imagine this bug would affect other uses of GL in Chromium such as WebGL.

Comment 5 by zmo@chromium.org, Jun 15 2016

This seems like a driver bug that ANGLE should work around, not Skia.  The GPU detection happens in Chrome, and the workaround is passed down from Chrome to ANGLE translator.

Comment 6 by bsalo...@google.com, Jun 15 2016

I agree, though just noting that we also have to maintain our workaround for other users of Skia.

Comment 7 by zmo@chromium.org, Jun 15 2016

Then I suggest you just apply the workaround to all GPU/drivers.  It's trivia anyway.

Comment 8 by bsalo...@google.com, Jun 20 2016

Sure, we could do that. However, this doesn't just affect Skia and this seems like a natural thing for the shader translator to do.
Project Member

Comment 9 by sheriffbot@chromium.org, Jun 20 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: geoffl...@chromium.org
Status: Available (was: Untriaged)
Ping on this, I think we need the workaround in ANGLE's shader translator.

Comment 11 by zmo@chromium.org, Jun 26 2017

Cc: yunchao...@intel.com
Labels: -Pri-3 Pri-2
Yunchao, since this is Intel driver issue, can someone on your team take a shot at this?
Owner: jiawei.s...@intel.com
Status: Assigned (was: Available)
Fine, @zmo.

Jiawei, please take a look at this bug.
Status: Started (was: Assigned)
The following issues seem very similar to this one:
https://bugs.chromium.org/p/chromium/issues/detail?id=308366
https://bugs.chromium.org/p/chromium/issues/detail?id=672380

The related workarounds have already been in ANGLE, so could anyone verify if they work on this?
Hi Bsalomon,
It seems the workaround has been applied into ANGLE. Could you verify this? Or could you tell me how to reproduce this bug?
Thanks! 
Skia now does see the GL strings and applies this workaround in its shader compiler. Perhaps someone from ANGLE can confirm if this is indeed also implemented in ANGLE. However, this is no longer an issue for Skia.
Mergedinto: 308366
Status: Duplicate (was: Started)
Thanks for Bsalomon's response.
Since this issue has been workaround in ANGLE compiler, I just mark it Duplicate now and will reopen it if it occurs again.  

Sign in to add a comment