From f39b3e727ec14cfcfe51ce817792522320fff6a7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Sun, 10 Jul 2016 16:12:46 +0300 Subject: [PATCH] Set viewport and scissor rects properly when rendering --- renderdoc/driver/d3d12/d3d12_debug.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderdoc/driver/d3d12/d3d12_debug.cpp b/renderdoc/driver/d3d12/d3d12_debug.cpp index 8a5415fce..3b10a0dd4 100644 --- a/renderdoc/driver/d3d12/d3d12_debug.cpp +++ b/renderdoc/driver/d3d12/d3d12_debug.cpp @@ -1039,6 +1039,12 @@ bool D3D12DebugManager::RenderTexture(TextureDisplay cfg, bool blendAlpha) list->OMSetRenderTargets(1, &outw.rtv, TRUE, NULL); + D3D12_VIEWPORT viewport = {0, 0, (float)outw.width, (float)outw.height, 0.0f, 1.0f}; + list->RSSetViewports(1, &viewport); + + D3D12_RECT scissor = {0, 0, outw.width, outw.height}; + list->RSSetScissorRects(1, &scissor); + list->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); if(cfg.rawoutput || !blendAlpha || cfg.CustomShader != ResourceId())