From 4f59458a4db47cfd041d490511b1374880a90ba2 Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Wed, 23 Jan 2019 18:28:59 +0200 Subject: [PATCH] GL_ARB_enhanced_layouts: remove dead code Additionally, make us of the new debugging macro to ease checking that we are testing just the correct and only cause for a failure report. Components: OpenGL VK-GL-CTS issue: 1617 Affects: KHR-GL44.enhanced_layouts.xfb_duplicated_stride Change-Id: I2bb03db22743ae12d17c3da1654d082236d2e2e6 --- .../modules/gl/gl4cEnhancedLayoutsTests.cpp | 54 ++-------------------- 1 file changed, 4 insertions(+), 50 deletions(-) diff --git a/external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp b/external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp index 00ba087..0c1be21 100644 --- a/external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp +++ b/external/openglcts/modules/gl/gl4cEnhancedLayoutsTests.cpp @@ -21852,7 +21852,11 @@ XFBDuplicatedStrideTest::XFBDuplicatedStrideTest(deqp::Context& context) std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Utils::Shader::STAGES stage) { static const GLchar* invalid_var_definition = "const uint valid_stride = 64;\n" +#if DEBUG_NEG_REMOVE_ERROR + "const uint conflicting_stride = 64;\n" +#else "const uint conflicting_stride = 128;\n" +#endif /* DEBUG_NEG_REMOVE_ERROR */ "\n" "layout (xfb_buffer = 0, xfb_stride = valid_stride) out;\n" "layout (xfb_buffer = 0, xfb_stride = conflicting_stride) out;\n"; @@ -21886,8 +21890,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti "{\n" " vec4 result = vs_any[0];\n" "\n" - "VARIABLE_USE" - "\n" " any_fs = result;\n" " gl_Position = vec4(-1, -1, 0, 1);\n" " EmitVertex();\n" @@ -21923,32 +21925,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti " gl_TessLevelInner[1] = 1.0;\n" "}\n" "\n"; - static const GLchar* tcs_tested = "#version 430 core\n" - "#extension GL_ARB_enhanced_layouts : require\n" - "\n" - "layout(vertices = 1) out;\n" - "\n" - "VAR_DEFINITION" - "\n" - "in vec4 vs_any[];\n" - "out vec4 any_fs[];\n" - "\n" - "void main()\n" - "{\n" - " vec4 result = vs_any[gl_InvocationID];\n" - "\n" - "VARIABLE_USE" - "\n" - " any_fs[gl_InvocationID] = result;\n" - "\n" - " gl_TessLevelOuter[0] = 1.0;\n" - " gl_TessLevelOuter[1] = 1.0;\n" - " gl_TessLevelOuter[2] = 1.0;\n" - " gl_TessLevelOuter[3] = 1.0;\n" - " gl_TessLevelInner[0] = 1.0;\n" - " gl_TessLevelInner[1] = 1.0;\n" - "}\n" - "\n"; static const GLchar* tes_tested = "#version 430 core\n" "#extension GL_ARB_enhanced_layouts : require\n" "\n" @@ -21963,8 +21939,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti "{\n" " vec4 result = tcs_tes[0];\n" "\n" - "VARIABLE_USE" - "\n" " any_fs = result;\n" "}\n" "\n"; @@ -21991,8 +21965,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti "{\n" " vec4 result = in_vs;\n" "\n" - "VARIABLE_USE" - "\n" " any_fs += result;\n" "}\n" "\n"; @@ -22004,7 +21976,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti { size_t position = 0; const GLchar* var_definition = 0; - const GLchar* var_use = ""; switch (test_case.m_case) { @@ -22023,9 +21994,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti case Utils::Shader::GEOMETRY: source = gs_tested; break; - case Utils::Shader::TESS_CTRL: - source = tcs_tested; - break; case Utils::Shader::TESS_EVAL: source = tes_tested; break; @@ -22037,7 +22005,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti } Utils::replaceToken("VAR_DEFINITION", position, var_definition, source); - Utils::replaceToken("VARIABLE_USE", position, var_use, source); } else { @@ -22056,19 +22023,6 @@ std::string XFBDuplicatedStrideTest::getShaderSource(GLuint test_case_index, Uti source = ""; } break; - case Utils::Shader::TESS_CTRL: - switch (stage) - { - case Utils::Shader::FRAGMENT: - source = fs; - break; - case Utils::Shader::VERTEX: - source = vs; - break; - default: - source = ""; - } - break; case Utils::Shader::TESS_EVAL: switch (stage) { -- 2.7.4