Check for D3D12 hardware feature support even if interface is available

This commit is contained in:
baldurk
2018-08-14 19:42:37 +01:00
parent d6706a9c48
commit b90efe114a
8 changed files with 51 additions and 14 deletions
+5 -3
View File
@@ -73,7 +73,7 @@ ResourceId D3D12RenderState::GetDSVID() const
return dsv.GetResResourceId();
}
void D3D12RenderState::ApplyState(ID3D12GraphicsCommandList2 *cmd) const
void D3D12RenderState::ApplyState(WrappedID3D12Device *dev, ID3D12GraphicsCommandList2 *cmd) const
{
D3D12_COMMAND_LIST_TYPE type = cmd->GetType();
@@ -96,10 +96,12 @@ void D3D12RenderState::ApplyState(ID3D12GraphicsCommandList2 *cmd) const
if(GetWrapped(cmd)->GetReal1())
{
cmd->OMSetDepthBounds(depthBoundsMin, depthBoundsMax);
if(dev->GetOpts2().DepthBoundsTestSupported)
cmd->OMSetDepthBounds(depthBoundsMin, depthBoundsMax);
// safe to set this - if the pipeline has view instancing disabled, it will do nothing
cmd->SetViewInstanceMask(viewInstMask);
if(dev->GetOpts3().ViewInstancingTier != D3D12_VIEW_INSTANCING_TIER_NOT_SUPPORTED)
cmd->SetViewInstanceMask(viewInstMask);
}
if(ibuffer.buf != ResourceId())