Only do early channelExtract splatting for regular formatted textures

This commit is contained in:
baldurk
2018-08-01 16:06:24 +01:00
parent d93ad942f2
commit 92d414780f
+2 -2
View File
@@ -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;