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

Add GPURenderPassDescriptor.maxDrawCount - #3005

Merged
kainino0x merged 1 commit into
gpuweb:mainfrom
Kangz:maxDrawCount
Jun 16, 2022
Merged

kainino0x merged 1 commit into
gpuweb:mainfrom
Kangz:maxDrawCount

Conversation

@Kangz

@Kangz Kangz commented Jun 2, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #2189


💥 Error: 500 Internal Server Error 💥

PR Preview failed to build. (Last tried on Jun 2, 2022, 3:34 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.

🔗 Related URL

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at 
 [no address given] to inform them of the time this error occurred,
 and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.4.10 (Debian) Server at api.csswg.org Port 443</address>
</body></html>

If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

@Kangz
Kangz requested review from kainino0x and litherum June 2, 2022 15:33
@github-actions

github-actions Bot commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

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

Comment thread spec/index.bs
- |indirectOffset| is a multiple of 4.
</div>
1. Add |indirectBuffer| to the [=usage scope=] as [=internal usage/input=].
1. Increment |this|.{{GPURenderCommandsMixin/[[drawCount]]}} by 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Surely there should be a condition here "if drawCount > maxDrawCount then mark the encoder as invalid" or something?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doing it just in end() seems fine to me, is there a need to duplicate it here?

Comment thread spec/index.bs
- |indirectOffset| is a multiple of 4.
</div>
1. Add |indirectBuffer| to the [=usage scope=] as [=internal usage/input=].
1. Increment |this|.{{GPURenderCommandsMixin/[[drawCount]]}} by 1.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doing it just in end() seems fine to me, is there a need to duplicate it here?

@kainino0x
kainino0x merged commit 8e5a48f into gpuweb:main Jun 16, 2022
github-actions Bot added a commit that referenced this pull request Jun 16, 2022
SHA: 8e5a48f
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Jun 16, 2022
SHA: 8e5a48f
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Jun 16, 2022
SHA: 8e5a48f
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Kangz
Kangz deleted the maxDrawCount branch June 17, 2022 08:16
Comment thread spec/index.bs
- |this| must be [=valid=].
- |this|.{{GPUDebugCommandsMixin/[[debug_group_stack]]}} must [=list/is empty|be empty=].
- |this|.{{GPURenderPassEncoder/[[occlusion_query_active]]}} must be `false`.
- |this|.{{GPURenderCommandsMixin/[[drawCount]]}} must be less than |this|.{{GPURenderPassEncoder/[[maxDrawCount]]}}.

@takahirox takahirox Jun 22, 2022 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Sorry for adding a comment to a merged PR.)

Shouldn't drawCount == maxDrawCount be valid? If it should, this line should be replaced with

this.[[drawCount]] must be equal to or less than this.[[maxDrawCount]].

I want to make a PR if it sounds ok.

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.

Good catch! Can you make a PR to change this? ("must be less or equal" is more idiomatic I think? Though English is not my native language).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

English isn't my first language, neither, so I googled.

"less than or equal to" - About 60,400,000 results

"equal to or less than" - About 24,400,000 results

"less than or equal to" may be more natural.

@kainino0x kainino0x added the needs-cts-issue This change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet label Jun 29, 2022
@kainino0x kainino0x removed the needs-cts-issue This change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet label Jul 7, 2022
jdarpinian pushed a commit to jdarpinian/gpuweb that referenced this pull request Aug 12, 2022
juj added a commit to juj/wasm_webgpu that referenced this pull request Aug 18, 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.

Streaming implementations and indirect draws/dispatches

4 participants