Use 64-bit math in work group size assertion.
[platform/upstream/VK-GL-CTS.git] / modules / gles31 / functional / es31fNegativeComputeTests.cpp
index cc96e55..8d492ab 100644 (file)
@@ -646,7 +646,7 @@ void invalid_maximum_work_group_sizes (NegativeTestContext& ctx)
        ctx.glGetIntegerv(GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS, &maxWorkGroupInvocations);
        ctx.expectError(GL_NO_ERROR);
 
-       DE_ASSERT((maxWorkGroupSizeX * maxWorkGroupSizeY * maxWorkGroupSizeZ) > maxWorkGroupInvocations );
+       DE_ASSERT(((deInt64) maxWorkGroupSizeX * maxWorkGroupSizeY * maxWorkGroupSizeZ) > maxWorkGroupInvocations );
 
        const bool                              isES32                  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
        const char* const               shaderVersion   = isES32
@@ -800,6 +800,12 @@ void invalid_layout_qualifiers (NegativeTestContext& ctx)
 
 void invalid_write_built_in_constants (NegativeTestContext& ctx)
 {
+       if ((!ctx.isExtensionSupported("GL_EXT_tessellation_shader") && !ctx.isExtensionSupported("GL_OES_tessellation_shader")) ||
+           (!ctx.isExtensionSupported("GL_EXT_geometry_shader") && !ctx.isExtensionSupported("GL_OES_geometry_shader")))
+       {
+               TCU_THROW(NotSupportedError, "tessellation and geometry shader extensions not supported");
+       }
+
        const bool                                      isES32                  = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2));
        map<string, string>                     args;