gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
11.57k stars 859 forks source link

SHADER_INT64_ATOMIC_MIN_MAX can never be requested on Vulkan #5887

Closed JMS55 closed 1 day ago

JMS55 commented 2 weeks ago

SHADER_INT64_ATOMIC_MIN_MAX never seems to be able to be requested. Somewhere in wgpu-hal it thinks my GPU (RTX 3080) lacks support, but it shouldn't.

wgpu rev abba12a

teoxoy commented 1 week ago

This might be due to https://github.com/gfx-rs/wgpu/issues/5784.

JMS55 commented 1 week ago

I tried changing this:

shader_atomic_int64: if device_api_version >= vk::API_VERSION_1_2
    || enabled_extensions.contains(&khr::shader_atomic_int64::NAME)
{
    Some(
        vk::PhysicalDeviceShaderAtomicInt64Features::default()
            .shader_buffer_int64_atomics(requested_features.intersects(
                wgt::Features::SHADER_INT64_ATOMIC_ALL_OPS
                    | wgt::Features::SHADER_INT64_ATOMIC_MIN_MAX,
            )),
    )
} else {
    None
},

to this:

shader_atomic_int64: if device_api_version >= vk::API_VERSION_1_2
    || enabled_extensions.contains(&khr::shader_atomic_int64::NAME)
{
    Some(
        vk::PhysicalDeviceShaderAtomicInt64Features::default()
            .shader_buffer_int64_atomics(requested_features.intersects(
                wgt::Features::SHADER_INT64_ATOMIC_ALL_OPS
                    | wgt::Features::SHADER_INT64_ATOMIC_MIN_MAX,
            ))
            .shader_shared_int64_atomics(requested_features.intersects(
                wgt::Features::SHADER_INT64_ATOMIC_ALL_OPS
                    | wgt::Features::SHADER_INT64_ATOMIC_MIN_MAX,
            )),
    )
} else {
    None
},

Still doesn't work :(