Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kainino0x
Copy link
Contributor

@kainino0x kainino0x commented Oct 1, 2021

This loses support for exactly 0 gpuinfo.org reports that were still
supported with our other requirements.

Beginning with 944 unique deviceNames in 10808 reports.

(..., see #1069)
Requirement "maxUniformBufferRange >= 16384" loses 1 further deviceNames:
  In ALL reports:
  In SOME reports:
    Apple M1: 5 of 12 (10469 10529 10541 10576 10588; ok: 11048 11395 11396 11632 11689 11884 12086)
Requirement "maxUniformBufferRange >= 65536" loses 0 further deviceNames:

Preview | Diff

This loses support for exactly 0 gpuinfo.org reports that were still
supported with our other requirements.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2021

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

@Kangz
Copy link
Contributor

Kangz commented Oct 4, 2021

Are we sure this won't run into limits on D3D12 and Metal?

@kvark
Copy link
Contributor

kvark commented Oct 4, 2021

D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT is 4096, which means 16K byte size. Has the interpretation of this limit changed?

@kainino0x
Copy link
Contributor Author

kainino0x commented Oct 4, 2021

D3D12_REQ_CONSTANT_BUFFER_ELEMENT_COUNT is 4096, which means 16K byte size. Has the interpretation of this limit changed?

I thought this wasn't an issue from the conclusion here:
#803 (comment)

... but I guess that was a wrong conclusion? (If so the error message is kind of misleading.)

@kvark
Copy link
Contributor

kvark commented Oct 4, 2021

Just tried 4096 elements of vec4, and it seems to pass FXC.

@kainino0x
Copy link
Contributor Author

kainino0x commented Oct 4, 2021

... but I guess that was a wrong conclusion? (If so the error message is kind of misleading.)

Actually, if this stackoverflow answer is correct: https://stackoverflow.com/a/18260016
In D3D11, D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT is actually describing the number of 16-byte elements specifically, not the number of actual individual elements, so it is actually 65536 bytes. (Also, this means the D3D12 error message is not misleading, only the constant name is misleading.)

@kvark
Copy link
Contributor

kvark commented Oct 5, 2021

Double-checked that we can create more than 4K "elements" in a constant buffer - http://shader-playground.timjones.io/09fe5a6eabe2ada04525de0f67f2159f

@kainino0x
Copy link
Contributor Author

FXC doesn't seem sufficient to check this though. For example if I add one more field to that struct (so it goes over 64k) it still doesn't complain.

@Kangz
Copy link
Contributor

Kangz commented Oct 11, 2021

@RafaelCintron can you provide input from the D3D12 side?

@RafaelCintron
Copy link
Contributor

@RafaelCintron can you provide input from the D3D12 side?

Yes, this should work from the D3D12 side.

@kainino0x
Copy link
Contributor Author

[Editors]
With confirmation from D3D12 and Vulkan (and the fact that Metal doesn't have uniform buffers, or binding limits - only "Maximum buffer length"), this should be safe to land.

@kainino0x
Copy link
Contributor Author

(Old metal feature set tables show "Maximum buffer length" as no less than 256MB. Now it's queried dynamically: https://developer.apple.com/documentation/metal/mtldevice/2966563-maxbufferlength)

@kainino0x kainino0x merged commit 9a87331 into gpuweb:main Oct 25, 2021
@kainino0x kainino0x deleted the 64k branch October 25, 2021 21:16
github-actions bot added a commit that referenced this pull request Oct 25, 2021
SHA: 9a87331
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 Oct 25, 2021
SHA: 9a87331
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 Oct 25, 2021
SHA: 9a87331
Reason: push, by @kainino0x

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
fujunwei pushed a commit to fujunwei/webnn-native-1 that referenced this pull request Dec 8, 2021
This was upped in gpuweb/gpuweb#2159

Bug: dawn:1173
Change-Id: I98d46b9b5a339280d21ddcb2ab039ce7ebce4ec3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71608
Commit-Queue: Brandon Jones <[email protected]>
Auto-Submit: Corentin Wallez <[email protected]>
Reviewed-by: Brandon Jones <[email protected]>
fujunwei pushed a commit to fujunwei/webnn-native-1 that referenced this pull request Dec 8, 2021
This reverts commit 1a57ee9.

Reason for revert: Swiftshader does not support 2^16 at the moment, and this is causing all Swiftshader tests to be skipped silently.

Original change's description:
> Bump maxUniformBindingSize to 2^16 from 2^14
>
> This was upped in gpuweb/gpuweb#2159
>
> Bug: dawn:1173
> Change-Id: I98d46b9b5a339280d21ddcb2ab039ce7ebce4ec3
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71608
> Commit-Queue: Brandon Jones <[email protected]>
> Auto-Submit: Corentin Wallez <[email protected]>
> Reviewed-by: Brandon Jones <[email protected]>

[email protected],[email protected],[email protected],[email protected],[email protected]

Change-Id: Ib7d6023adac3f99b8e7238035eed2a16f2ced6d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:1173
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71840
Reviewed-by: Austin Eng <[email protected]>
Commit-Queue: Loko Kung <[email protected]>
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.

5 participants