1 /*-------------------------------------------------------------------------
2 * drawElements Quality Program OpenGL ES 3.0 Module
3 * -------------------------------------------------
5 * Copyright 2014 The Android Open Source Project
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
21 * \brief Texture count performance tests.
22 *//*--------------------------------------------------------------------*/
24 #include "es3pTextureCountTests.hpp"
25 #include "es3pTextureCases.hpp"
26 #include "gluStrUtil.hpp"
28 #include "deStringUtil.hpp"
30 #include "glwEnums.hpp"
41 TextureCountTests::TextureCountTests (Context& context)
42 : TestCaseGroup(context, "count", "Texture Count Performance Tests")
46 TextureCountTests::~TextureCountTests (void)
50 void TextureCountTests::init (void)
55 deUint32 internalFormat;
58 { "rgb565", GL_RGB565 },
60 { "rgba8", GL_RGBA8 },
61 { "rgba8ui", GL_RGBA8UI },
62 { "rg16f", GL_RG16F },
63 { "rgba16f", GL_RGBA16F },
64 { "rgba32f", GL_RGBA32F }
66 static const int texCounts[] = { 1, 2, 4, 8 };
68 for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(texFormats); formatNdx++)
70 for (int cntNdx = 0; cntNdx < DE_LENGTH_OF_ARRAY(texCounts); cntNdx++)
72 deUint32 format = texFormats[formatNdx].internalFormat;
73 deUint32 wrapS = GL_CLAMP_TO_EDGE;
74 deUint32 wrapT = GL_CLAMP_TO_EDGE;
75 deUint32 minFilter = GL_NEAREST;
76 deUint32 magFilter = GL_NEAREST;
77 int numTextures = texCounts[cntNdx];
78 string name = string(texFormats[formatNdx].name) + "_" + de::toString(numTextures);
79 string description = glu::getTextureFormatName(format);
81 addChild(new Texture2DRenderCase(m_context, name.c_str(), description.c_str(), format, wrapS, wrapT, minFilter, magFilter, tcu::Mat3(), numTextures, false /* npot */));