aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorziga-lunarg <ziga@lunarg.com>2023-04-26 17:29:05 +0200
committerPiotr Byszewski <piotr.byszewski@mobica.com>2023-05-11 17:53:42 +0000
commita403cd820e784aacc475d365904e705701884d93 (patch)
treea01f7702e5bf9f3b5005b6104cbd3ae9f6a19a50
parent4c7e4e98f9e577ecd5bf2d922cd756aadc02701a (diff)
downloaddeqp-a403cd820e784aacc475d365904e705701884d93.tar.gz
Fix rasterization tests with discardEnable
If a pipeline is being created without fragment shader state then pStages must not have stage set to VK_SHADER_STAGE_FRAGMENT_BIT Components: Vulkan VK-GL-CTS issue: 4428 Affected tests: dEQP-VK.rasterization.* Change-Id: Iabe56765d9ccfc4678022ccbc799894096f17acc
-rw-r--r--external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp b/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp
index b2a30885c..43afa424a 100644
--- a/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp
+++ b/external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp
@@ -773,7 +773,8 @@ void BaseRenderingTestInstance::drawPrimitives (tcu::Surface& result, const std:
DE_NULL, // const VkShaderModule tessellationControlShaderModule
DE_NULL, // const VkShaderModule tessellationEvalShaderModule
DE_NULL, // const VkShaderModule geometryShaderModule
- *m_fragmentShaderModule, // const VkShaderModule fragmentShaderModule
+ rasterizationStateInfo.rasterizerDiscardEnable ? DE_NULL : *m_fragmentShaderModule,
+ // const VkShaderModule fragmentShaderModule
*m_renderPass, // const VkRenderPass renderPass
viewports, // const std::vector<VkViewport>& viewports
scissors, // const std::vector<VkRect2D>& scissors
@@ -5645,6 +5646,8 @@ void DiscardTestInstance::drawPrimitivesDiscard (tcu::Surface& result, const std
VK_FALSE // VkBool32 alphaToOneEnable;
};
+ const VkPipelineRasterizationStateCreateInfo* rasterizationStateInfo = getRasterizationStateCreateInfo();
+
graphicsPipeline = makeGraphicsPipeline(vkd, // const DeviceInterface& vk
vkDevice, // const VkDevice device
*m_pipelineLayout, // const VkPipelineLayout pipelineLayout
@@ -5652,7 +5655,8 @@ void DiscardTestInstance::drawPrimitivesDiscard (tcu::Surface& result, const std
DE_NULL, // const VkShaderModule tessellationControlShaderModule
DE_NULL, // const VkShaderModule tessellationEvalShaderModule
DE_NULL, // const VkShaderModule geometryShaderModule
- *m_fragmentShaderModule, // const VkShaderModule fragmentShaderModule
+ rasterizationStateInfo->rasterizerDiscardEnable ? DE_NULL : *m_fragmentShaderModule,
+ // const VkShaderModule fragmentShaderModule
*m_renderPass, // const VkRenderPass renderPass
viewports, // const std::vector<VkViewport>& viewports
scissors, // const std::vector<VkRect2D>& scissors
@@ -5660,7 +5664,7 @@ void DiscardTestInstance::drawPrimitivesDiscard (tcu::Surface& result, const std
0u, // const deUint32 subpass
0u, // const deUint32 patchControlPoints
&vertexInputStateParams, // const VkPipelineVertexInputStateCreateInfo* vertexInputStateCreateInfo
- getRasterizationStateCreateInfo(), // const VkPipelineRasterizationStateCreateInfo* rasterizationStateCreateInfo
+ rasterizationStateInfo, // const VkPipelineRasterizationStateCreateInfo* rasterizationStateCreateInfo
&multisampleStateParams, // const VkPipelineMultisampleStateCreateInfo* multisampleStateCreateInfo
DE_NULL, // const VkPipelineDepthStencilStateCreateInfo* depthStencilStateCreateInfo,
getColorBlendStateCreateInfo()); // const VkPipelineColorBlendStateCreateInfo* colorBlendStateCreateInfo