From a9ccbc7deab9618e7dd80aa7e95b7ca7565a203a Mon Sep 17 00:00:00 2001 From: Lukas Herzberger Date: Tue, 26 Mar 2024 14:57:24 +0100 Subject: [PATCH] Add support for storage texture access modes ReadOnly and ReadWrite on WebGPU backend (#5434) * add support for all storage texture access modes * update changelog * fix typo --- CHANGELOG.md | 4 ++++ wgpu/src/backend/webgpu.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a48189cb2..24d61fce9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,6 +119,10 @@ Bottom level categories: - Allow user to select which MSL version to use via `--metal-version` with Naga CLI. By @pcleavelin in [#5392](https://github.com/gfx-rs/wgpu/pull/5392) +#### WebGPU + +- Add support for storage texture access modes `ReadOnly` and `ReadWrite`. By @JolifantoBambla in [#5434](https://github.com/gfx-rs/wgpu/pull/5434) + ### Bug Fixes #### General diff --git a/wgpu/src/backend/webgpu.rs b/wgpu/src/backend/webgpu.rs index 431719b7f8..52a4d2931e 100644 --- a/wgpu/src/backend/webgpu.rs +++ b/wgpu/src/backend/webgpu.rs @@ -1578,10 +1578,10 @@ impl crate::context::Context for ContextWebGpu { webgpu_sys::GpuStorageTextureAccess::WriteOnly } wgt::StorageTextureAccess::ReadOnly => { - panic!("ReadOnly is not available") + webgpu_sys::GpuStorageTextureAccess::ReadOnly } wgt::StorageTextureAccess::ReadWrite => { - panic!("ReadWrite is not available") + webgpu_sys::GpuStorageTextureAccess::ReadWrite } }; let mut storage_texture = webgpu_sys::GpuStorageTextureBindingLayout::new(