Skip to content

Conversation

@litherum
Copy link
Contributor

@litherum litherum commented Aug 24, 2022

maxColorAttachmentBytesPerSample

Fixes #2965.

@litherum litherum force-pushed the rendertargetaccounting branch 2 times, most recently from 9c55821 to c6701da Compare August 24, 2022 09:39
@github-actions
Copy link
Contributor

Previews, as seen when this build job started (c6701da):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@litherum litherum requested review from kainino0x and toji August 24, 2022 09:44
@litherum litherum force-pushed the rendertargetaccounting branch from c6701da to 6a57a2f Compare August 24, 2022 10:02
@github-actions
Copy link
Contributor

Previews, as seen when this build job started (6a57a2f):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

Copy link
Contributor

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

lgtm % nits and bikeshedding

spec/index.bs Outdated
{{GPURenderPassDescriptor}}.{{GPURenderPassDescriptor/colorAttachments}},
and {{GPURenderPassLayout}}.{{GPURenderPassLayout/colorFormats}}.

<tr><td><dfn>maxTotalColorAttachmentDepth</dfn>
Copy link
Contributor

Choose a reason for hiding this comment

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

"Depth" is slightly confusing here because we aren't able to say the less ambiguous "bit depth".
I might call this... maxColorAttachmentBytesPerFragment? PerSample?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, it's not per fragment, and it's not per sample. I think the term-of-art for this is, surprisingly, per pixel. maxColorAttachmentBytesPerPixel it is.

<tr><td><dfn>maxTotalColorAttachmentDepth</dfn>
<td>{{GPUSize32}} <td>[=limit class/maximum=] <td>32
<tr class=row-continuation><td colspan=4>
The maximum number of bytes necessary to hold a pixel, across all color attachments.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use "fragment" or "sample" instead of "pixel" so the meaning is clearer in the multisampled case.

Copy link
Contributor Author

@litherum litherum Aug 25, 2022

Choose a reason for hiding this comment

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

Right, as above, I think "pixel" is actually the term-of-art to refer to "the thing that includes all samples in all relevant texels of the render targets."

Our docs call this "Maximum total render target size, per pixel, ..."

Copy link
Contributor

@kainino0x kainino0x Aug 26, 2022

Choose a reason for hiding this comment

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

Hmm. The accounting algorithm doesn't multiply by the sampleCount or anything like that though. Isn't this effectively the size of all of the data coming out of the fragment shader (, blending, etc.)?

@litherum litherum merged commit fbdb22a into gpuweb:main Aug 25, 2022
@litherum litherum deleted the rendertargetaccounting branch August 25, 2022 06:26
@github-actions
Copy link
Contributor

Previews, as seen when this build job started (0018dda):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

juj added a commit to juj/wasm_webgpu that referenced this pull request Aug 29, 2022
@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 Oct 3, 2022
@lokokung
Copy link
Contributor

lokokung commented Dec 1, 2022

Removing 'needs-cts-label' after filing draft issues:

  • val: render_pipeline,fragment_state:max_color_attachment_bytes_per_sample
  • val: render_pass,render_pass_descriptor:max_color_attachment_bytes_per_sample

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.

maxColorAttachments not sufficient?

3 participants