1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxvk] Introduce new pipeline state to enable depth bounds test

This commit is contained in:
Philip Rebohle 2019-04-24 22:32:54 +02:00
parent bacb1f7c60
commit 5ad212d279
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 9 additions and 1 deletions

View File

@ -163,7 +163,7 @@ namespace dxvk {
DxvkRenderPassFormat passFormat = renderPass.format();
// Set up dynamic states as needed
std::array<VkDynamicState, 5> dynamicStates;
std::array<VkDynamicState, 6> dynamicStates;
uint32_t dynamicStateCount = 0;
dynamicStates[dynamicStateCount++] = VK_DYNAMIC_STATE_VIEWPORT;
@ -172,6 +172,9 @@ namespace dxvk {
if (state.useDynamicDepthBias())
dynamicStates[dynamicStateCount++] = VK_DYNAMIC_STATE_DEPTH_BIAS;
if (state.useDynamicDepthBounds())
dynamicStates[dynamicStateCount++] = VK_DYNAMIC_STATE_DEPTH_BOUNDS;
if (state.useDynamicBlendConstants())
dynamicStates[dynamicStateCount++] = VK_DYNAMIC_STATE_BLEND_CONSTANTS;

View File

@ -55,6 +55,10 @@ namespace dxvk {
return rsDepthBiasEnable;
}
bool useDynamicDepthBounds() const {
return dsEnableDepthBoundsTest;
}
bool useDynamicBlendConstants() const {
bool result = false;
@ -97,6 +101,7 @@ namespace dxvk {
VkBool32 dsEnableDepthTest;
VkBool32 dsEnableDepthWrite;
VkBool32 dsEnableDepthBoundsTest;
VkBool32 dsEnableStencilTest;
VkCompareOp dsDepthCompareOp;
VkStencilOpState dsStencilOpFront;