Added multisampeStateParams to graphics pipeline creation, fixes #47
authorDaniel Hegedus <dhegedus.uszeged@partner.samsung.com>
Thu, 17 Dec 2015 12:10:40 +0000 (13:10 +0100)
committerDaniel Hegedus <dhegedus.uszeged@partner.samsung.com>
Thu, 17 Dec 2015 12:10:40 +0000 (13:10 +0100)
external/vulkancts/modules/vulkan/api/vktApiBufferViewAccessTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp

index b70c150..9eb93b6 100644 (file)
@@ -537,6 +537,19 @@ BufferViewTestInstance::BufferViewTestInstance (Context& context, BufferViewCase
                        1.0f,                                                                                                                   // float                        lineWidth;
                };
 
+               const VkPipelineMultisampleStateCreateInfo              multisampleStateParams =
+               {
+                       VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,               // VkStructureType                                                      sType;
+                       DE_NULL,                                                                                                                // const void*                                                          pNext;
+                       0u,                                                                                                                             // VkPipelineMultisampleStateCreateFlags        flags;
+                       VK_SAMPLE_COUNT_1_BIT,                                                                                  // VkSampleCountFlagBits                                        rasterizationSamples;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     sampleShadingEnable;
+                       0.0f,                                                                                                                   // float                                                                        minSampleShading;
+                       DE_NULL,                                                                                                                // const VkSampleMask*                                          pSampleMask;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     alphaToCoverageEnable;
+                       VK_FALSE                                                                                                                // VkBool32                                                                     alphaToOneEnable;
+               };
+
                const VkPipelineColorBlendAttachmentState colorBlendAttachmentState =
                {
                        false,                                                                                                          // VkBool32                     blendEnable;
@@ -585,7 +598,7 @@ BufferViewTestInstance::BufferViewTestInstance (Context& context, BufferViewCase
                        DE_NULL,                                                                                        // const VkPipelineTessellationStateCreateInfo*         pTessellationState;
                        &viewportStateParams,                                                           // const VkPipelineViewportStateCreateInfo*                     pViewportState;
                        &rasterStateParams,                                                                     // const VkPipelineRasterStateCreateInfo*                       pRasterState;
-                       DE_NULL,                                                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
+                       &multisampleStateParams,                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
                        DE_NULL,                                                                                        // const VkPipelineDepthStencilStateCreateInfo*         pDepthStencilState;
                        &colorBlendStateParams,                                                         // const VkPipelineColorBlendStateCreateInfo*           pColorBlendState;
                        &dynamicStateParams,                                                            // const VkPipelineDynamicStateCreateInfo*                      pDynamicState;
index 2d7249e..7ff952f 100644 (file)
@@ -1064,6 +1064,19 @@ void FragmentOutExecutor::execute (const Context& ctx, int numValues, const void
                        1.0f                                                                                                                    // float                                                                                lineWidth;
                };
 
+               const VkPipelineMultisampleStateCreateInfo multisampleStateParams =
+               {
+                       VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,               // VkStructureType                                                      sType;
+                       DE_NULL,                                                                                                                // const void*                                                          pNext;
+                       0u,                                                                                                                             // VkPipelineMultisampleStateCreateFlags        flags;
+                       VK_SAMPLE_COUNT_1_BIT,                                                                                  // VkSampleCountFlagBits                                        rasterizationSamples;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     sampleShadingEnable;
+                       0.0f,                                                                                                                   // float                                                                        minSampleShading;
+                       DE_NULL,                                                                                                                // const VkSampleMask*                                          pSampleMask;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     alphaToCoverageEnable;
+                       VK_FALSE                                                                                                                // VkBool32                                                                     alphaToOneEnable;
+               };
+               
                const VkPipelineColorBlendStateCreateInfo colorBlendStateParams =
                {
                        VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,               // VkStructureType                                                              sType;
@@ -1097,7 +1110,7 @@ void FragmentOutExecutor::execute (const Context& ctx, int numValues, const void
                        DE_NULL,                                                                                        // const VkPipelineTessellationStateCreateInfo*         pTessellationState;
                        &viewportStateParams,                                                           // const VkPipelineViewportStateCreateInfo*                     pViewportState;
                        &rasterStateParams,                                                                     // const VkPipelineRasterStateCreateInfo*                       pRasterState;
-                       DE_NULL,                                                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
+                       &multisampleStateParams,                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
                        DE_NULL,                                                                                        // const VkPipelineDepthStencilStateCreateInfo*         pDepthStencilState;
                        &colorBlendStateParams,                                                         // const VkPipelineColorBlendStateCreateInfo*           pColorBlendState;
                        &dynamicStateInfo,                                                                      // const VkPipelineDynamicStateCreateInfo*                      pDynamicState;
@@ -2563,6 +2576,19 @@ void TessellationExecutor::renderTess (const Context& ctx, deUint32 vertexCount)
                        1.0f                                                                                                                    // float                                                                        lineWidth;
                };
 
+               const VkPipelineMultisampleStateCreateInfo multisampleStateParams =
+               {
+                       VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,               // VkStructureType                                                      sType;
+                       DE_NULL,                                                                                                                // const void*                                                          pNext;
+                       0u,                                                                                                                             // VkPipelineMultisampleStateCreateFlags        flags;
+                       VK_SAMPLE_COUNT_1_BIT,                                                                                  // VkSampleCountFlagBits                                        rasterizationSamples;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     sampleShadingEnable;
+                       0.0f,                                                                                                                   // float                                                                        minSampleShading;
+                       DE_NULL,                                                                                                                // const VkSampleMask*                                          pSampleMask;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     alphaToCoverageEnable;
+                       VK_FALSE                                                                                                                // VkBool32                                                                     alphaToOneEnable;
+               };
+
                const VkPipelineColorBlendAttachmentState colorBlendAttachmentState =
                {
                        VK_FALSE,                                               // VkBool32                                     blendEnable;
@@ -2611,7 +2637,7 @@ void TessellationExecutor::renderTess (const Context& ctx, deUint32 vertexCount)
                        &tessellationStateParams,                                                       // const VkPipelineTessellationStateCreateInfo*         pTessellationState;
                        &viewportStateParams,                                                           // const VkPipelineViewportStateCreateInfo*                     pViewportState;
                        &rasterStateParams,                                                                     // const VkPipelineRasterStateCreateInfo*                       pRasterState;
-                       DE_NULL,                                                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
+                       &multisampleStateParams,                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
                        DE_NULL,                                                                                        // const VkPipelineDepthStencilStateCreateInfo*         pDepthStencilState;
                        &colorBlendStateParams,                                                         // const VkPipelineColorBlendStateCreateInfo*           pColorBlendState;
                        &dynamicStateInfo,                                                                      // const VkPipelineDynamicStateCreateInfo*                      pDynamicState;
index 6e062fb..ccd0360 100644 (file)
@@ -1422,7 +1422,7 @@ void ShaderRenderCaseInstance::render (tcu::Surface& result, const QuadGrid& qua
                        false,                                                                                                                  // VkBool32                     rasterizerDiscardEnable;
                        VK_POLYGON_MODE_FILL,                                                                                   // VkFillMode           fillMode;
                        VK_CULL_MODE_NONE,                                                                                              // VkCullMode           cullMode;
-                       VK_FRONT_FACE_COUNTER_CLOCKWISE,                                                                        // VkFrontFace          frontFace;
+                       VK_FRONT_FACE_COUNTER_CLOCKWISE,                                                                // VkFrontFace          frontFace;
                        false,                                                                                                                  // VkBool32                     depthBiasEnable;
                        0.0f,                                                                                                                   // float                        depthBias;
                        0.0f,                                                                                                                   // float                        depthBiasClamp;
@@ -1430,6 +1430,19 @@ void ShaderRenderCaseInstance::render (tcu::Surface& result, const QuadGrid& qua
                        1.0f,                                                                                                                   // float                        lineWidth;
                };
 
+               const VkPipelineMultisampleStateCreateInfo              multisampleStateParams =
+               {
+                       VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO,               // VkStructureType                                                      sType;
+                       DE_NULL,                                                                                                                // const void*                                                          pNext;
+                       0u,                                                                                                                             // VkPipelineMultisampleStateCreateFlags        flags;
+                       VK_SAMPLE_COUNT_1_BIT,                                                                                  // VkSampleCountFlagBits                                        rasterizationSamples;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     sampleShadingEnable;
+                       0.0f,                                                                                                                   // float                                                                        minSampleShading;
+                       DE_NULL,                                                                                                                // const VkSampleMask*                                          pSampleMask;
+                       VK_FALSE,                                                                                                               // VkBool32                                                                     alphaToCoverageEnable;
+                       VK_FALSE                                                                                                                // VkBool32                                                                     alphaToOneEnable;
+               };
+               
                const VkPipelineColorBlendAttachmentState               colorBlendAttachmentState       =
                {
                        false,                                                                                                                  // VkBool32                     blendEnable;
@@ -1478,7 +1491,7 @@ void ShaderRenderCaseInstance::render (tcu::Surface& result, const QuadGrid& qua
                        DE_NULL,                                                                                        // const VkPipelineTessellationStateCreateInfo*         pTessellationState;
                        &viewportStateParams,                                                           // const VkPipelineViewportStateCreateInfo*                     pViewportState;
                        &rasterStateParams,                                                                     // const VkPipelineRasterStateCreateInfo*                       pRasterState;
-                       DE_NULL,                                                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
+                       &multisampleStateParams,                                                        // const VkPipelineMultisampleStateCreateInfo*          pMultisampleState;
                        DE_NULL,                                                                                        // const VkPipelineDepthStencilStateCreateInfo*         pDepthStencilState;
                        &colorBlendStateParams,                                                         // const VkPipelineColorBlendStateCreateInfo*           pColorBlendState;
                        &dynamicStateInfo,                                                                      // const VkPipelineDynamicStateCreateInfo*                      pDynamicState;