From 5860649dd066d503b7471a6f2117ba91e3eabd4e Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 21 Jun 2020 23:08:32 -0400 Subject: [PATCH] Fix RODS layout --- wgpu-core/src/conv.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wgpu-core/src/conv.rs b/wgpu-core/src/conv.rs index 9060bdf1af..89de101aca 100644 --- a/wgpu-core/src/conv.rs +++ b/wgpu-core/src/conv.rs @@ -533,11 +533,10 @@ pub(crate) fn map_texture_state( W::COPY_SRC => L::TransferSrcOptimal, W::COPY_DST => L::TransferDstOptimal, W::SAMPLED if is_color => L::ShaderReadOnlyOptimal, - W::SAMPLED => L::DepthStencilReadOnlyOptimal, W::ATTACHMENT_READ | W::ATTACHMENT_WRITE if is_color => L::ColorAttachmentOptimal, - W::ATTACHMENT_READ => L::DepthStencilReadOnlyOptimal, + _ if is_color => L::General, W::ATTACHMENT_WRITE => L::DepthStencilAttachmentOptimal, - _ => L::General, + _ => L::DepthStencilReadOnlyOptimal, }; let mut access = A::empty();