Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
atlv24 committed Jan 14, 2025
1 parent 57246a2 commit 6aa49ca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
3 changes: 1 addition & 2 deletions tests/tests/image_atomics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ static IMAGE_64_ATOMICS: GpuTestConfiguration = GpuTestConfiguration::new()
.features(
wgpu::Features::TEXTURE_ATOMIC
| wgpu::Features::TEXTURE_INT64_ATOMIC
| wgpu::Features::SHADER_INT64
| wgpu::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES,
| wgpu::Features::SHADER_INT64,
),
)
.run_async(|ctx| async move {
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl super::AdapterShared {
glow::RGB,
glow::UNSIGNED_INT_10F_11F_11F_REV,
),
Tf::R64Uint => (glow::RG32UI, glow::RED_INTEGER, glow::UNSIGNED_INT), //TODO?
Tf::R64Uint => (glow::RG32UI, glow::RED_INTEGER, glow::UNSIGNED_INT),
Tf::Rg32Uint => (glow::RG32UI, glow::RG_INTEGER, glow::UNSIGNED_INT),
Tf::Rg32Sint => (glow::RG32I, glow::RG_INTEGER, glow::INT),
Tf::Rg32Float => (glow::RG32F, glow::RG, glow::FLOAT),
Expand Down
24 changes: 12 additions & 12 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ bitflags::bitflags! {
/// This is a web and native feature.
const FLOAT32_FILTERABLE = 1 << 11;

// Bits 12-19 available for webgpu features. Should you chose to use some of them for
// Bits 12-18 available for webgpu features. Should you chose to use some of them for
// for native features, don't forget to update `all_webgpu_mask` and `all_native_mask`
// accordingly.

Expand All @@ -416,6 +416,16 @@ bitflags::bitflags! {
// Native Features:
//

/// Enables R64Uint image atomic min and max.
///
/// Supported platforms:
/// - Vulkan (with VK_EXT_shader_image_atomic_int64)
/// - DX12 (with SM 6.6+)
/// - Metal (with MSL 3.1+)
///
/// This is a native only feature.
const TEXTURE_INT64_ATOMIC = 1 << 18;

/// Allows shaders to use f32 atomic load, store, add, sub, and exchange.
///
/// Supported platforms:
Expand Down Expand Up @@ -988,24 +998,14 @@ bitflags::bitflags! {
///
/// [VK_KHR_external_memory_win32]: https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_external_memory_win32.html
const VULKAN_EXTERNAL_MEMORY_WIN32 = 1 << 63;

/// Enables R64Uint image atomic min and max.
///
/// Supported platforms:
/// - Vulkan (with VK_EXT_shader_image_atomic_int64)
/// - DX12 (with SM 6.6+ emulated via Rg32Uint texture)
/// - Metal (with MSL 3.1+ emulated via RG32Uint texture)
///
/// This is a native only feature.
const TEXTURE_INT64_ATOMIC = 1 << 63;
}
}

impl Features {
/// Mask of all features which are part of the upstream WebGPU standard.
#[must_use]
pub const fn all_webgpu_mask() -> Self {
Self::from_bits_truncate(0x7FFFF)
Self::from_bits_truncate(0x3FFFF)
}

/// Mask of all features that are only available when targeting native (not web).
Expand Down

0 comments on commit 6aa49ca

Please sign in to comment.