Skip to content

Commit

Permalink
Limit impact of possible NV driver bug
Browse files Browse the repository at this point in the history
* This seems to crash if no pipeline is bound when SetViewInstanceMask() is
  called. We can't make this completely conditional and still be legal, but at
  least we can avoid triggering it if view instancing isn't being used anyway.
  • Loading branch information
baldurk committed Jan 25, 2024
1 parent aeaa281 commit 775031c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion renderdoc/driver/d3d12/d3d12_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsComman
}

// safe to set this - if the pipeline has view instancing disabled, it will do nothing
if(dev->GetOpts3().ViewInstancingTier != D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED)
if(dev->GetOpts3().ViewInstancingTier != D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED &&
viewInstMask != 0)
cmd->SetViewInstanceMask(viewInstMask);
}

Expand Down

0 comments on commit 775031c

Please sign in to comment.