[D3D12] Debug option to display tessellation as wireframe

This commit is contained in:
Triang3l 2018-12-28 14:37:39 +03:00
parent 43866092a5
commit cbfc00f80e
1 changed files with 7 additions and 0 deletions

View File

@ -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;