From: John Richardson Date: Tue, 1 Nov 2016 13:06:53 +0000 (+0000) Subject: Extend primitive_bounding_box negative tests X-Git-Tag: upstream/0.1.0~445^2~99^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33a70380153a08527edf2123131d8f01723ad2bd;p=platform%2Fupstream%2FVK-GL-CTS.git Extend primitive_bounding_box negative tests Tests groups added to - dEQP-GLES31.functional.debug.negative_coverage.*. Extended tests: - shader_directive.primitive_bounding_box Change-Id: I38b698e3bd594f71b15d3bce4dc9a809298eb95e --- diff --git a/modules/gles31/functional/es31fNegativeShaderDirectiveTests.cpp b/modules/gles31/functional/es31fNegativeShaderDirectiveTests.cpp index 2b5446247..f3b5ac43e 100644 --- a/modules/gles31/functional/es31fNegativeShaderDirectiveTests.cpp +++ b/modules/gles31/functional/es31fNegativeShaderDirectiveTests.cpp @@ -126,14 +126,42 @@ void primitive_bounding_box (NegativeTestContext& ctx) if (contextSupports(ctx.getRenderContext().getType() , glu::ApiType::es(3, 2))) { ctx.beginSection("gl_BoundingBox does not require the OES/EXT suffix in a 320 es shader."); - const std::string source = "#version 320 es\n" - "layout(vertices = 3) out;\n" - "void main()\n" - "{\n" - " gl_BoundingBox[0] = vec4(0.0, 0.0, 0.0, 0.0);\n" - " gl_BoundingBox[1] = vec4(0.0, 0.0, 0.0, 0.0);\n" - "}\n"; - verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_PASS); + { + const std::string source = "#version 320 es\n" + "layout(vertices = 3) out;\n" + "void main()\n" + "{\n" + " gl_BoundingBox[0] = vec4(0.0, 0.0, 0.0, 0.0);\n" + " gl_BoundingBox[1] = vec4(0.0, 0.0, 0.0, 0.0);\n" + "}\n"; + verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_PASS); + } + ctx.endSection(); + + ctx.beginSection("Invalid index used when assigning to gl_BoundingBox in 320 es shader."); + { + const std::string source = "#version 320 es\n" + "layout(vertices = 3) out;\n" + "void main()\n" + "{\n" + " gl_BoundingBox[0] = vec4(0.0, 0.0, 0.0, 0.0);\n" + " gl_BoundingBox[2] = vec4(0.0, 0.0, 0.0, 0.0);\n" + "}\n"; + verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_FAIL); + } + ctx.endSection(); + + ctx.beginSection("Invalid type assignment to per-patch output array in 320 es shader."); + { + const std::string source = "#version 320 es\n" + "layout(vertices = 3) out;\n" + "void main()\n" + "{\n" + " gl_BoundingBox[0] = ivec4(0, 0, 0, 0);\n" + " gl_BoundingBox[1] = ivec4(0, 0, 0, 0);\n" + "}\n"; + verifyShader(ctx, glu::SHADERTYPE_TESSELLATION_CONTROL, source, EXPECT_RESULT_FAIL); + } ctx.endSection(); } }