From 8682ec207eca12fc4a6787f06bb3397ee4a9bfe5 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 4 May 2022 10:23:42 +1000 Subject: [PATCH] [host] dxgi: check for invalid usage of d3d12 & downsampling --- host/platform/Windows/capture/DXGI/src/d3d12.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/host/platform/Windows/capture/DXGI/src/d3d12.c b/host/platform/Windows/capture/DXGI/src/d3d12.c index 83adcb0e..54d5ffcd 100644 --- a/host/platform/Windows/capture/DXGI/src/d3d12.c +++ b/host/platform/Windows/capture/DXGI/src/d3d12.c @@ -91,6 +91,14 @@ static bool d3d12_create(struct DXGIInterface * intf) if (!d3d12) return false; + if (dxgi->downsampleLevel > 0) + { + DEBUG_WARN("The D3D12 backend does not support downsampling yet"); + dxgi->downsampleLevel = 0; + dxgi->targetWidth = dxgi->width; + dxgi->targetHeight = dxgi->height; + } + if (dxgi->debug) { D3D12GetDebugInterface_t D3D12GetDebugInterface = (D3D12GetDebugInterface_t)