Lines Matching defs:texture
72 // \note Cube map texture size is larger in order to make minifications possible - otherwise would need to display different faces at same time.
230 lookupsStr += "\tcolor += " + colorMultiplier + "*(vec4(texture(" + samplerName + ", " + lookupCoord + "))*" + scaleName + " + " + biasName + ");\n";
343 void makeSafeLods (const vector<IVec3>& textureSizes, const IVec2& viewportSize); // Modifies texture coordinates so that LODs aren't too close to x.5 or 0.0 .
407 int tex2dArrayNdx = 0; // Keep track of 2d texture array index.
730 int m_numTextures; //!< \note Needed in addition to m_numUnits since same texture may be bound to many texture units.
739 vector<int> m_unitTextures; //!< Which texture is used in a particular unit.
740 vector<int> m_ndxTexType; //!< Index of a texture in m_textures2d, m_texturesCube, m_textures2dArray or m_textures3d, depending on texture type.
794 m_numTextures = m_numUnits; // In most cases use one unit per texture.
796 m_numTextures = rnd.getInt(deMax32(1, m_numUnits - 2), m_numUnits); // Sometimes assign same texture to multiple units.
798 log << tcu::TestLog::Message << ("Using " + de::toString(m_numUnits) + " texture unit(s) and " + de::toString(m_numTextures) + " texture(s)").c_str() << tcu::TestLog::EndMessage;
808 // Either fixed or randomized target types, and randomized parameters for every texture.
854 // Create new texture.
860 m_ndxTexType.push_back((int)m_textures2d.size()); // Remember the index this texture has in the 2d texture vector.
865 m_ndxTexType.push_back((int)m_texturesCube.size()); // Remember the index this texture has in the cube texture vector.
871 m_ndxTexType.push_back((int)m_textures2dArray.size()); // Remember the index this texture has in the 2d array texture vector.
876 m_ndxTexType.push_back((int)m_textures3d.size()); // Remember the index this texture has in the 3d vector.
884 // Fill with grid texture.
919 // Assign a texture index to each unit.
923 // \note Every texture is used at least once.
927 // Assign a random texture to remaining units.
1060 const tcu::Texture2D* texture = m_textures2d[ndx2d];
1065 for (int levelNdx = 0; levelNdx < texture->getNumLevels(); levelNdx++)
1067 if (texture->isLevelEmpty(levelNdx))
1070 tcu::ConstPixelBufferAccess access = texture->getLevel(levelNdx);
1077 GLU_EXPECT_NO_ERROR(context.getError(), "Set 2d texture image data");
1084 const tcu::TextureCube* texture = m_texturesCube[ndxCube];
1091 for (int levelNdx = 0; levelNdx < texture->getNumLevels(); levelNdx++)
1093 if (texture->isLevelEmpty((tcu::CubeFace)face, levelNdx))
1096 tcu::ConstPixelBufferAccess access = texture->getLevelFace(levelNdx, (tcu::CubeFace)face);
1111 const tcu::Texture2DArray* texture = m_textures2dArray[ndx2dArray];
1116 for (int levelNdx = 0; levelNdx < texture->getNumLevels(); levelNdx++)
1118 if (texture->isLevelEmpty(levelNdx))
1121 tcu::ConstPixelBufferAccess access = texture->getLevel(levelNdx);
1130 GLU_EXPECT_NO_ERROR(context.getError(), "Set 2d array texture image data");
1137 const tcu::Texture3D* texture = m_textures3d[ndx3d];
1142 for (int levelNdx = 0; levelNdx < texture->getNumLevels(); levelNdx++)
1144 if (texture->isLevelEmpty(levelNdx))
1147 tcu::ConstPixelBufferAccess access = texture->getLevel(levelNdx);
1156 GLU_EXPECT_NO_ERROR(context.getError(), "Set 3d texture image data");
1165 vector<bool> isTextureSetUp(m_numTextures, false); // \note Same texture may be bound to multiple units, but we only want to set up parameters and data once per texture.
1175 // Bind texture to unit.
1177 GLU_EXPECT_NO_ERROR(context.getError(), "Set active texture");
1179 GLU_EXPECT_NO_ERROR(context.getError(), "Bind texture");
1183 // Binding this texture for first time, so set parameters and data.
1191 GLU_EXPECT_NO_ERROR(context.getError(), "Set texture parameters");
1203 isTextureSetUp[texNdx] = true; // Don't set up this texture's parameters and data again later.
1221 // Delete previously generated texture names.