Skip to content

Allow using Device::create_texture_with_data correctly with mipmapped non-block aligned textures#7678

Closed
atlv24 wants to merge 2 commits intogfx-rs:trunkfrom
atlv24:fix-ktx2-size
Closed

Allow using Device::create_texture_with_data correctly with mipmapped non-block aligned textures#7678
atlv24 wants to merge 2 commits intogfx-rs:trunkfrom
atlv24:fix-ktx2-size

Conversation

@atlv24
Copy link
Copy Markdown
Collaborator

@atlv24 atlv24 commented May 8, 2025

Connections
Fixes #7677
Bevy side of the fix: bevyengine/bevy#19129

Description
Implicitly expand size to blocksize in create_texture_with_data to allow using logical size in mip size computations

Testing
Patch into bevy repro of the issue and it works

Squash or Rebase?
Any

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

…low using logical size in mip size computations
@cwfitzgerald cwfitzgerald changed the title Allow using Device::create_texture_with_data correctly with mipmapped nPOT textures Allow using Device::create_texture_with_data correctly with mipmapped non-block aligned textures May 17, 2025
@cwfitzgerald cwfitzgerald self-assigned this May 21, 2025
@cwfitzgerald
Copy link
Copy Markdown
Member

Per discussion in the attached issue, this PR is not correct, closing.

@atlv24 atlv24 deleted the fix-ktx2-size branch April 2, 2026 20:26
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.

Device::create_texture_with_data is not possible to use correctly with mipmapped non-block aligned textures.

2 participants