Always set pipeline state on D3D12 on all types of command buffer

* Notably this meant the pipeline state wasn't bound on compute-only command
  buffers
This commit is contained in:
baldurk
2021-10-19 17:05:30 +01:00
parent ee8c685880
commit 92e3c21baf
+3 -3
View File
@@ -50,11 +50,11 @@ void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsComman
{
D3D12_COMMAND_LIST_TYPE type = cmd->GetType();
if(pipe != ResourceId())
cmd->SetPipelineState(GetResourceManager()->GetCurrentAs<ID3D12PipelineState>(pipe));
if(type == D3D12_COMMAND_LIST_TYPE_DIRECT || type == D3D12_COMMAND_LIST_TYPE_BUNDLE)
{
if(pipe != ResourceId())
cmd->SetPipelineState(GetResourceManager()->GetCurrentAs<ID3D12PipelineState>(pipe));
if(!views.empty())
cmd->RSSetViewports((UINT)views.size(), &views[0]);