From cbfc00f80ec001454db3034dfa30c2a2d0b2f1ca Mon Sep 17 00:00:00 2001 From: Triang3l Date: Fri, 28 Dec 2018 14:37:39 +0300 Subject: [PATCH] [D3D12] Debug option to display tessellation as wireframe --- src/xenia/gpu/d3d12/pipeline_cache.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/xenia/gpu/d3d12/pipeline_cache.cc b/src/xenia/gpu/d3d12/pipeline_cache.cc index 4ee1f1461..ff4990248 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.cc +++ b/src/xenia/gpu/d3d12/pipeline_cache.cc @@ -26,6 +26,8 @@ DEFINE_bool(d3d12_dxbc_disasm, false, "Disassemble DXBC shaders after generation."); +DEFINE_bool(d3d12_tessellation_wireframe, false, + "Display tessellated surfaces as wireframe for debugging."); namespace xe { namespace gpu { @@ -694,6 +696,11 @@ PipelineCache::UpdateStatus PipelineCache::UpdateRasterizerState( // Fill mode is disabled. fill_mode_wireframe = false; } + if (FLAGS_d3d12_tessellation_wireframe && + (primitive_type == PrimitiveType::kTrianglePatch || + primitive_type == PrimitiveType::kQuadPatch)) { + fill_mode_wireframe = true; + } dirty |= regs.fill_mode_wireframe != fill_mode_wireframe; regs.fill_mode_wireframe = fill_mode_wireframe; dirty |= regs.poly_offset != poly_offset;