From ef94567f10e8e6bfba724d683f51b20da196e047 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Wed, 12 Apr 2023 15:13:01 -0700 Subject: [PATCH] Don't compile unnecessary stages for array_of_arrays tests. If we're testing compile+link with some generated FS code, we don't need to compile a stub TCS/TES/GS. Similar reductions apply to other stages. Reduces runtime of KHR-Single-GL46.arrays_of_arrays_gl.SizedDeclarationsPrimitive (for example) on a brya chromebook from 28s to 18s. Components: OpenGL, OpenGL ES VK-GL-CTS issue: 4398 Affected tests: KHR-GL*.arrays_of_arrays_gl.*, KHR-GLES*.arrays_of_arrays.* Change-Id: Ie0d7c271fda046fa7b78dcf029bfd34db9dbcf25 (cherry picked from commit b481dada59734e8e34050fe884ba6d627d9e5c54) --- .../gles31/es31cArrayOfArraysTests.cpp | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/external/openglcts/modules/gles31/es31cArrayOfArraysTests.cpp b/external/openglcts/modules/gles31/es31cArrayOfArraysTests.cpp index 2cbb3fdc53..ba25496121 100644 --- a/external/openglcts/modules/gles31/es31cArrayOfArraysTests.cpp +++ b/external/openglcts/modules/gles31/es31cArrayOfArraysTests.cpp @@ -432,47 +432,37 @@ void initializeMap() const std::string* vs = &default_vertex_shader_source; \ const std::string* tcs = &default_tc_shader_source; \ const std::string* tes = &default_te_shader_source; \ - const std::string* gs = &default_geometry_shader_source; \ const std::string* fs = &default_fragment_shader_source; \ \ switch (TYPE) \ { \ case TestCaseBase::COMPUTE_SHADER_TYPE: \ - cs = &SOURCE; \ - vs = &empty_string; \ - tcs = &empty_string; \ - tes = &empty_string; \ - gs = &empty_string; \ - fs = &empty_string; \ + this->execute_positive_test(empty_string, empty_string, empty_string, \ + empty_string, empty_string, SOURCE, \ + DELETE, GPU5); \ break; \ case TestCaseBase::FRAGMENT_SHADER_TYPE: \ - fs = &SOURCE; \ + this->execute_positive_test(*vs, SOURCE, DELETE, GPU5); \ break; \ case TestCaseBase::GEOMETRY_SHADER_TYPE: \ - gs = &SOURCE; \ + this->execute_positive_test(*vs, empty_string, empty_string, SOURCE, *fs, \ + *cs, DELETE, GPU5); \ break; \ case TestCaseBase::TESSELATION_CONTROL_SHADER_TYPE: \ - tcs = &SOURCE; \ + this->execute_positive_test(*vs, SOURCE, *tes, empty_string, *fs, *cs, \ + DELETE, GPU5); \ break; \ case TestCaseBase::TESSELATION_EVALUATION_SHADER_TYPE: \ - tes = &SOURCE; \ + this->execute_positive_test(*vs, *tcs, SOURCE, empty_string, *fs, *cs, \ + DELETE, GPU5); \ break; \ case TestCaseBase::VERTEX_SHADER_TYPE: \ - vs = &SOURCE; \ + this->execute_positive_test(SOURCE, *fs, DELETE, GPU5); \ break; \ default: \ TCU_FAIL("Invalid enum"); \ break; \ }; \ - \ - if (API::USE_ALL_SHADER_STAGES) \ - { \ - this->execute_positive_test(*vs, *tcs, *tes, *gs, *fs, *cs, DELETE, GPU5); \ - } \ - else \ - { \ - this->execute_positive_test(*vs, *fs, DELETE, GPU5); \ - } \ } while (0) /** Macro executes either positive or negative test