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

Validate storage buffer access #2415

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented Jul 27, 2023

Storage buffers only support read or read_write access modes (not write).

Related: gfx-rs/wgpu#4411, gfx-rs/wgpu#3984

Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

A gray checkmark for you, sir!

@teoxoy
Copy link
Member Author

teoxoy commented Jul 31, 2023

@JCapucho how do you feel about this change in the context of GLSL? Do people qualify their buffers as writeonly? I'd imagine it's quite niche.

@JCapucho
Copy link
Collaborator

@JCapucho how do you feel about this change in the context of GLSL? Do people qualify their buffers as writeonly? I'd imagine it's quite niche.

I did see one shader at one point that used it, but yes, it seems like a quite niche thing.

Also I did some little research and it seems that writeonly is more of an hint gpuweb/gpuweb#935, I also took a glance at the vulkan and OpenGL specifications and it doesn't seem to be part of any validation for buffers.

I think this can be removed for now, and then emulated later in the glsl frontend.

@teoxoy teoxoy merged commit 46951a0 into gfx-rs:master Jul 31, 2023
6 checks passed
@teoxoy teoxoy deleted the validate-storage-buffer-access branch July 31, 2023 13:59
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.

3 participants