Fix regression in setting dynamic states in dEQP-VK.tessellation
authorSlawomir Cygan <slawomir.cygan@intel.com>
Thu, 23 Mar 2017 17:12:05 +0000 (18:12 +0100)
committerPyry Haulos <phaulos@google.com>
Mon, 3 Apr 2017 16:29:39 +0000 (12:29 -0400)
Do not set dynamic states in pipeline util, that are not set
later in command buffer in from test code.

This applies to to tests that do not have 'm_renderSize' set
in pipeline, because they disable rasterization. As these test
do no set any VP or Scissor in command buffer, they must not mark
these states as DYNAMIC.

Spec:
"
VK_DYNAMIC_STATE_VIEWPORT indicates that the pViewports state in
VkPipelineViewportStateCreateInfo will be ignored and must be set
dynamically with vkCmdSetViewport before any draw commands.

VK_DYNAMIC_STATE_SCISSOR indicates that the pScissors state in
VkPipelineViewportStateCreateInfo will be ignored and must be set
dynamically with vkCmdSetScissor before any draw commands.
"

After this fix the behavior falls into general spec language
not requiring static VP & Scissor when rasterization is disabled.

Components: Vulkan
VK-GL-CTS issue: 325

Affects test:
Some of dEQP-VK.tessellation.*

Change-Id: I69f4200a8f5ac29774e25a50046f07c5a1ba960d

external/vulkancts/modules/vulkan/tessellation/vktTessellationUtil.cpp

index 9f17879..0421c6b 100644 (file)
@@ -704,7 +704,7 @@ Move<VkPipeline> GraphicsPipelineBuilder::build (const DeviceInterface&     vk,
        };
 
        std::vector<VkDynamicState> dynamicStates;
-       if (!haveRenderSize)
+       if (!haveRenderSize && !isRasterizationDisabled)
        {
                dynamicStates.push_back(VK_DYNAMIC_STATE_VIEWPORT);
                dynamicStates.push_back(VK_DYNAMIC_STATE_SCISSOR);