13c827367444ee418f129b2c238299f49d3264554Jarkko Poyry/*------------------------------------------------------------------------- 23c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * drawElements Quality Program OpenGL ES 2.0 Module 33c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * ------------------------------------------------- 43c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 53c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Copyright 2014 The Android Open Source Project 63c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 73c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Licensed under the Apache License, Version 2.0 (the "License"); 83c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * you may not use this file except in compliance with the License. 93c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * You may obtain a copy of the License at 103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * http://www.apache.org/licenses/LICENSE-2.0 123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * Unless required by applicable law or agreed to in writing, software 143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * distributed under the License is distributed on an "AS IS" BASIS, 153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * See the License for the specific language governing permissions and 173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * limitations under the License. 183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * 193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*! 203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \file 213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry * \brief Texture format performance tests. 223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry *//*--------------------------------------------------------------------*/ 233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "es2pTextureCases.hpp" 253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "glsShaderPerformanceCase.hpp" 263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuTextureUtil.hpp" 273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "tcuRenderTarget.hpp" 283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "gluTexture.hpp" 293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "gluStrUtil.hpp" 303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "deStringUtil.hpp" 323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "glwEnums.hpp" 343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry#include "glwFunctions.hpp" 353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 363c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace deqp 373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 383c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace gles2 393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 403c827367444ee418f129b2c238299f49d3264554Jarkko Poyrynamespace Performance 413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 433c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing namespace gls; 443c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing namespace glw; // GL types 453c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing tcu::Vec2; 463c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing tcu::Vec3; 473c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing tcu::Vec4; 483c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing tcu::IVec4; 493c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing std::string; 503c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing std::vector; 513c827367444ee418f129b2c238299f49d3264554Jarkko Poyryusing tcu::TestLog; 523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 533c827367444ee418f129b2c238299f49d3264554Jarkko PoyryTexture2DRenderCase::Texture2DRenderCase (Context& context, 543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const char* name, 553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const char* description, 563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 format, 573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 dataType, 583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 wrapS, 593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 wrapT, 603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 minFilter, 613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry deUint32 magFilter, 623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const tcu::Mat3& coordTransform, 633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int numTextures, 643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry bool powerOfTwo) 653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry : ShaderPerformanceCase (context.getTestContext(), context.getRenderContext(), name, description, CASETYPE_FRAGMENT) 663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_format (format) 673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_dataType (dataType) 683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_wrapS (wrapS) 693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_wrapT (wrapT) 703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_minFilter (minFilter) 713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_magFilter (magFilter) 723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_coordTransform (coordTransform) 733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_numTextures (numTextures) 743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry , m_powerOfTwo (powerOfTwo) 753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 783c827367444ee418f129b2c238299f49d3264554Jarkko PoyryTexture2DRenderCase::~Texture2DRenderCase (void) 793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (vector<glu::Texture2D*>::iterator i = m_textures.begin(); i != m_textures.end(); i++) 813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete *i; 823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_textures.clear(); 833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 853c827367444ee418f129b2c238299f49d3264554Jarkko Poyrystatic inline int roundDownToPowerOfTwo (int val) 863c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry DE_ASSERT(val >= 0); 883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int l0 = deClz32(val); 893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry return val & ~((1<<(31-l0))-1); 903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 923c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid Texture2DRenderCase::init (void) 933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry TestLog& log = m_testCtx.getLog(); 953c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int width = m_renderCtx.getRenderTarget().getWidth(); 973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int height = m_renderCtx.getRenderTarget().getHeight(); 983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry if (m_powerOfTwo) 1003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry width = roundDownToPowerOfTwo(width); 1023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry height = roundDownToPowerOfTwo(height); 1033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1053c827367444ee418f129b2c238299f49d3264554Jarkko Poyry bool mipmaps = m_minFilter == GL_NEAREST_MIPMAP_NEAREST || 1063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_minFilter == GL_NEAREST_MIPMAP_LINEAR || 1073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_minFilter == GL_LINEAR_MIPMAP_NEAREST || 1083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_minFilter == GL_LINEAR_MIPMAP_LINEAR; 1093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry DE_ASSERT(m_powerOfTwo || (!mipmaps && m_wrapS == GL_CLAMP_TO_EDGE && m_wrapT == GL_CLAMP_TO_EDGE)); 1113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec2 p00 = (m_coordTransform * Vec3(0.0f, 0.0f, 1.0f)).swizzle(0,1); 1133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec2 p10 = (m_coordTransform * Vec3(1.0f, 0.0f, 1.0f)).swizzle(0,1); 1143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec2 p01 = (m_coordTransform * Vec3(0.0f, 1.0f, 1.0f)).swizzle(0,1); 1153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec2 p11 = (m_coordTransform * Vec3(1.0f, 1.0f, 1.0f)).swizzle(0,1); 1163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_attributes.push_back(AttribSpec("a_coords", Vec4(p00.x(), p00.y(), 0.0f, 0.0f), 1183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec4(p10.x(), p10.y(), 0.0f, 0.0f), 1193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec4(p01.x(), p01.y(), 0.0f, 0.0f), 1203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec4(p11.x(), p11.y(), 0.0f, 0.0f))); 1213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << "Size: " << width << "x" << height << TestLog::EndMessage; 123b2e583dfcd8aa0d4ef254f841213fcf724b2b193Jarkko Pöyry log << TestLog::Message << "Format: " <<glu::getTextureFormatName(m_format) << " " << glu::getTypeName(m_dataType) << TestLog::EndMessage; 1243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << "Coords: " << p00 << ", " << p10 << ", " << p01 << ", " << p11 << TestLog::EndMessage; 1253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << "Wrap: " << glu::getTextureWrapModeStr(m_wrapS) << " / " << glu::getTextureWrapModeStr(m_wrapT) << TestLog::EndMessage; 1263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << "Filter: " << glu::getTextureFilterStr(m_minFilter) << " / " << glu::getTextureFilterStr(m_magFilter) << TestLog::EndMessage; 1273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << "Mipmaps: " << (mipmaps ? "true" : "false") << TestLog::EndMessage; 1283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry log << TestLog::Message << "Using additive blending." << TestLog::EndMessage; 1293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1303c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Use same viewport size as texture size. 1313c827367444ee418f129b2c238299f49d3264554Jarkko Poyry setViewportSize(width, height); 1323c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1333c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_vertShaderSource = 1343c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "attribute highp vec4 a_position;\n" 1353c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "attribute mediump vec2 a_coords;\n" 1363c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "varying mediump vec2 v_coords;\n" 1373c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "void main (void)\n" 1383c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "{\n" 1393c827367444ee418f129b2c238299f49d3264554Jarkko Poyry " gl_Position = a_position;\n" 1403c827367444ee418f129b2c238299f49d3264554Jarkko Poyry " v_coords = a_coords;\n" 1413c827367444ee418f129b2c238299f49d3264554Jarkko Poyry "}\n"; 1423c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1433c827367444ee418f129b2c238299f49d3264554Jarkko Poyry std::ostringstream fragSrc; 1443c827367444ee418f129b2c238299f49d3264554Jarkko Poyry fragSrc << "varying mediump vec2 v_coords;\n"; 1453c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1463c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int texNdx = 0; texNdx < m_numTextures; texNdx++) 1473c827367444ee418f129b2c238299f49d3264554Jarkko Poyry fragSrc << "uniform sampler2D u_sampler" << texNdx << ";\n"; 1483c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1493c827367444ee418f129b2c238299f49d3264554Jarkko Poyry fragSrc << "void main (void)\n" 1503c827367444ee418f129b2c238299f49d3264554Jarkko Poyry << "{\n"; 1513c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1523c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int texNdx = 0; texNdx < m_numTextures; texNdx++) 1533c827367444ee418f129b2c238299f49d3264554Jarkko Poyry fragSrc << "\t" << (texNdx == 0 ? "lowp vec4 r = " : "r += ") << "texture2D(u_sampler" << texNdx << ", v_coords);\n"; 1543c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1553c827367444ee418f129b2c238299f49d3264554Jarkko Poyry fragSrc << " gl_FragColor = r;\n" 1563c827367444ee418f129b2c238299f49d3264554Jarkko Poyry << "}\n"; 1573c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1583c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_fragShaderSource = fragSrc.str(); 1593c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1603c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_textures.reserve(m_numTextures); 1613c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int texNdx = 0; texNdx < m_numTextures; texNdx++) 1623c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1633c827367444ee418f129b2c238299f49d3264554Jarkko Poyry static const IVec4 swizzles[] = { IVec4(0,1,2,3), IVec4(1,2,3,0), IVec4(2,3,0,1), IVec4(3,0,1,2), 1643c827367444ee418f129b2c238299f49d3264554Jarkko Poyry IVec4(3,2,1,0), IVec4(2,1,0,3), IVec4(1,0,3,2), IVec4(0,3,2,1) }; 1653c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const IVec4& sw = swizzles[texNdx % DE_LENGTH_OF_ARRAY(swizzles)]; 1663c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1673c827367444ee418f129b2c238299f49d3264554Jarkko Poyry glu::Texture2D* texture = new glu::Texture2D(m_renderCtx, m_format, m_dataType, width, height); 1683c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_textures.push_back(texture); 1693c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1703c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Fill levels. 1713c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int numLevels = mipmaps ? texture->getRefTexture().getNumLevels() : 1; 1723c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int levelNdx = 0; levelNdx < numLevels; levelNdx++) 1733c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 1743c827367444ee418f129b2c238299f49d3264554Jarkko Poyry texture->getRefTexture().allocLevel(levelNdx); 1753c827367444ee418f129b2c238299f49d3264554Jarkko Poyry tcu::fillWithComponentGradients(texture->getRefTexture().getLevel(levelNdx), 1763c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec4(0.0f, 0.0f, 0.0f, 0.0f).swizzle(sw[0], sw[1], sw[2], sw[3]), 1773c827367444ee418f129b2c238299f49d3264554Jarkko Poyry Vec4(1.0f, 1.0f, 1.0f, 1.0f).swizzle(sw[0], sw[1], sw[2], sw[3])); 1783c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1793c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1803c827367444ee418f129b2c238299f49d3264554Jarkko Poyry texture->upload(); 1813c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 1823c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1833c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ShaderPerformanceCase::init(); 1843c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 1853c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1863c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid Texture2DRenderCase::deinit (void) 1873c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 1883c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (vector<glu::Texture2D*>::iterator i = m_textures.begin(); i != m_textures.end(); i++) 1893c827367444ee418f129b2c238299f49d3264554Jarkko Poyry delete *i; 1903c827367444ee418f129b2c238299f49d3264554Jarkko Poyry m_textures.clear(); 1913c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1923c827367444ee418f129b2c238299f49d3264554Jarkko Poyry ShaderPerformanceCase::deinit(); 1933c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 1943c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 1953c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid Texture2DRenderCase::setupProgram (deUint32 program) 1963c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 1973c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const glw::Functions& gl = m_renderCtx.getFunctions(); 1983c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int texNdx = 0; texNdx < m_numTextures; texNdx++) 1993c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2003c827367444ee418f129b2c238299f49d3264554Jarkko Poyry int samplerLoc = gl.getUniformLocation(program, (string("u_sampler") + de::toString(texNdx)).c_str()); 2013c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.uniform1i(samplerLoc, texNdx); 2023c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2033c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 2043c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2053c827367444ee418f129b2c238299f49d3264554Jarkko Poyryvoid Texture2DRenderCase::setupRenderState (void) 2063c827367444ee418f129b2c238299f49d3264554Jarkko Poyry{ 2073c827367444ee418f129b2c238299f49d3264554Jarkko Poyry const glw::Functions& gl = m_renderCtx.getFunctions(); 2083c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2093c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Setup additive blending. 2103c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.enable(GL_BLEND); 2113c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.blendFunc(GL_ONE, GL_ONE); 2123c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.blendEquation(GL_FUNC_ADD); 2133c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2143c827367444ee418f129b2c238299f49d3264554Jarkko Poyry // Setup textures. 2153c827367444ee418f129b2c238299f49d3264554Jarkko Poyry for (int texNdx = 0; texNdx < m_numTextures; texNdx++) 2163c827367444ee418f129b2c238299f49d3264554Jarkko Poyry { 2173c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.activeTexture(GL_TEXTURE0 + texNdx); 2183c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.bindTexture(GL_TEXTURE_2D, m_textures[texNdx]->getGLTexture()); 2193c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, m_minFilter); 2203c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, m_magFilter); 2213c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, m_wrapS); 2223c827367444ee418f129b2c238299f49d3264554Jarkko Poyry gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, m_wrapT); 2233c827367444ee418f129b2c238299f49d3264554Jarkko Poyry } 2243c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} 2253c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2263c827367444ee418f129b2c238299f49d3264554Jarkko Poyry 2273c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // Performance 2283c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // gles2 2293c827367444ee418f129b2c238299f49d3264554Jarkko Poyry} // deqp 230