Skip to content

Conversation

sagudev
Copy link
Collaborator

@sagudev sagudev commented Jul 30, 2025

Both t2b and b2t uses validating GPUTexelCopyBufferInfo, so COPY_BYTES_PER_ROW_ALIGNMENT needs to be respected in both. This is already correctly enforced by wgpu.

…texture_to_buffer`

Both t2b and b2t uses [validating GPUTexelCopyBufferInfo](https://www.w3.org/TR/webgpu/#abstract-opdef-validating-gputexelcopybufferinfo), so `COPY_BYTES_PER_ROW_ALIGNMENT` needs to be respected in both. This is already correctly enforced by wgpu.
@sagudev sagudev requested a review from a team as a code owner July 30, 2025 17:37
pub type DynamicOffset = u32;

/// Buffer-to-texture copies must have [`bytes_per_row`] aligned to this number.
/// Buffer-texture copies must have [`bytes_per_row`] aligned to this number.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Buffer-texture is this clear enough that it works both ways?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems good to me, I have been using it that way.

pub type DynamicOffset = u32;

/// Buffer-to-texture copies must have [`bytes_per_row`] aligned to this number.
/// Buffer-texture copies must have [`bytes_per_row`] aligned to this number.
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems good to me, I have been using it that way.

@ErichDonGubler ErichDonGubler merged commit 45e96e5 into gfx-rs:trunk Jul 31, 2025
40 checks passed
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