Added PointSize in shader used for drawing points
authorDae Kim <dae.kim@imgtec.com>
Wed, 30 May 2018 12:55:30 +0000 (13:55 +0100)
committerDae Kim <dae.kim@imgtec.com>
Wed, 30 May 2018 12:55:30 +0000 (13:55 +0100)
A SPIR-V assembly shader with undefined PointSize was being used with
point list topology.

Affects:

dEQP-VK.subgroups.*

Components: Vulkan

VK-GL-CTS issue: 1197

Change-Id: I2d38d367d413e205e00b32cdd96b8ca3ecf6eda4

external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp

index 99033ec..62e7ba1 100644 (file)
@@ -800,6 +800,7 @@ void vkt::subgroups::addNoSubgroupShader (SourceCollections& programCollection)
                "  float pixelSize = 2.0f/1024.0f;\n"
                "   float pixelPosition = pixelSize/2.0f - 1.0f;\n"
                "  gl_Position = vec4(float(gl_VertexIndex) * pixelSize + pixelPosition, 0.0f, 0.0f, 1.0f);\n"
+               "  gl_PointSize = 1.0f;
                "}\n"
        */
                const std::string vertNoSubgroup =
@@ -838,6 +839,8 @@ void vkt::subgroups::addNoSubgroupShader (SourceCollections& programCollection)
                        "%26 = OpVariable %25 Input\n"
                        "%33 = OpConstant %6 0\n"
                        "%35 = OpTypePointer Output %16\n"
+                       "%37 = OpConstant %23 1\n"
+                       "%38 = OpTypePointer Output %6\n"
                        "%4 = OpFunction %2 None %3\n"
                        "%5 = OpLabel\n"
                        "%8 = OpVariable %7 Function\n"
@@ -856,6 +859,8 @@ void vkt::subgroups::addNoSubgroupShader (SourceCollections& programCollection)
                        "%34 = OpCompositeConstruct %16 %32 %33 %33 %14\n"
                        "%36 = OpAccessChain %35 %22 %24\n"
                        "OpStore %36 %34\n"
+                       "%39 = OpAccessChain %38 %22 %37\n"
+                       "OpStore %39 %14\n"
                        "OpReturn\n"
                        "OpFunctionEnd\n";
                programCollection.spirvAsmSources.add("vert_noSubgroup") << vertNoSubgroup;