mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Fix packed format (uintten/unormten) use in the buffer viewer
This commit is contained in:
@@ -918,6 +918,19 @@ ResourceFormat GetInterpretedResourceFormat(const ShaderConstant &elem)
|
||||
else
|
||||
format.compCount = elem.type.descriptor.rows;
|
||||
|
||||
// packed formats with fixed component counts multiply up the component count
|
||||
switch(format.type)
|
||||
{
|
||||
case ResourceFormatType::R10G10B10A2:
|
||||
case ResourceFormatType::R5G5B5A1:
|
||||
case ResourceFormatType::R4G4B4A4: format.compCount *= 4; break;
|
||||
case ResourceFormatType::R11G11B10:
|
||||
case ResourceFormatType::R9G9B9E5:
|
||||
case ResourceFormatType::R5G6B5: format.compCount *= 3; break;
|
||||
case ResourceFormatType::R4G4: format.compCount *= 2; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user