Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow read-write storage on selected texture formats #1772

Closed
kvark opened this issue May 26, 2021 · 7 comments
Closed

Allow read-write storage on selected texture formats #1772

kvark opened this issue May 26, 2021 · 7 comments

Comments

@kvark
Copy link
Contributor

kvark commented May 26, 2021

Based on the investigation of #513, we should consider adding a read-write variant of GPUStorageTextureAccess, which is to be allowed on R32 float/sint/uint formats (only). This appears to be guaranteed on D3D12, Vulkan, and requires a certain Apple OS version (macOS 10.13, iOS 11). The expectation is that prior Apple OSes would not have WebGPU exposed.

@kainino0x
Copy link
Contributor

kainino0x commented May 26, 2021

It also has hardware requirements, but the Metal Feature Set Tables defer on actually saying what the hardware requirements are. It seems that they are not strictly tied to particular Feature Sets. Instead, Metal requires a runtime check. In this case, readWriteTextureSupport must be at least MTLReadWriteTextureTier1.

8 Read-write textures are available in some feature sets,
where the texture can be both read from and written to by
the same function. Query the readWriteTextureSupport
property of MTLDevice to determine support.

@kainino0x
Copy link
Contributor

Also if we decide to drop 10.12, we should update #1069.

@kainino0x
Copy link
Contributor

Meeting:
We need telemetry data to determine whether this can be in core.

Until then, we can spec this as optional feature, and perhaps make it non-optional (take out the feature name) later.

@Kangz Kangz added this to the post-V1 milestone Sep 20, 2021
@apbodnar
Copy link

apbodnar commented Dec 8, 2021

As a noob to the WebGPU standards process, does optional mean "available through an extension" in this case? Losing read/write for storage images would be a bummer for a handful of compute use-cases.

@kainino0x
Copy link
Contributor

Yeah, optional means the hardware and browser have to support it, and if so then you can enable it.
https://gpuweb.github.io/gpuweb/#features

@Kangz Kangz modified the milestones: post-V1, Polish post-V1 Apr 14, 2022
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this issue Sep 6, 2022
…ec.ts (gpuweb#1772)

According to the specification, viewDimension should not be `cube` or `cube-array`
if storageTextureLayout is not undefined. So this PR adds a new test to ensure
that a validation error is generated if viewDimention is `cube` or `cube-array`
with a storageTexture.

Issue: gpuweb#885
@etang-cw
Copy link

Small heads up from an issue I recently hit in MoltenVK (KhronosGroup/SPIRV-Cross#2153)

Metal's rw textures don't guarantee that reads see the result of writes made earlier in the same thread without calling explicit barrier functions, so any WGSL → MSL compilers will need to keep this in mind.

@kainino0x kainino0x modified the milestones: Polish post-V1, Milestone 2? Aug 15, 2023
@Kangz Kangz modified the milestones: Polish post-V1, Milestone 1 Sep 26, 2023
@jimblandy
Copy link
Contributor

Closing this issue, as important discussion of this has moved over to #3838.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants