From cce9d7a3f72491c7de693f8c44c560a6bf75f699 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 19 Mar 2020 19:44:11 +0100 Subject: [PATCH] Add `Clone` and `PartialEq` implementations for `SamplerDescriptor` Helps when attempting to support multiple samplers in an immediate mode context (e.g. easily compare sampler descriptors and check if I need to add a command to switch bind groups). --- wgpu-types/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 33566b7083..45714530f6 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -796,7 +796,7 @@ impl Default for FilterMode { } #[repr(C)] -#[derive(Debug)] +#[derive(Clone, Debug, PartialEq)] pub struct SamplerDescriptor<'a> { pub address_mode_u: AddressMode, pub address_mode_v: AddressMode,