mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-11 22:29:15 +01:00
[dxvk] Removed support for depth bounds test
This feature is not used in D3D11, so we don't need backend support.
This commit is contained in:
parent
8b4852be16
commit
e8ac81fe8a
@ -9,13 +9,10 @@ namespace dxvk {
|
|||||||
: m_device(device), m_desc(desc) {
|
: m_device(device), m_desc(desc) {
|
||||||
m_state.enableDepthTest = desc.DepthEnable;
|
m_state.enableDepthTest = desc.DepthEnable;
|
||||||
m_state.enableDepthWrite = desc.DepthWriteMask == D3D11_DEPTH_WRITE_MASK_ALL;
|
m_state.enableDepthWrite = desc.DepthWriteMask == D3D11_DEPTH_WRITE_MASK_ALL;
|
||||||
m_state.enableDepthBounds = false;
|
|
||||||
m_state.enableStencilTest = desc.StencilEnable;
|
m_state.enableStencilTest = desc.StencilEnable;
|
||||||
m_state.depthCompareOp = DecodeCompareOp(desc.DepthFunc);
|
m_state.depthCompareOp = DecodeCompareOp(desc.DepthFunc);
|
||||||
m_state.stencilOpFront = DecodeStencilOpState(desc.FrontFace, desc);
|
m_state.stencilOpFront = DecodeStencilOpState(desc.FrontFace, desc);
|
||||||
m_state.stencilOpBack = DecodeStencilOpState(desc.BackFace, desc);
|
m_state.stencilOpBack = DecodeStencilOpState(desc.BackFace, desc);
|
||||||
m_state.depthBoundsMin = 0.0f;
|
|
||||||
m_state.depthBoundsMax = 1.0f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,13 +81,10 @@ namespace dxvk {
|
|||||||
DxvkDepthStencilState dsState;
|
DxvkDepthStencilState dsState;
|
||||||
dsState.enableDepthTest = VK_FALSE;
|
dsState.enableDepthTest = VK_FALSE;
|
||||||
dsState.enableDepthWrite = VK_FALSE;
|
dsState.enableDepthWrite = VK_FALSE;
|
||||||
dsState.enableDepthBounds = VK_FALSE;
|
|
||||||
dsState.enableStencilTest = VK_FALSE;
|
dsState.enableStencilTest = VK_FALSE;
|
||||||
dsState.depthCompareOp = VK_COMPARE_OP_ALWAYS;
|
dsState.depthCompareOp = VK_COMPARE_OP_ALWAYS;
|
||||||
dsState.stencilOpFront = stencilOp;
|
dsState.stencilOpFront = stencilOp;
|
||||||
dsState.stencilOpBack = stencilOp;
|
dsState.stencilOpBack = stencilOp;
|
||||||
dsState.depthBoundsMin = 0.0f;
|
|
||||||
dsState.depthBoundsMax = 1.0f;
|
|
||||||
m_context->setDepthStencilState(dsState);
|
m_context->setDepthStencilState(dsState);
|
||||||
|
|
||||||
DxvkLogicOpState loState;
|
DxvkLogicOpState loState;
|
||||||
|
@ -74,13 +74,10 @@ namespace dxvk {
|
|||||||
struct DxvkDepthStencilState {
|
struct DxvkDepthStencilState {
|
||||||
VkBool32 enableDepthTest;
|
VkBool32 enableDepthTest;
|
||||||
VkBool32 enableDepthWrite;
|
VkBool32 enableDepthWrite;
|
||||||
VkBool32 enableDepthBounds;
|
|
||||||
VkBool32 enableStencilTest;
|
VkBool32 enableStencilTest;
|
||||||
VkCompareOp depthCompareOp;
|
VkCompareOp depthCompareOp;
|
||||||
VkStencilOpState stencilOpFront;
|
VkStencilOpState stencilOpFront;
|
||||||
VkStencilOpState stencilOpBack;
|
VkStencilOpState stencilOpBack;
|
||||||
float depthBoundsMin;
|
|
||||||
float depthBoundsMax;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1473,13 +1473,10 @@ namespace dxvk {
|
|||||||
void DxvkContext::setDepthStencilState(const DxvkDepthStencilState& ds) {
|
void DxvkContext::setDepthStencilState(const DxvkDepthStencilState& ds) {
|
||||||
m_state.gp.state.dsEnableDepthTest = ds.enableDepthTest;
|
m_state.gp.state.dsEnableDepthTest = ds.enableDepthTest;
|
||||||
m_state.gp.state.dsEnableDepthWrite = ds.enableDepthWrite;
|
m_state.gp.state.dsEnableDepthWrite = ds.enableDepthWrite;
|
||||||
m_state.gp.state.dsEnableDepthBounds = ds.enableDepthBounds;
|
|
||||||
m_state.gp.state.dsEnableStencilTest = ds.enableStencilTest;
|
m_state.gp.state.dsEnableStencilTest = ds.enableStencilTest;
|
||||||
m_state.gp.state.dsDepthCompareOp = ds.depthCompareOp;
|
m_state.gp.state.dsDepthCompareOp = ds.depthCompareOp;
|
||||||
m_state.gp.state.dsStencilOpFront = ds.stencilOpFront;
|
m_state.gp.state.dsStencilOpFront = ds.stencilOpFront;
|
||||||
m_state.gp.state.dsStencilOpBack = ds.stencilOpBack;
|
m_state.gp.state.dsStencilOpBack = ds.stencilOpBack;
|
||||||
m_state.gp.state.dsDepthBoundsMin = ds.depthBoundsMin;
|
|
||||||
m_state.gp.state.dsDepthBoundsMax = ds.depthBoundsMax;
|
|
||||||
|
|
||||||
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
m_flags.set(DxvkContextFlag::GpDirtyPipelineState);
|
||||||
}
|
}
|
||||||
|
@ -314,12 +314,12 @@ namespace dxvk {
|
|||||||
dsInfo.depthTestEnable = state.dsEnableDepthTest;
|
dsInfo.depthTestEnable = state.dsEnableDepthTest;
|
||||||
dsInfo.depthWriteEnable = state.dsEnableDepthWrite;
|
dsInfo.depthWriteEnable = state.dsEnableDepthWrite;
|
||||||
dsInfo.depthCompareOp = state.dsDepthCompareOp;
|
dsInfo.depthCompareOp = state.dsDepthCompareOp;
|
||||||
dsInfo.depthBoundsTestEnable = state.dsEnableDepthBounds;
|
dsInfo.depthBoundsTestEnable = VK_FALSE;
|
||||||
dsInfo.stencilTestEnable = state.dsEnableStencilTest;
|
dsInfo.stencilTestEnable = state.dsEnableStencilTest;
|
||||||
dsInfo.front = state.dsStencilOpFront;
|
dsInfo.front = state.dsStencilOpFront;
|
||||||
dsInfo.back = state.dsStencilOpBack;
|
dsInfo.back = state.dsStencilOpBack;
|
||||||
dsInfo.minDepthBounds = state.dsDepthBoundsMin;
|
dsInfo.minDepthBounds = 0.0f;
|
||||||
dsInfo.maxDepthBounds = state.dsDepthBoundsMax;
|
dsInfo.maxDepthBounds = 1.0f;
|
||||||
|
|
||||||
VkPipelineColorBlendStateCreateInfo cbInfo;
|
VkPipelineColorBlendStateCreateInfo cbInfo;
|
||||||
cbInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
|
cbInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
|
||||||
|
@ -62,13 +62,10 @@ namespace dxvk {
|
|||||||
|
|
||||||
VkBool32 dsEnableDepthTest;
|
VkBool32 dsEnableDepthTest;
|
||||||
VkBool32 dsEnableDepthWrite;
|
VkBool32 dsEnableDepthWrite;
|
||||||
VkBool32 dsEnableDepthBounds;
|
|
||||||
VkBool32 dsEnableStencilTest;
|
VkBool32 dsEnableStencilTest;
|
||||||
VkCompareOp dsDepthCompareOp;
|
VkCompareOp dsDepthCompareOp;
|
||||||
VkStencilOpState dsStencilOpFront;
|
VkStencilOpState dsStencilOpFront;
|
||||||
VkStencilOpState dsStencilOpBack;
|
VkStencilOpState dsStencilOpBack;
|
||||||
float dsDepthBoundsMin;
|
|
||||||
float dsDepthBoundsMax;
|
|
||||||
|
|
||||||
VkBool32 omEnableLogicOp;
|
VkBool32 omEnableLogicOp;
|
||||||
VkLogicOp omLogicOp;
|
VkLogicOp omLogicOp;
|
||||||
|
@ -206,13 +206,10 @@ namespace dxvk::hud {
|
|||||||
DxvkDepthStencilState dsState;
|
DxvkDepthStencilState dsState;
|
||||||
dsState.enableDepthTest = VK_FALSE;
|
dsState.enableDepthTest = VK_FALSE;
|
||||||
dsState.enableDepthWrite = VK_FALSE;
|
dsState.enableDepthWrite = VK_FALSE;
|
||||||
dsState.enableDepthBounds = VK_FALSE;
|
|
||||||
dsState.enableStencilTest = VK_FALSE;
|
dsState.enableStencilTest = VK_FALSE;
|
||||||
dsState.depthCompareOp = VK_COMPARE_OP_NEVER;
|
dsState.depthCompareOp = VK_COMPARE_OP_NEVER;
|
||||||
dsState.stencilOpFront = stencilOp;
|
dsState.stencilOpFront = stencilOp;
|
||||||
dsState.stencilOpBack = stencilOp;
|
dsState.stencilOpBack = stencilOp;
|
||||||
dsState.depthBoundsMin = 0.0f;
|
|
||||||
dsState.depthBoundsMax = 1.0f;
|
|
||||||
m_context->setDepthStencilState(dsState);
|
m_context->setDepthStencilState(dsState);
|
||||||
|
|
||||||
DxvkLogicOpState loState;
|
DxvkLogicOpState loState;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user