From: James Fitzpatrick Date: Thu, 14 May 2020 15:51:14 +0000 (+0100) Subject: Add missing writes to PointSize in subgroups tests X-Git-Tag: upstream/1.3.5~1253^2^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=75f9abc189d4bef82d9496f55284c382b3b7a43f;p=platform%2Fupstream%2FVK-GL-CTS.git Add missing writes to PointSize in subgroups tests When shaderTessellationAndGeometryPointSize is enabled the PointSize builtin is undefined unless it is written to in the last vertex processing phase so propagate the write through all vertex stages. Affects: dEQP-VK.subgroups.* Components: Vulkan VK-GL-CTS issue: 2404 Change-Id: Icc1bc30a46d8787f116f9f916c98aa8778226dd3 --- diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp index a705015..f6cd13a 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp @@ -240,7 +240,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string extHeader = getExtHeader(caseDef); std::string testSrc = getTestSrc(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, ""); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, ""); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp index bc518a6..dbc7b25 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp @@ -242,7 +242,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string testSrc = getTestSrc(caseDef); std::string helperStr = getHelperFunctionARB(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, helperStr); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, helperStr); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp index fa6b9d4..1274730 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotMasksTests.cpp @@ -218,6 +218,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color[gl_InvocationID ] = float(tempResult);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -237,6 +238,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -321,6 +323,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; const string tese = @@ -339,6 +342,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; const string geometry = @@ -357,6 +361,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdyStr + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp index 951b701..4fa0e3c 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp @@ -293,6 +293,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color[gl_InvocationID ] = float(tempResult);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -311,6 +312,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdyStr << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -392,6 +394,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; const string tese = @@ -409,6 +412,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; const string geometry = @@ -426,6 +430,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdyStr + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp index a148ceb..d983650 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp @@ -822,6 +822,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "" ) + "}\n"; const string tese = @@ -843,6 +844,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "" ) + "}\n"; const string geometry = @@ -864,6 +866,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + testSrc + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "" ) + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp index 10e3bf5..9661ec1 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp @@ -1280,6 +1280,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") << glu::TessellationControlSource(tesc) << vk::ShaderBuildOptions(programCollection.usedVulkanVersion, vk::SPIRV_VERSION_1_3, 0u); @@ -1301,6 +1302,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempResult;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -1323,6 +1325,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdy + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp index 8e20219..48a2102 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp @@ -1134,8 +1134,14 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + #if GEOMETRY_POINT_SIZE_SUPPORTED + " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" + #endif "}\n"; */ + + const string pointSizeCapability = (*caseDef.geometryPointSizeSupported ? "OpCapability TessellationPointSize\n" : ""); + const string tesc = "; SPIR-V\n" "; Version: 1.3\n" @@ -1144,6 +1150,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "; Schema: 0\n" "OpCapability Tessellation\n" "OpCapability GroupNonUniform\n" + + pointSizeCapability + "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint TessellationControl %4 \"main\" %15 %18 %20 %26 %36 %48 %54\n" @@ -1214,6 +1221,10 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%54 = OpVariable %53 Input\n" "%56 = OpTypePointer Input %42\n" "%59 = OpTypePointer Output %42\n" + + (*caseDef.geometryPointSizeSupported ? + "%61 = OpTypePointer Input %32\n" + "%62 = OpTypePointer Output %32\n" + "%63 = OpConstant %12 1\n" : "") + "%4 = OpFunction %2 None %3\n" "%5 = OpLabel\n" "%16 = OpLoad %12 %15\n" @@ -1239,6 +1250,11 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%58 = OpLoad %42 %57\n" "%60 = OpAccessChain %59 %48 %49 %13\n" "OpStore %60 %58\n" + + (*caseDef.geometryPointSizeSupported ? + "%64 = OpAccessChain %61 %54 %49 %63\n" + "%65 = OpLoad %32 %64\n" + "%66 = OpAccessChain %62 %48 %49 %63\n" + "OpStore %66 %65\n" : "") + "OpReturn\n" "OpFunctionEnd\n"; programCollection.spirvAsmSources.add("tesc") << tesc << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3); @@ -1259,8 +1275,14 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = uvec4(gl_SubgroupSize, gl_SubgroupInvocationID, 0, 0);\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + #if GEOMETRY_POINT_SIZE_SUPPORTED + " gl_PointSize = gl_in[0].gl_PointSize;\n" + #endif "}\n"; */ + + const string pointSizeCapability = (*caseDef.geometryPointSizeSupported ? "OpCapability TessellationPointSize\n" : ""); + const string tese = "; SPIR - V\n" "; Version: 1.3\n" @@ -1269,6 +1291,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "; Schema: 0\n" "OpCapability Tessellation\n" "OpCapability GroupNonUniform\n" + + pointSizeCapability + "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint TessellationEvaluation %4 \"main\" %15 %23 %33 %35 %48 %53\n" @@ -1338,6 +1361,10 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%54 = OpTypePointer Input %43\n" "%61 = OpConstant %20 2\n" "%65 = OpTypePointer Output %43\n" + + (*caseDef.geometryPointSizeSupported ? + "%67 = OpTypePointer Input %20\n" + "%68 = OpTypePointer Output %20\n" + "%69 = OpConstant %12 1\n" : "") + "%4 = OpFunction %2 None %3\n" "%5 = OpLabel\n" "%41 = OpVariable %40 Function\n" @@ -1366,6 +1393,11 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%64 = OpFAdd %43 %56 %63\n" "%66 = OpAccessChain %65 %48 %13\n" "OpStore %66 %64\n" + + (*caseDef.geometryPointSizeSupported ? + "%70 = OpAccessChain %67 %53 %13 %69\n" + "%71 = OpLoad %20 %70\n" + "%72 = OpAccessChain %68 %48 %69\n" + "OpStore %72 %71\n" : "") + "OpReturn\n" "OpFunctionEnd\n"; programCollection.spirvAsmSources.add("tese") << tese << SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3); @@ -1387,10 +1419,16 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "{\n" " result[gl_PrimitiveIDIn] = uvec4(gl_SubgroupSize, gl_SubgroupInvocationID, 0, 0);\n" " gl_Position = gl_in[0].gl_Position;\n" + #if GEOMETRY_POINT_SIZE_SUPPORTED + " gl_PointSize = gl_in[0].gl_PointSize;\n" + #endif " EmitVertex();\n" " EndPrimitive();\n" "}\n"; */ + + const string pointSizeCapability = (*caseDef.geometryPointSizeSupported ? "OpCapability GeometryPointSize\n" : ""); + const string geometry = "; SPIR-V\n" "; Version: 1.3\n" @@ -1399,6 +1437,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "; Schema: 0\n" "OpCapability Geometry\n" "OpCapability GroupNonUniform\n" + + pointSizeCapability + "%1 = OpExtInstImport \"GLSL.std.450\"\n" "OpMemoryModel Logical GLSL450\n" "OpEntryPoint Geometry %4 \"main\" %15 %18 %20 %32 %36\n" @@ -1458,6 +1497,10 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%36 = OpVariable %35 Input\n" "%37 = OpTypePointer Input %27\n" "%40 = OpTypePointer Output %27\n" + + (*caseDef.geometryPointSizeSupported ? + "%42 = OpTypePointer Input %26\n" + "%43 = OpTypePointer Output %26\n" + "%44 = OpConstant %12 1\n" : "") + "%4 = OpFunction %2 None %3\n" "%5 = OpLabel\n" "%16 = OpLoad %12 %15\n" @@ -1470,10 +1513,16 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) "%39 = OpLoad %27 %38\n" "%41 = OpAccessChain %40 %32 %13\n" "OpStore %41 %39\n" + + (*caseDef.geometryPointSizeSupported ? + "%45 = OpAccessChain %42 %36 %13 %44\n" + "%46 = OpLoad %26 %45\n" + "%47 = OpAccessChain %43 %32 %44\n" + "OpStore %47 %46\n" : "") + "OpEmitVertex\n" "OpEndPrimitive\n" "OpReturn\n" "OpFunctionEnd\n"; + addGeometryShadersFromTemplate(geometry, SpirVAsmBuildOptions(programCollection.usedVulkanVersion, SPIRV_VERSION_1_3), programCollection.spirvAsmSources); } diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp index a1c2967..294e126 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp @@ -159,7 +159,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string extHeader = getExtHeader(caseDef); std::string testSrc = getTestSrc(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, ""); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, ""); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp index 967b4db..89b038a 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp @@ -355,6 +355,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdy.str() << " out_color[gl_InvocationID] = float(tempResult);" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; @@ -381,6 +382,7 @@ void initFrameBufferPrograms(SourceCollections& programCollection, CaseDefinitio << bdy.str() << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp index 31b3780..0f1d443 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp @@ -201,7 +201,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) std::string extHeader = getExtHeader(caseDef.format); std::string testSrc = getTestSrc(caseDef); - subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, extHeader, testSrc, ""); + subgroups::initStdPrograms(programCollection, buildOptions, caseDef.shaderStage, caseDef.format, *caseDef.geometryPointSizeSupported, extHeader, testSrc, ""); } void supportedCheck (Context& context, CaseDefinition caseDef) diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp index 14d264c..d2a5ad0 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp @@ -206,6 +206,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << bdy.str() << " out_color[gl_InvocationID] = float(tempResult);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -225,6 +226,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << bdy.str() << " out_color = float(tempResult);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -369,6 +371,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") @@ -391,6 +394,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = 1;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -413,6 +417,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + bdy.str() + " result[gl_PrimitiveIDIn] = tempResult;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp index 321268a..53176ed 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp @@ -239,6 +239,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << testSource << " out_color[gl_InvocationID] = temp_res;\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -269,6 +270,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << testSource << " out_color = temp_res;\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -366,6 +368,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") @@ -388,6 +391,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = temp_res;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -410,6 +414,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + testSource + " result[gl_PrimitiveIDIn] = temp_res;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp index 256a360..56adf53 100644 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.cpp @@ -1314,6 +1314,7 @@ void vkt::subgroups::initStdFrameBufferPrograms( SourceCollections& programCo << testSrc << " out_color[gl_InvocationID] = float(tempRes);\n" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (gsPointSize ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -1339,6 +1340,7 @@ void vkt::subgroups::initStdFrameBufferPrograms( SourceCollections& programCo << testSrc << " out_color = float(tempRes);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (gsPointSize ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -1354,6 +1356,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection const vk::ShaderBuildOptions& buildOptions, vk::VkShaderStageFlags shaderStage, vk::VkFormat format, + bool gsPointSize, std::string extHeader, std::string testSrc, std::string helperStr) @@ -1440,6 +1443,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (gsPointSize ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; const string tese = @@ -1463,6 +1467,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection " result[gl_PrimitiveID * 2 + uint(gl_TessCoord.x + 0.5)] = tempRes;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (gsPointSize ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; const string geometry = @@ -1486,6 +1491,7 @@ void vkt::subgroups::initStdPrograms( vk::SourceCollections& programCollection + testSrc + " result[gl_PrimitiveIDIn] = tempRes;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (gsPointSize ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n"; diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp index e7cfa69..9cb4d54 100644 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsTestsUtils.hpp @@ -117,6 +117,7 @@ void initStdPrograms( vk::SourceCollections& programCollection, const vk::ShaderBuildOptions& buildOptions, vk::VkShaderStageFlags shaderStage, vk::VkFormat format, + bool gsPointSize, std::string extHeader, std::string testSrc, std::string helperStr); diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp index 8479a40..fd3bd55 100755 --- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp +++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp @@ -272,6 +272,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << source << " out_color[gl_InvocationID] = float(result);" << " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + << (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") << "}\n"; programCollection.glslSources.add("tesc") @@ -299,6 +300,7 @@ void initFrameBufferPrograms (SourceCollections& programCollection, CaseDefiniti << source << " out_color = float(result);\n" << " gl_Position = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x);\n" + << (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") << "}\n"; subgroups::setTesCtrlShaderFrameBuffer(programCollection); @@ -492,6 +494,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " gl_TessLevelOuter[1] = 1.0f;\n" " }\n" " gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_out[gl_InvocationID].gl_PointSize = gl_in[gl_InvocationID].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tesc") @@ -521,6 +524,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) " res[offset] = result;\n" " float pixelSize = 2.0f/1024.0f;\n" " gl_Position = gl_in[0].gl_Position + gl_TessCoord.x * pixelSize / 2.0f;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + "}\n"; programCollection.glslSources.add("tese") @@ -550,6 +554,7 @@ void initPrograms(SourceCollections& programCollection, CaseDefinition caseDef) + source + " res[offset] = result;\n" " gl_Position = gl_in[0].gl_Position;\n" + + (*caseDef.geometryPointSizeSupported ? " gl_PointSize = gl_in[0].gl_PointSize;\n" : "") + " EmitVertex();\n" " EndPrimitive();\n" "}\n";