mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
When saving typeless textures to DDS, use typeCast to inform type used
This commit is contained in:
@@ -1282,10 +1282,15 @@ bool ReplayController::SaveTexture(const TextureSave &saveData, const char *path
|
||||
{
|
||||
dds_data ddsData;
|
||||
|
||||
ResourceFormat saveFmt = td.format;
|
||||
// use typeCast to inform typeless saving, otherwise it will get lost
|
||||
if(saveFmt.compType == CompType::Typeless)
|
||||
saveFmt.compType = sd.typeHint;
|
||||
|
||||
ddsData.width = td.width;
|
||||
ddsData.height = td.height;
|
||||
ddsData.depth = td.depth;
|
||||
ddsData.format = td.format;
|
||||
ddsData.format = saveFmt;
|
||||
ddsData.mips = numMips;
|
||||
ddsData.slices = numSlices / td.depth;
|
||||
ddsData.subdata = &subdata[0];
|
||||
|
||||
Reference in New Issue
Block a user