Skip to content

Panic whilst loading ktx2 file #9121

@66OJ66

Description

@66OJ66

Bevy version

v0.11.0

[Optional] Relevant system information

Rust 1.70
OS: openSUSE Tumbleweed

`AdapterInfo { name: "AMD Radeon RX 6600 XT (RADV NAVI23)", vendor: 4098, device: 29695, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 23.1.2", backend: Vulkan }`

What went wrong

I attempted to load a ktx2 file which led to the following panic.

2023-07-11T22:23:24.829163Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default    
thread 'Compute Task Pool (5)' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_texture
    Texture format Astc { block: B4x4, channel: UnormSrgb } can't be used due to missing features.
    Features Features(TEXTURE_COMPRESSION_ASTC) are required but not enabled on the device

', /home/_/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.16.2/src/backend/direct.rs:3019:5

This file loaded without issue in Bevy v0.10.1 (and earlier) with these features enabled:

[dependencies]
bevy = { version = "0.10.1", features = ["ktx2", "zstd", "basis-universal"]}

Additional information

I've uploaded a basic example here: https://github.com/66OJ66/basis_universal_error_repo

The original PNG file was sourced from here: https://ambientcg.com/view?id=Ground037

I converted it to ktx2 using toktx (https://github.khronos.org/KTX-Software/ktxtools/toktx.html).
The exact command was:
toktx --encode uastc --zcmp 22 --genmipmap --uastc_rdo_l 0.5 {output} {input.png}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions