From 98614a02d38f3e8eabd628a14406af191fc36191 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Mon, 10 Jul 2017 16:50:36 -0400 Subject: [PATCH] Fix EnsureTextureUsage not using usage --- src/backend/CommandBufferStateTracker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/CommandBufferStateTracker.cpp b/src/backend/CommandBufferStateTracker.cpp index 1b3a332598..a8d0358ddd 100644 --- a/src/backend/CommandBufferStateTracker.cpp +++ b/src/backend/CommandBufferStateTracker.cpp @@ -381,10 +381,10 @@ namespace backend { if (texture->HasFrozenUsage(nxt::TextureUsageBit::OutputAttachment)) { return true; } - if (!IsInternalTextureTransitionPossible(texture, nxt::TextureUsageBit::OutputAttachment)) { + if (!IsInternalTextureTransitionPossible(texture, usage)) { return false; } - mostRecentTextureUsages[texture] = nxt::TextureUsageBit::OutputAttachment; + mostRecentTextureUsages[texture] = usage; texturesTransitioned.insert(texture); return true; }