Rename DepthTestEnable to DepthEnable in Graphics PSO to match actual logic
This commit is contained in:
@@ -48,7 +48,7 @@ bool GPUPipelineStateDX11::Init(const Description& desc)
|
||||
PrimitiveTopology = (D3D11_PRIMITIVE_TOPOLOGY)((int32)D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST + (HS->GetControlPointsCount() - 1));
|
||||
|
||||
// States
|
||||
DepthStencilStateIndex = static_cast<int32>(desc.DepthFunc) + (desc.DepthTestEnable ? 0 : 9) + (desc.DepthWriteEnable ? 0 : 18);
|
||||
DepthStencilStateIndex = static_cast<int32>(desc.DepthFunc) + (desc.DepthEnable ? 0 : 9) + (desc.DepthWriteEnable ? 0 : 18);
|
||||
RasterizerStateIndex = static_cast<int32>(desc.CullMode) + (desc.Wireframe ? 0 : 3) + (desc.DepthClipEnable ? 0 : 6);
|
||||
BlendState = _device->GetBlendState(desc.BlendMode);
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ bool GPUPipelineStateDX12::Init(const Description& desc)
|
||||
}
|
||||
|
||||
// Depth State
|
||||
psDesc.DepthStencilState.DepthEnable = !!desc.DepthTestEnable;
|
||||
psDesc.DepthStencilState.DepthEnable = !!desc.DepthEnable;
|
||||
psDesc.DepthStencilState.DepthWriteMask = desc.DepthWriteEnable ? D3D12_DEPTH_WRITE_MASK_ALL : D3D12_DEPTH_WRITE_MASK_ZERO;
|
||||
psDesc.DepthStencilState.DepthFunc = static_cast<D3D12_COMPARISON_FUNC>(desc.DepthFunc);
|
||||
psDesc.DepthStencilState.StencilEnable = FALSE;
|
||||
|
||||
@@ -286,7 +286,7 @@ bool GPUPipelineStateVulkan::Init(const Description& desc)
|
||||
|
||||
// Depth Stencil
|
||||
RenderToolsVulkan::ZeroStruct(_descDepthStencil, VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO);
|
||||
_descDepthStencil.depthTestEnable = desc.DepthTestEnable;
|
||||
_descDepthStencil.depthTestEnable = desc.DepthEnable;
|
||||
_descDepthStencil.depthWriteEnable = desc.DepthWriteEnable;
|
||||
_descDepthStencil.depthCompareOp = RenderToolsVulkan::ToVulkanCompareOp(desc.DepthFunc);
|
||||
_desc.pDepthStencilState = &_descDepthStencil;
|
||||
|
||||
Reference in New Issue
Block a user