Vulkan: Remove stencil masks from dynamic state

In NXT the stencil read and write masks are part of the pipeline state
so they should be set by the pipeline and not dynamically.
This commit is contained in:
Corentin Wallez 2018-02-05 15:37:02 -05:00 committed by Corentin Wallez
parent 5000ee68d2
commit 8b7564fb54
2 changed files with 1 additions and 5 deletions

View File

@ -165,8 +165,6 @@ namespace backend { namespace vulkan {
device->fn.CmdSetLineWidth(commands, 1.0f); device->fn.CmdSetLineWidth(commands, 1.0f);
device->fn.CmdSetDepthBounds(commands, 0.0f, 1.0f); device->fn.CmdSetDepthBounds(commands, 0.0f, 1.0f);
device->fn.CmdSetStencilCompareMask(commands, VK_STENCIL_FRONT_AND_BACK, 0);
device->fn.CmdSetStencilWriteMask(commands, VK_STENCIL_FRONT_AND_BACK, 0);
device->fn.CmdSetStencilReference(commands, VK_STENCIL_FRONT_AND_BACK, 0); device->fn.CmdSetStencilReference(commands, VK_STENCIL_FRONT_AND_BACK, 0);
// The viewport and scissor default to cover all of the attachments // The viewport and scissor default to cover all of the attachments

View File

@ -180,7 +180,7 @@ namespace backend { namespace vulkan {
colorBlend.blendConstants[2] = 0.0f; colorBlend.blendConstants[2] = 0.0f;
colorBlend.blendConstants[3] = 0.0f; colorBlend.blendConstants[3] = 0.0f;
// Tag all state as dynamic. // Tag all state as dynamic but stencil masks.
VkDynamicState dynamicStates[] = { VkDynamicState dynamicStates[] = {
VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_VIEWPORT,
VK_DYNAMIC_STATE_SCISSOR, VK_DYNAMIC_STATE_SCISSOR,
@ -188,8 +188,6 @@ namespace backend { namespace vulkan {
VK_DYNAMIC_STATE_DEPTH_BIAS, VK_DYNAMIC_STATE_DEPTH_BIAS,
VK_DYNAMIC_STATE_BLEND_CONSTANTS, VK_DYNAMIC_STATE_BLEND_CONSTANTS,
VK_DYNAMIC_STATE_DEPTH_BOUNDS, VK_DYNAMIC_STATE_DEPTH_BOUNDS,
VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK,
VK_DYNAMIC_STATE_STENCIL_WRITE_MASK,
VK_DYNAMIC_STATE_STENCIL_REFERENCE, VK_DYNAMIC_STATE_STENCIL_REFERENCE,
}; };
VkPipelineDynamicStateCreateInfo dynamic; VkPipelineDynamicStateCreateInfo dynamic;