Skip to content

Conversation

@tychedelia
Copy link
Member

Makes ShaderStorageBuffer have parity with Image vis-a-vis #22552.

We apply the same pattern used there here.

@tychedelia tychedelia requested a review from robtfm January 17, 2026 00:17
@tychedelia tychedelia added C-Feature A new feature, making something new possible A-Rendering Drawing game state to the screen D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 17, 2026
@tychedelia tychedelia added this to the 0.19 milestone Jan 17, 2026
label: None,
size: 0,
usage: BufferUsages::STORAGE,
usage: BufferUsages::STORAGE | BufferUsages::COPY_DST,
Copy link
Contributor

Choose a reason for hiding this comment

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

is that needed for overwriting? i guess we should check for it before doing so then (in both prs)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's needed for write_buffer. Also, I just saw this on the WebGPU matrix:

Dawn always internally enables COPY_SRC and COPY_DST for internal operations and we have considered proposing making those usages always enabled, but haven't bothered.

We should maybe consider doing the same.

Copy link
Member Author

Choose a reason for hiding this comment

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

Although I take your point about also checking, we should avoid panics where possible. I think we should maybe consider adding by default and then if the user removes they're responsible if their copies/etc no longer work.

Copy link
Contributor

Choose a reason for hiding this comment

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

i don't think we need to panic, we can just fall back to recreating

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, done, that makes more sense, and yeah we should be checking the flag on image too.

Copy link
Contributor

Choose a reason for hiding this comment

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

(image default already includes COPY_DST and COPY_SRC)

…tion

# Conflicts:
#	crates/bevy_render/src/storage.rs
@atlv24 atlv24 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 17, 2026
@alice-i-cecile
Copy link
Member

Merge conflcits are non-trivial; please ping me when they're resolved :)

@mockersf mockersf added this pull request to the merge queue Jan 19, 2026
Merged via the queue into bevyengine:main with commit 2472949 Jan 20, 2026
38 checks passed
@mockersf
Copy link
Member

this PR is causing crashes: #22609

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

Labels

A-Rendering Drawing game state to the screen C-Feature A new feature, making something new possible D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants