Fix EnsureTextureUsage not using usage

This commit is contained in:
Corentin Wallez 2017-07-10 16:50:36 -04:00 committed by Corentin Wallez
parent 296951df60
commit 98614a02d3
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}