From 92d414780f6ff4840048d3752be64bebc4a50e04 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 1 Aug 2018 16:06:24 +0100 Subject: [PATCH] Only do early channelExtract splatting for regular formatted textures --- renderdoc/replay/replay_controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renderdoc/replay/replay_controller.cpp b/renderdoc/replay/replay_controller.cpp index 424b19b62..d0403c8e1 100644 --- a/renderdoc/replay/replay_controller.cpp +++ b/renderdoc/replay/replay_controller.cpp @@ -1049,8 +1049,8 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path // if we want a grayscale image of one channel, splat it across all channels // and set alpha to full - if(sd.channelExtract >= 0 && td.format.compByteWidth == 1 && - (uint32_t)sd.channelExtract < td.format.compCount) + if(sd.channelExtract >= 0 && td.format.type == ResourceFormatType::Regular && + td.format.compByteWidth == 1 && (uint32_t)sd.channelExtract < td.format.compCount) { uint32_t cc = td.format.compCount;