Sitelet https://github.com/gpuweb/gpuweb/pull/2751
Skip to content

Finish reworking encoder mixins - #2751

Merged
toji merged 6 commits into
gpuweb:mainfrom
kainino0x:encoder-mixins3
Apr 12, 2022
Merged

toji merged 6 commits into
gpuweb:mainfrom
kainino0x:encoder-mixins3

Conversation

@kainino0x

@kainino0x kainino0x commented Apr 12, 2022 •

Copy link
Copy Markdown
Contributor

fixes #1270


Preview | Diff

@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (8874979):
WebGPU | IDL
WGSL
Explainer

@kainino0x
kainino0x requested a review from toji April 12, 2022 21:04
@kainino0x

Copy link
Copy Markdown
Contributor Author

open q: should it be GPURenderCommandsMixin or GPURenderBundleCommandsMixin? Or something else like GPUCoreRenderCommandsMixin?

@kainino0x
kainino0x marked this pull request as ready for review April 12, 2022 21:13

@toji toji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I have some comments but nothing that needs to be handled prior to landing this.

Comment thread spec/index.bs
</script>

{{GPUProgrammablePassEncoder}} has the following internal slots:
{{GPUBindingCommandsMixin}} is only included by interfaces which include

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously WebIDL doesn't give us a way to enforce this, so the wording here and in similar scenarios doesn't matter too much, but if we revisit this I'd be tempted to use stronger language like "must only be included by..."

Comment thread spec/index.bs
Comment thread spec/index.bs

Issue the following steps on the [=Device timeline=] of |this|.{{GPUObjectBase/[[device]]}}:
<div class=device-timeline>
1. [$Prepare the encoder state$] of |this|. If it returns false, stop.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not introduced in this PR, but it's something I noticed while reviewing it: The verbiage "Prepare the encoder state" sounds a little strange to me throughout this doc, as it sounds like it's doing more work than it actually is. Something like "Validate the encoder state" would be more indicative to me of the action that's actually being taken.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We named it this way because it can change the encoder to "invalid". But true it doesn't actually change the [[state]] of the encoder now that's distinct from the validity...

@toji
toji merged commit 0ec7d21 into gpuweb:main Apr 12, 2022
@kainino0x
kainino0x deleted the encoder-mixins3 branch April 25, 2022 16:46
This was referenced Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPURenderBundleEncoder shouldn't have a [[command_encoder]]

2 participants