From f76ef57b43f6f108219c989f0080f4cdff5117ff Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 11 Dec 2017 21:16:28 +0000 Subject: [PATCH] Add R10G10B10_XR_BIAS exception to DXGI format unit tests --- renderdoc/driver/dxgi/dxgi_common.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/renderdoc/driver/dxgi/dxgi_common.cpp b/renderdoc/driver/dxgi/dxgi_common.cpp index 1c001a9f2..b4ee5df6c 100644 --- a/renderdoc/driver/dxgi/dxgi_common.cpp +++ b/renderdoc/driver/dxgi/dxgi_common.cpp @@ -2142,6 +2142,20 @@ TEST_CASE("DXGI formats", "[format][d3d]") CHECK(convfmt.srgbCorrected); } + if(f == DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM) + { + // this format has special handling, so we skip it from the below Typeless/Typed check + + CompType typeHint = fmt.compType; + + DXGI_FORMAT typeless = GetTypelessFormat(f); + DXGI_FORMAT typed = GetTypedFormat(typeless, typeHint); + + CHECK(typed == DXGI_FORMAT_R10G10B10A2_UNORM); + + continue; + } + if(!IsTypelessFormat(f)) { CompType typeHint = fmt.compType;