void init (void) { gls::ShaderLibrary shaderLibrary(m_testCtx, m_context.getRenderContext(), m_context.getContextInfo()); std::string fileName = std::string("shaders/") + getName() + ".test"; std::vector<tcu::TestNode*> children = shaderLibrary.loadShaderFile(fileName.c_str()); for (int i = 0; i < (int)children.size(); i++) addChild(children[i]); }
void AndroidExtensionPackES31ATests::init (void) { // .limits { static const struct { const char* name; glw::GLenum target; int limit; } limits[] = { { "max_fragment_atomic_counter_buffers", GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS, 1 }, { "max_fragment_atomic_counters", GL_MAX_FRAGMENT_ATOMIC_COUNTERS, 8 }, { "max_fragment_image_uniforms", GL_MAX_FRAGMENT_IMAGE_UNIFORMS, 4 }, { "max_fragment_shader_storage_blocks", GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS, 4 }, }; tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "limits", "Implementation limits"); addChild(group); for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(limits); ++ndx) group->addChild(new ImplementationLimitCase(m_context, limits[ndx].name, (std::string() + "Check " + limits[ndx].name + " is at least " + de::toString(limits[ndx].limit)).c_str(), limits[ndx].target, limits[ndx].limit)); } // .extensions { static const char* const subExtensions[] = { "GL_KHR_debug", "GL_KHR_texture_compression_astc_ldr", "GL_KHR_blend_equation_advanced", "GL_OES_sample_shading", "GL_OES_sample_variables", "GL_OES_shader_image_atomic", "GL_OES_shader_multisample_interpolation", "GL_OES_texture_stencil8", "GL_OES_texture_storage_multisample_2d_array", "GL_EXT_copy_image", "GL_EXT_draw_buffers_indexed", "GL_EXT_geometry_shader", "GL_EXT_gpu_shader5", "GL_EXT_primitive_bounding_box", "GL_EXT_shader_io_blocks", "GL_EXT_tessellation_shader", "GL_EXT_texture_border_clamp", "GL_EXT_texture_buffer", "GL_EXT_texture_cube_map_array", "GL_EXT_texture_sRGB_decode", }; tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "extensions", "Required extensions"); addChild(group); for (int ndx = 0; ndx < DE_LENGTH_OF_ARRAY(subExtensions); ++ndx) { const std::string name = genExtensionTestName(subExtensions[ndx]); const std::string description = "Check that extension " + name + " is supported if extension pack is supported"; group->addChild(new SubExtensionCase(m_context, name.c_str(), description.c_str(), subExtensions[ndx])); } } // .shaders { gls::ShaderLibrary shaderLibrary (m_testCtx, m_context.getRenderContext(), m_context.getContextInfo()); tcu::TestCaseGroup* const group = new tcu::TestCaseGroup(m_testCtx, "shaders", "Shader tests"); { const std::vector<tcu::TestNode*>& children = shaderLibrary.loadShaderFile("shaders/es31/android_extension_pack.test"); tcu::TestCaseGroup* const groupES31 = new tcu::TestCaseGroup(m_testCtx, "es31", "GLSL ES 3.1 Shader tests", children); group->addChild(groupES31); } { const std::vector<tcu::TestNode*>& children = shaderLibrary.loadShaderFile("shaders/es32/android_extension_pack.test"); tcu::TestCaseGroup* const groupES32 = new tcu::TestCaseGroup(m_testCtx, "es32", "GLSL ES 3.2 Shader tests", children); group->addChild(groupES32); } addChild(group); } }