Bug 226285

Summary: [Metal ANGLE] transformFeedback samples on webglsamples.org do not render correctly
Product: WebKit Reporter: Kyle Piddington <kpiddington>
Component: New BugsAssignee: Kyle Piddington <kpiddington>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, ews-watchlist, graouts, johncunningham, kondapallykalyan, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Kyle Piddington 2021-05-26 12:31:15 PDT
[Metal ANGLE] transformFeedback samples on webglsamples.org do not render correctly
Comment 1 Kyle Piddington 2021-05-26 12:34:50 PDT
Created attachment 429782 [details]
Patch
Comment 2 Kyle Piddington 2021-05-26 12:34:53 PDT
<rdar://problem/78524773>
Comment 3 EWS Watchlist 2021-05-26 12:35:55 PDT
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 4 Dean Jackson 2021-05-26 16:51:32 PDT
Pasting from an internal discussion (John Cunningham):

lgtm though I’d rather see memoryBarrier on macos if not difficult to add

on AGX macos it just ends and starts a new render pass anyways, but I think it is more efficient on nonagx
Comment 5 Dean Jackson 2021-05-26 16:52:26 PDT
Comment on attachment 429782 [details]
Patch

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

> Source/ThirdParty/ANGLE/ChangeLog:11
> +        for transsform_feedback-seperated_2, we need to invalidate the current render pass descriptor in order to switch to the rasterizer-enabled version of the shader.

typo transsform
Comment 6 Alexey Proskuryakov 2021-05-26 17:13:32 PDT
Comment on attachment 429782 [details]
Patch

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

>> Source/ThirdParty/ANGLE/ChangeLog:11
>> +        for transsform_feedback-seperated_2, we need to invalidate the current render pass descriptor in order to switch to the rasterizer-enabled version of the shader.
> 
> typo transsform

And seperated (found it at http://webglsamples.org/WebGL2Samples/#transform_feedback_separated_2)
Comment 7 John Cunningham 2021-05-26 18:10:40 PDT
Comment on attachment 429782 [details]
Patch

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

Is the prepareForTransformFeedbackPassTwo not needed in drawTriFanArraysLegacy and drawLineLoopArrays

> Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm:1405
> +void ContextMtl::onEndTransformFeedback(const gl::Context *context)

context isn't used in this function

> Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/TransformFeedbackMtl.mm:96
> +    contextMtl->onEndTransformFeedback(context);

not needed if context isn't used in onEndTransformFeedback
Comment 8 Kyle Piddington 2021-05-27 15:07:18 PDT
Created attachment 429936 [details]
Patch
Comment 9 Kyle Piddington 2021-05-28 14:41:37 PDT
Created attachment 430054 [details]
Patch
Comment 10 John Cunningham 2021-05-28 15:55:11 PDT
Comment on attachment 430054 [details]
Patch

LGTM
Comment 11 EWS 2021-06-01 18:01:14 PDT
Committed r278335 (238368@main): <https://commits.webkit.org/238368@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 430054 [details].