Bug 219061 - [WebGL2] Rasterizer discard interferes with implicit clears
Summary: [WebGL2] Rasterizer discard interferes with implicit clears
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kenneth Russell
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-17 18:22 PST by Kenneth Russell
Modified: 2020-11-30 13:55 PST (History)
11 users (show)

See Also:


Attachments
Patch (22.00 KB, patch)
2020-11-17 21:40 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (12.93 KB, patch)
2020-11-20 13:57 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff
Patch (12.99 KB, patch)
2020-11-23 15:50 PST, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2020-11-17 18:22:42 PST
In Chromium bug http:///crbug.com/1149176 it was pointed out that enabling the RASTERIZER_DISCARD state interferes with the WebGL context's implicit auto-clears. A conformance test for this was just added in https://github.com/KhronosGroup/WebGL/pull/3183 ; WebKit needs fixes in this area as well.
Comment 1 Kenneth Russell 2020-11-17 21:40:44 PST
Created attachment 414410 [details]
Patch
Comment 2 Kenneth Russell 2020-11-17 21:42:07 PST
Could I ask for a little help with the above patch? The new test fails in TestRunner, though it passes in MiniBrowser. I gather there are compositing differences in the test runner, but couldn't figure out if there are any Internals methods that can force a composite, for example.
Comment 3 Kenneth Russell 2020-11-20 13:57:51 PST
Created attachment 414717 [details]
Patch
Comment 4 Kenneth Russell 2020-11-20 13:58:59 PST
Removed the new WebGL conformance test as a layout test after discussion with dino and kkinnunen - TestRunner doesn't pass it, but the browser and MiniBrowser do. Will do follow-on work on that.
Comment 5 Dean Jackson 2020-11-23 13:33:12 PST
Comment on attachment 414717 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=414717&action=review

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:467
> +        : m_context(context), m_wasEnabled(wasEnabled)

Nit: we do this on two lines.

> Source/WebCore/html/canvas/WebGLRenderingContextBase.h:650
> +    bool m_rasterizerDiscardEnabled;

Not necessary now, but we should probably go through these and give them default values.
Comment 6 Kenneth Russell 2020-11-23 15:49:13 PST
Comment on attachment 414717 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=414717&action=review

>> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:467
>> +        : m_context(context), m_wasEnabled(wasEnabled)
> 
> Nit: we do this on two lines.

Done.

>> Source/WebCore/html/canvas/WebGLRenderingContextBase.h:650
>> +    bool m_rasterizerDiscardEnabled;
> 
> Not necessary now, but we should probably go through these and give them default values.

Yes, let's do that - strongly prefer that style. Fixed this new one.
Comment 7 Kenneth Russell 2020-11-23 15:50:07 PST
Created attachment 414815 [details]
Patch
Comment 8 Kenneth Russell 2020-11-23 21:24:59 PST
Comment on attachment 414815 [details]
Patch

Forgot that the repo's closed this week.
Comment 9 Radar WebKit Bug Importer 2020-11-26 03:19:06 PST
<rdar://problem/71747708>
Comment 10 Kenneth Russell 2020-11-30 11:06:42 PST
Comment on attachment 414815 [details]
Patch

Attempting cq+.
Comment 11 EWS 2020-11-30 11:21:15 PST
Committed r270253: <https://trac.webkit.org/changeset/270253>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 414815 [details].
Comment 12 Kenneth Russell 2020-11-30 13:55:55 PST
For what it's worth, I analyzed the layout test failures seen by the EWS as being unrelated to this patch. Please tell me if that seems to not be the case.