From 299a051db136f4324adf63acd8123a4f4a1da717 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Wed, 22 Jan 2020 08:07:07 +0100 Subject: [PATCH] Switch value of BufferUsage's INDIRECT and STORAGE_READ fields This makes the value of INDIRECT equal to it's value in the IDL spec. (STORAGE_READ is not present in the IDL spec). --- ffi/wgpu.h | 4 ++-- wgpu-core/src/resource.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ffi/wgpu.h b/ffi/wgpu.h index 8a269da1c..1dd358f40 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -502,8 +502,8 @@ typedef uint32_t WGPUBufferUsage; #define WGPUBufferUsage_VERTEX 32 #define WGPUBufferUsage_UNIFORM 64 #define WGPUBufferUsage_STORAGE 128 -#define WGPUBufferUsage_STORAGE_READ 256 -#define WGPUBufferUsage_INDIRECT 512 +#define WGPUBufferUsage_INDIRECT 256 +#define WGPUBufferUsage_STORAGE_READ 512 #define WGPUBufferUsage_NONE 0 typedef struct { diff --git a/wgpu-core/src/resource.rs b/wgpu-core/src/resource.rs index 083a4240b..77029bc14 100644 --- a/wgpu-core/src/resource.rs +++ b/wgpu-core/src/resource.rs @@ -31,8 +31,8 @@ bitflags::bitflags! { const VERTEX = 32; const UNIFORM = 64; const STORAGE = 128; - const STORAGE_READ = 256; - const INDIRECT = 512; + const INDIRECT = 256; + const STORAGE_READ = 512; const NONE = 0; /// The combination of all read-only usages. const READ_ALL = Self::MAP_READ.bits | Self::COPY_SRC.bits |