mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12:00
d3d12: Add support for primitive restart.
This commit is contained in:
parent
fe902cbb13
commit
bc7e30517b
2 changed files with 6 additions and 0 deletions
|
@ -292,6 +292,9 @@ bool D3D12GSRender::LoadProgram()
|
||||||
prop.Blend.RenderTarget[i].RenderTargetWriteMask = mask;
|
prop.Blend.RenderTarget[i].RenderTargetWriteMask = mask;
|
||||||
|
|
||||||
prop.IASet = m_IASet;
|
prop.IASet = m_IASet;
|
||||||
|
if (!!rsx::method_registers[NV4097_SET_RESTART_INDEX_ENABLE])
|
||||||
|
prop.CutValue = ((rsx::method_registers[NV4097_SET_INDEX_ARRAY_DMA] >> 4) == CELL_GCM_DRAW_INDEX_ARRAY_TYPE_32) ?
|
||||||
|
D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFFFFFF : D3D12_INDEX_BUFFER_STRIP_CUT_VALUE_0xFFFF;
|
||||||
|
|
||||||
m_PSO = m_cachePSO.getGraphicPipelineState(&vertex_program, &fragment_program, prop, std::make_pair(m_device.Get(), m_rootSignatures));
|
m_PSO = m_cachePSO.getGraphicPipelineState(&vertex_program, &fragment_program, prop, std::make_pair(m_device.Get(), m_rootSignatures));
|
||||||
return m_PSO != nullptr;
|
return m_PSO != nullptr;
|
||||||
|
|
|
@ -16,6 +16,7 @@ struct D3D12PipelineProperties
|
||||||
unsigned numMRT : 3;
|
unsigned numMRT : 3;
|
||||||
D3D12_DEPTH_STENCIL_DESC DepthStencil;
|
D3D12_DEPTH_STENCIL_DESC DepthStencil;
|
||||||
D3D12_RASTERIZER_DESC Rasterization;
|
D3D12_RASTERIZER_DESC Rasterization;
|
||||||
|
D3D12_INDEX_BUFFER_STRIP_CUT_VALUE CutValue;
|
||||||
|
|
||||||
bool operator==(const D3D12PipelineProperties &in) const
|
bool operator==(const D3D12PipelineProperties &in) const
|
||||||
{
|
{
|
||||||
|
@ -219,6 +220,8 @@ struct D3D12Traits
|
||||||
graphicPipelineStateDesc.SampleMask = UINT_MAX;
|
graphicPipelineStateDesc.SampleMask = UINT_MAX;
|
||||||
graphicPipelineStateDesc.NodeMask = 1;
|
graphicPipelineStateDesc.NodeMask = 1;
|
||||||
|
|
||||||
|
graphicPipelineStateDesc.IBStripCutValue = pipelineProperties.CutValue;
|
||||||
|
|
||||||
extraData.first->CreateGraphicsPipelineState(&graphicPipelineStateDesc, IID_PPV_ARGS(&std::get<0>(*result)));
|
extraData.first->CreateGraphicsPipelineState(&graphicPipelineStateDesc, IID_PPV_ARGS(&std::get<0>(*result)));
|
||||||
std::get<1>(*result) = vertexProgramData.vertex_shader_inputs;
|
std::get<1>(*result) = vertexProgramData.vertex_shader_inputs;
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue