mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Make things less Fatal if GetByteSize() is called with unknown format
This commit is contained in:
@@ -500,8 +500,12 @@ UINT GetByteSize(int Width, int Height, int Depth, DXGI_FORMAT Format, int mip)
|
||||
case DXGI_FORMAT_B4G4R4A4_UNORM:
|
||||
ret *= 2; // 4 channels, half a byte each
|
||||
break;
|
||||
case DXGI_FORMAT_UNKNOWN:
|
||||
RDCERR("Getting byte size of unknown DXGI format");
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
RDCFATAL("Unrecognised DXGI Format: %d", Format);
|
||||
RDCERR("Unrecognised DXGI Format: %d", Format);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user