mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Don't try to render triangle size for line or point draws
This commit is contained in:
@@ -909,14 +909,15 @@ ResourceId D3D12Replay::RenderOverlay(ResourceId texid, CompType typeCast, Float
|
||||
{
|
||||
D3D_PRIMITIVE_TOPOLOGY topo = MakeD3DPrimitiveTopology(fmt.topology);
|
||||
|
||||
// can't show triangle size for points or lines
|
||||
if(topo == D3D_PRIMITIVE_TOPOLOGY_POINTLIST ||
|
||||
topo >= D3D_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST)
|
||||
pipeDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_POINT;
|
||||
continue;
|
||||
else if(topo == D3D_PRIMITIVE_TOPOLOGY_LINESTRIP ||
|
||||
topo == D3D_PRIMITIVE_TOPOLOGY_LINELIST ||
|
||||
topo == D3D_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ ||
|
||||
topo == D3D_PRIMITIVE_TOPOLOGY_LINELIST_ADJ)
|
||||
pipeDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_LINE;
|
||||
continue;
|
||||
else
|
||||
pipeDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
|
||||
|
||||
|
||||
@@ -937,6 +937,12 @@ D3D12PSOCreator &D3D12PSOCreator::InputLayout()
|
||||
return InputLayout(m_Test->DefaultInputLayout());
|
||||
}
|
||||
|
||||
D3D12PSOCreator &D3D12PSOCreator::Topology(D3D12_PRIMITIVE_TOPOLOGY_TYPE topo)
|
||||
{
|
||||
GraphicsDesc.PrimitiveTopologyType = topo;
|
||||
return *this;
|
||||
}
|
||||
|
||||
D3D12PSOCreator &D3D12PSOCreator::RootSig(ID3D12RootSignaturePtr rootSig)
|
||||
{
|
||||
GraphicsDesc.pRootSignature = rootSig;
|
||||
|
||||
@@ -83,6 +83,8 @@ public:
|
||||
D3D12PSOCreator &InputLayout(const std::vector<D3D12_INPUT_ELEMENT_DESC> &elements);
|
||||
D3D12PSOCreator &InputLayout();
|
||||
|
||||
D3D12PSOCreator &Topology(D3D12_PRIMITIVE_TOPOLOGY_TYPE topo);
|
||||
|
||||
D3D12PSOCreator &RootSig(ID3D12RootSignaturePtr rootSig);
|
||||
|
||||
D3D12PSOCreator &RTVs(const std::vector<DXGI_FORMAT> &fmts);
|
||||
|
||||
Reference in New Issue
Block a user