Merge vk-gl-cts/master into vk-gl-cts/vulkan-cts-next-dev
authorAlexander Galazin <alexander.galazin@arm.com>
Tue, 2 Jul 2019 10:44:34 +0000 (12:44 +0200)
committerGraeme Leese <gleese@broadcom.com>
Tue, 2 Jul 2019 14:00:17 +0000 (15:00 +0100)
Change-Id: I6cbad2a23fab5565af2ed612b0262abefd5b649f

1  2 
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp

@@@ -159,17 -157,14 +157,14 @@@ void initFrameBufferPrograms (SourceCol
                                "  result |= 0x4;\n"
                : (OPTYPE_ALLEQUAL == caseDef.opType || OPTYPE_ALLEQUAL_ARB == caseDef.opType) ?
                                "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(1.25 * float(data[gl_SubgroupInvocationID]) + 5.0);\n" +
-                               "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(gl_SubgroupInvocationID);\n" +
-                               "  result = " + getOpTypeName(caseDef.opType) + "("+ (arbFunctions ? "bool(" : "")
-                               + subgroups::getFormatNameForGLSL(caseDef.format) + "(1))" + (arbFunctions ? ")" : "") + " ? 0x1 : 0;\n"
 -                              "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect())\n;" : "(12.0 * float(data[gl_SubgroupInvocationID]) + gl_SubgroupInvocationID);\n") +
++                              "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect())\n;" : "(gl_SubgroupInvocationID);\n") +
+                               "  result = " + getOpTypeName(caseDef.opType) + "(" +
+                               subgroups::getFormatNameForGLSL(caseDef.format) + "(1)) ? 0x1 : 0;\n"
                                "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
                                "(gl_SubgroupInvocationID)" + (arbFunctions ? ")" : "") + " ? 0 : 0x2;\n"
-                               "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(data[0])" + (arbFunctions ? ")" : "") + " ? 0x4 : 0;\n"
-                               "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(valueEqual)" + (arbFunctions ? ")" : "") + " ? 0x8 : 0x0;\n"
-                               "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(valueNoEqual)" + (arbFunctions ? ")" : "") + " ? 0x0 : 0x10;\n"
+                               "  result |= " + getOpTypeName(caseDef.opType) + "(data[0]) ? 0x4 : 0;\n"
+                               "  result |= " + getOpTypeName(caseDef.opType) + "(valueEqual) ? 0x8 : 0x0;\n"
+                               "  result |= " + getOpTypeName(caseDef.opType) + "(valueNoEqual) ? 0x0 : 0x10;\n"
                                "  if (subgroupElect()) result |= 0x2 | 0x10;\n"
                : "";
  
                                "  result |= 0x4;\n"
                : (OPTYPE_ALLEQUAL == caseDef.opType || OPTYPE_ALLEQUAL_ARB == caseDef.opType) ?
                                "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(1.25 * float(data[gl_SubgroupInvocationID]) + 5.0);\n" +
-                               "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(gl_SubgroupInvocationID);\n" +
-                               "  result |= " + getOpTypeName(caseDef.opType) + "("+ (arbFunctions ? "bool(" : "")
-                               + subgroups::getFormatNameForGLSL(caseDef.format) + "(1))" + (arbFunctions ? ")" : "") + " ? 0x10 : 0;\n"
 -                              "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect());\n" : "(12.0 * float(data[gl_SubgroupInvocationID]) + int(gl_FragCoord.x*gl_SubgroupInvocationID));\n") +
++                              "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect());\n" : "(gl_SubgroupInvocationID);\n") +
+                               "  result |= " + getOpTypeName(caseDef.opType) + "("
+                               + subgroups::getFormatNameForGLSL(caseDef.format) + "(1)) ? 0x10 : 0;\n"
                                "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
                                "(gl_SubgroupInvocationID)" + (arbFunctions ? ")" : "") + " ? 0 : 0x2;\n"
-                               "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(data[0])" + (arbFunctions ? ")" : "") + " ? 0x4 : 0;\n"
-                               "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(valueEqual)" + (arbFunctions ? ")" : "") + " ? 0x8 : 0x0;\n"
-                               "  result |= " + getOpTypeName(caseDef.opType) +
-                               "(gl_HelperInvocation) ? 0x0 : 0x1;\n"
+                               "  result |= " + getOpTypeName(caseDef.opType) + "(data[0]) ? 0x4 : 0;\n"
+                               "  result |= " + getOpTypeName(caseDef.opType) + "(valueEqual) ? 0x8 : 0x0;\n"
+                               "  result |= " + getOpTypeName(caseDef.opType) + "(gl_HelperInvocation) ? 0x0 : 0x1;\n"
                                "  if (subgroupElect()) result |= 0x2 | 0x10;\n"
                : "";
  
@@@ -403,18 -381,15 +387,15 @@@ void initPrograms(SourceCollections& pr
  
                else if (OPTYPE_ALLEQUAL == caseDef.opType || OPTYPE_ALLEQUAL_ARB == caseDef.opType)
                {
 -                      src << "  " << subgroups::getFormatNameForGLSL(caseDef.format) <<" valueEqual = " << subgroups::getFormatNameForGLSL(caseDef.format) << "(1.25 * float(data[gl_SubgroupInvocationID]) + 5.0);\n"
 -                              << "  " << subgroups::getFormatNameForGLSL(caseDef.format) <<" valueNoEqual = " << subgroups::getFormatNameForGLSL(caseDef.format) << (formatIsBoolean ? "(subgroupElect());\n" : "(12.0 * float(data[gl_SubgroupInvocationID]) + offset);\n")
 +                      src << "  " << subgroups::getFormatNameForGLSL(caseDef.format) << " valueEqual = " << subgroups::getFormatNameForGLSL(caseDef.format) << "(1.25 * float(data[gl_SubgroupInvocationID]) + 5.0);\n"
-                               << "  " << subgroups::getFormatNameForGLSL(caseDef.format) << " valueNoEqual = " << subgroups::getFormatNameForGLSL(caseDef.format) << "(gl_SubgroupInvocationID);\n"
-                               <<"  result[offset] = " << getOpTypeName(caseDef.opType) << "(" << (arbFunctions ? "bool(" : "")
-                               << subgroups::getFormatNameForGLSL(caseDef.format) << "(1))" << (arbFunctions ? ")" : "") << " ? 0x1 : 0;\n"
++                              << "  " << subgroups::getFormatNameForGLSL(caseDef.format) << " valueNoEqual = " << subgroups::getFormatNameForGLSL(caseDef.format) << (formatIsBoolean ? "(subgroupElect());\n" : "(gl_SubgroupInvocationID);\n")
+                               <<"  result[offset] = " << getOpTypeName(caseDef.opType) << "("
+                               << subgroups::getFormatNameForGLSL(caseDef.format) << "(1)) ? 0x1 : 0;\n"
                                << "  result[offset] |= " << getOpTypeName(caseDef.opType) << (arbFunctions ? "(bool" : "")
                                << "(gl_SubgroupInvocationID)" << (arbFunctions ? ")" : "") << " ? 0x0 : 0x2;\n"
-                               << "  result[offset] |= " << getOpTypeName(caseDef.opType) << (arbFunctions ? "(bool" : "")
-                               << "(data[0])" << (arbFunctions ? ")" : "") << " ? 0x4 : 0x0;\n"
-                               << "  result[offset] |= "<< getOpTypeName(caseDef.opType) << (arbFunctions ? "(bool" : "")
-                               << "(valueEqual)" << (arbFunctions ? ")" : "") << " ? 0x8 : 0x0;\n"
-                               << "  result[offset] |= "<< getOpTypeName(caseDef.opType) << (arbFunctions ? "(bool" : "")
-                               << "(valueNoEqual)" << (arbFunctions ? ")" : "") << " ? 0x0 : 0x10;\n"
+                               << "  result[offset] |= " << getOpTypeName(caseDef.opType) << "(data[0]) ? 0x4 : 0x0;\n"
+                               << "  result[offset] |= "<< getOpTypeName(caseDef.opType) << "(valueEqual) ? 0x8 : 0x0;\n"
+                               << "  result[offset] |= "<< getOpTypeName(caseDef.opType) << "(valueNoEqual) ? 0x0 : 0x10;\n"
                                << "  if (subgroupElect()) result[offset] |= 0x2 | 0x10;\n";
                }
  
                                "  result[offset] |= 0x4;\n"
                : (OPTYPE_ALLEQUAL == caseDef.opType || OPTYPE_ALLEQUAL_ARB == caseDef.opType) ?
                                "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(1.25 * float(data[gl_SubgroupInvocationID]) + 5.0);\n" +
 -                              "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect());\n" : "(12.0 * float(data[gl_SubgroupInvocationID]) + gl_SubgroupInvocationID);\n") +
 +                              "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(gl_SubgroupInvocationID);\n" +
-                               "  result[offset] = " + getOpTypeName(caseDef.opType) + "("+ (arbFunctions ? "bool(" : "")
-                               + subgroups::getFormatNameForGLSL(caseDef.format) + "(1))" + (arbFunctions ? ")" : "") + " ? 0x1 : 0;\n"
+                               "  result[offset] = " + getOpTypeName(caseDef.opType) + "("
+                               + subgroups::getFormatNameForGLSL(caseDef.format) + "(1)) ? 0x1 : 0;\n"
                                "  result[offset] |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
                                "(gl_SubgroupInvocationID)" + (arbFunctions ? ")" : "") + " ? 0 : 0x2;\n"
-                               "  result[offset] |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(data[0])" + (arbFunctions ? ")" : "") + " ? 0x4 : 0;\n"
-                               "  result[offset] |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(valueEqual)" + (arbFunctions ? ")" : "") + " ? 0x8 : 0x0;\n"
-                               "  result[offset] |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                               "(valueNoEqual)" + (arbFunctions ? ")" : "") + " ? 0x0 : 0x10;\n"
+                               "  result[offset] |= " + getOpTypeName(caseDef.opType) + "(data[0]) ? 0x4 : 0;\n"
+                               "  result[offset] |= " + getOpTypeName(caseDef.opType) + "(valueEqual) ? 0x8 : 0x0;\n"
+                               "  result[offset] |= " + getOpTypeName(caseDef.opType) + "(valueNoEqual) ? 0x0 : 0x10;\n"
                                "  if (subgroupElect()) result[offset] |= 0x2 | 0x10;\n"
                : "";
  
                                        "  result |= 0x4;\n"
                        : (OPTYPE_ALLEQUAL == caseDef.opType || OPTYPE_ALLEQUAL_ARB == caseDef.opType) ?
                                        "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(1.25 * float(data[gl_SubgroupInvocationID]) + 5.0);\n" +
-                                       "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + "(gl_SubgroupInvocationID);\n" +
-                                       "  result = " + getOpTypeName(caseDef.opType) + "("+ (arbFunctions ? "bool(" : "")
-                                       + subgroups::getFormatNameForGLSL(caseDef.format) + "(1))" + (arbFunctions ? ")" : "") + " ? 0x1 : 0;\n"
 -                                      "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect());\n" : "(12.0 * float(data[gl_SubgroupInvocationID]) + int(gl_FragCoord.x*gl_SubgroupInvocationID));\n") +
++                                      "  " + subgroups::getFormatNameForGLSL(caseDef.format) + " valueNoEqual = " + subgroups::getFormatNameForGLSL(caseDef.format) + (formatIsBoolean ? "(subgroupElect());\n" : "(gl_SubgroupInvocationID);\n") +
+                                       "  result = " + getOpTypeName(caseDef.opType) + "("
+                                       + subgroups::getFormatNameForGLSL(caseDef.format) + "(1)) ? 0x1 : 0;\n"
                                        "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
                                        "(gl_SubgroupInvocationID)" + (arbFunctions ? ")" : "") + " ? 0 : 0x2;\n"
-                                       "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                                       "(data[0])" + (arbFunctions ? ")" : "") + " ? 0x4 : 0;\n"
-                                       "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                                       "(valueEqual)" + (arbFunctions ? ")" : "") + " ? 0x8 : 0x0;\n"
-                                       "  result |= " + getOpTypeName(caseDef.opType) + (arbFunctions ? "(bool" : "") +
-                                       "(valueNoEqual)" + (arbFunctions ? ")" : "") + " ? 0x0 : 0x10;\n"
+                                       "  result |= " + getOpTypeName(caseDef.opType) + "(data[0]) ? 0x4 : 0;\n"
+                                       "  result |= " + getOpTypeName(caseDef.opType) + "(valueEqual) ? 0x8 : 0x0;\n"
+                                       "  result |= " + getOpTypeName(caseDef.opType) + "(valueNoEqual) ? 0x0 : 0x10;\n"
                                        "  if (subgroupElect()) result |= 0x2 | 0x10;\n"
                        : "";
                        const string fragment =