[D3D12] Debug option to display tessellation as wireframe
This commit is contained in:
parent
43866092a5
commit
cbfc00f80e
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
DEFINE_bool(d3d12_dxbc_disasm, false,
|
DEFINE_bool(d3d12_dxbc_disasm, false,
|
||||||
"Disassemble DXBC shaders after generation.");
|
"Disassemble DXBC shaders after generation.");
|
||||||
|
DEFINE_bool(d3d12_tessellation_wireframe, false,
|
||||||
|
"Display tessellated surfaces as wireframe for debugging.");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace gpu {
|
namespace gpu {
|
||||||
|
@ -694,6 +696,11 @@ PipelineCache::UpdateStatus PipelineCache::UpdateRasterizerState(
|
||||||
// Fill mode is disabled.
|
// Fill mode is disabled.
|
||||||
fill_mode_wireframe = false;
|
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;
|
dirty |= regs.fill_mode_wireframe != fill_mode_wireframe;
|
||||||
regs.fill_mode_wireframe = fill_mode_wireframe;
|
regs.fill_mode_wireframe = fill_mode_wireframe;
|
||||||
dirty |= regs.poly_offset != poly_offset;
|
dirty |= regs.poly_offset != poly_offset;
|
||||||
|
|
Loading…
Reference in New Issue