Lines Matching defs:cellNdx
62 static float getMinLodForCell (int cellNdx)
83 return s_values[cellNdx % DE_LENGTH_OF_ARRAY(s_values)];
86 static float getMaxLodForCell (int cellNdx)
108 return s_values[cellNdx % DE_LENGTH_OF_ARRAY(s_values)];
231 static void getBasicTexCoord2D (std::vector<float>& dst, int cellNdx)
260 DE_ASSERT(de::inBounds(cellNdx, 0, DE_LENGTH_OF_ARRAY(s_basicCoords)));
262 const Vec2& bottomLeft = s_basicCoords[cellNdx].bottomLeft;
263 const Vec2& topRight = s_basicCoords[cellNdx].topRight;
268 static void getAffineTexCoord2D (std::vector<float>& dst, int cellNdx)
271 getBasicTexCoord2D(dst, cellNdx);
274 float angle = 2.0f*DE_PI * ((float)cellNdx / 16.0f);
278 float shearX = de::inRange(cellNdx, 4, 11) ? (float)(15-cellNdx) / 16.0f : 0.0f;
363 const int cellNdx = gridY*gridWidth + gridX;
370 case COORDTYPE_BASIC: getBasicTexCoord2D (texCoord, cellNdx); break;
371 case COORDTYPE_AFFINE: getAffineTexCoord2D (texCoord, cellNdx); break;
376 sampleParams.w = s_projections[cellNdx % DE_LENGTH_OF_ARRAY(s_projections)];
379 sampleParams.bias = s_bias[cellNdx % DE_LENGTH_OF_ARRAY(s_bias)];
415 const int cellNdx = gridY*gridWidth + gridX;
422 case COORDTYPE_BASIC: getBasicTexCoord2D (texCoord, cellNdx); break;
423 case COORDTYPE_AFFINE: getAffineTexCoord2D (texCoord, cellNdx); break;
428 sampleParams.w = s_projections[cellNdx % DE_LENGTH_OF_ARRAY(s_projections)];
431 sampleParams.bias = s_bias[cellNdx % DE_LENGTH_OF_ARRAY(s_bias)];
671 for (int cellNdx = 0; cellNdx < (int)gridLayout.size(); cellNdx++)
673 const int curX = gridLayout[cellNdx].x();
674 const int curY = gridLayout[cellNdx].y();
675 const int curW = gridLayout[cellNdx].z();
676 const int curH = gridLayout[cellNdx].w();
677 const tcu::CubeFace cubeFace = (tcu::CubeFace)(cellNdx % tcu::CUBEFACE_LAST);
686 params.w = s_projections[cellNdx % DE_LENGTH_OF_ARRAY(s_projections)];
692 params.bias = s_bias[cellNdx % DE_LENGTH_OF_ARRAY(s_bias)];
727 for (int cellNdx = 0; cellNdx < (int)gridLayout.size(); cellNdx++)
729 const int curX = gridLayout[cellNdx].x();
730 const int curY = gridLayout[cellNdx].y();
731 const int curW = gridLayout[cellNdx].z();
732 const int curH = gridLayout[cellNdx].w();
733 const tcu::CubeFace cubeFace = (tcu::CubeFace)(cellNdx % tcu::CUBEFACE_LAST);
741 params.w = s_projections[cellNdx % DE_LENGTH_OF_ARRAY(s_projections)];
747 params.bias = s_bias[cellNdx % DE_LENGTH_OF_ARRAY(s_bias)];
1175 static void getBasicTexCoord3D (std::vector<float>& dst, int cellNdx)
1206 float sScale = s_params[cellNdx%DE_LENGTH_OF_ARRAY(s_params)].sScale;
1207 float sBias = s_params[cellNdx%DE_LENGTH_OF_ARRAY(s_params)].sBias;
1208 float tScale = s_params[cellNdx%DE_LENGTH_OF_ARRAY(s_params)].tScale;
1209 float tBias = s_params[cellNdx%DE_LENGTH_OF_ARRAY(s_params)].tBias;
1210 float rScale = s_params[cellNdx%DE_LENGTH_OF_ARRAY(s_params)].rScale;
1211 float rBias = s_params[cellNdx%DE_LENGTH_OF_ARRAY(s_params)].rBias;
1221 static void getAffineTexCoord3D (std::vector<float>& dst, int cellNdx)
1224 getBasicTexCoord3D(dst, cellNdx);
1227 float angleX = 0.0f + 2.0f*DE_PI * ((float)cellNdx / 16.0f);
1228 float angleY = 1.0f + 2.0f*DE_PI * ((float)cellNdx / 32.0f);
1308 const int cellNdx = gridY*gridWidth + gridX;
1315 case COORDTYPE_BASIC: getBasicTexCoord3D (texCoord, cellNdx); break;
1316 case COORDTYPE_AFFINE: getAffineTexCoord3D (texCoord, cellNdx); break;
1322 sampleParams.w = s_projections[cellNdx % DE_LENGTH_OF_ARRAY(s_projections)];
1326 sampleParams.bias = s_bias[cellNdx % DE_LENGTH_OF_ARRAY(s_bias)];
1362 const int cellNdx = gridY*gridWidth + gridX;
1368 case COORDTYPE_BASIC: getBasicTexCoord3D (texCoord, cellNdx); break;
1369 case COORDTYPE_AFFINE: getAffineTexCoord3D (texCoord, cellNdx); break;
1374 sampleParams.w = s_projections[cellNdx % DE_LENGTH_OF_ARRAY(s_projections)];
1377 sampleParams.bias = s_bias[cellNdx % DE_LENGTH_OF_ARRAY(s_bias)];
1430 virtual void setTextureParams (int cellNdx) = DE_NULL;
1431 virtual void getReferenceParams (ReferenceParams& params, int cellNdx
1536 int cellNdx = gridY*gridWidth + gridX;
1539 getBasicTexCoord2D(texCoord, cellNdx);
1542 setTextureParams(cellNdx);
1576 const int cellNdx = gridY*gridWidth + gridX;
1578 getBasicTexCoord2D(texCoord, cellNdx);
1579 getReferenceParams(sampleParams, cellNdx);
1627 void setTextureParams (int cellNdx)
1630 gl.texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, getMinLodForCell(cellNdx));
1633 void getReferenceParams (ReferenceParams& params, int cellNdx)
1635 params.minLod = getMinLodForCell(cellNdx);
1648 void setTextureParams (int cellNdx)
1651 gl.texParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, getMaxLodForCell(cellNdx));
1654 void getReferenceParams (ReferenceParams& params, int cellNdx)
1656 params.maxLod = getMaxLodForCell(cellNdx);
1669 int getBaseLevel (int cellNdx) const
1672 const int baseLevel = (deInt32Hash(cellNdx) ^ deStringHash(getName()) ^ 0xac2f274a) % numLevels;
1677 void setTextureParams (int cellNdx)
1680 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, getBaseLevel(cellNdx));
1683 void getReferenceParams (ReferenceParams& params, int cellNdx)
1685 params.baseLevel = getBaseLevel(cellNdx);
1698 int getMaxLevel (int cellNdx) const
1701 const int maxLevel = (deInt32Hash(cellNdx) ^ deStringHash(getName()) ^ 0x82cfa4e) % numLevels;
1706 void setTextureParams (int cellNdx)
1709 gl.texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, getMaxLevel(cellNdx));
1712 void getReferenceParams (ReferenceParams& params, int cellNdx)
1714 params.maxLevel = getMaxLevel(cellNdx);
1732 virtual void setTextureParams (int cellNdx) = DE_NULL;
1733 virtual void getReferenceParams (ReferenceParams& params, int cellNdx) = DE_NULL;
1839 for (int cellNdx = 0; cellNdx < (int)gridLayout.size(); cellNdx++)
1841 const int curX = gridLayout[cellNdx].x();
1842 const int curY = gridLayout[cellNdx].y();
1843 const int curW = gridLayout[cellNdx].z();
1844 const int curH = gridLayout[cellNdx].w();
1845 const tcu::CubeFace cubeFace = (tcu::CubeFace)(cellNdx % tcu::CUBEFACE_LAST);
1850 setTextureParams(cellNdx);
1884 for (int cellNdx = 0; cellNdx < (int)gridLayout.size(); cellNdx++)
1886 const int curX = gridLayout[cellNdx].x();
1887 const int curY = gridLayout[cellNdx].y();
1888 const int curW = gridLayout[cellNdx].z();
1889 const int curH = gridLayout[cellNdx].w();
1890 const tcu::CubeFace cubeFace = (tcu::CubeFace)(cellNdx % tcu::CUBEFACE_LAST);
1893 getReferenceParams(params, cellNdx);
1942 void setTextureParams (int cellNdx)
1945 gl.texParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_LOD, getMinLodForCell(cellNdx));
1948 void getReferenceParams (ReferenceParams& params, int cellNdx)
1950 params.minLod = getMinLodForCell(cellNdx);
1963 void setTextureParams (int cellNdx)
1966 gl.texParameterf(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LOD, getMaxLodForCell(cellNdx));
1969 void getReferenceParams (ReferenceParams& params, int cellNdx)
1971 params.maxLod = getMaxLodForCell(cellNdx);
1984 int getBaseLevel (int cellNdx) const
1987 const int baseLevel = (deInt32Hash(cellNdx) ^ deStringHash(getName()) ^ 0x23fae13) % numLevels;
1992 void setTextureParams (int cellNdx)
1995 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_BASE_LEVEL, getBaseLevel(cellNdx));
1998 void getReferenceParams (ReferenceParams& params, int cellNdx)
2000 params.baseLevel = getBaseLevel(cellNdx);
2013 int getMaxLevel (int cellNdx) const
2016 const int maxLevel = (deInt32Hash(cellNdx) ^ deStringHash(getName()) ^ 0x974e21) % numLevels;
2021 void setTextureParams (int cellNdx)
2024 gl.texParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAX_LEVEL, getMaxLevel(cellNdx));
2027 void getReferenceParams (ReferenceParams& params, int cellNdx)
2029 params.maxLevel = getMaxLevel(cellNdx);
2047 virtual void setTextureParams (int cellNdx) = DE_NULL;
2048 virtual void getReferenceParams (ReferenceParams& params, int cellNdx) = DE_NULL;
2167 int cellNdx = gridY*gridWidth + gridX;
2170 getBasicTexCoord3D(texCoord, cellNdx);
2172 setTextureParams(cellNdx);
2208 const int cellNdx = gridY*gridWidth + gridX;
2210 getBasicTexCoord3D(texCoord, cellNdx);
2211 getReferenceParams(sampleParams, cellNdx);
2259 void setTextureParams (int cellNdx)
2262 gl.texParameterf(GL_TEXTURE_3D, GL_TEXTURE_MIN_LOD, getMinLodForCell(cellNdx));
2265 void getReferenceParams (ReferenceParams& params, int cellNdx)
2267 params.minLod = getMinLodForCell(cellNdx);
2280 void setTextureParams (int cellNdx)
2283 gl.texParameterf(GL_TEXTURE_3D, GL_TEXTURE_MAX_LOD, getMaxLodForCell(cellNdx));
2286 void getReferenceParams (ReferenceParams& params, int cellNdx)
2288 params.maxLod = getMaxLodForCell(cellNdx);
2301 int getBaseLevel (int cellNdx) const
2304 const int baseLevel = (deInt32Hash(cellNdx) ^ deStringHash(getName()) ^ 0x7347e9) % numLevels;
2309 void setTextureParams (int cellNdx)
2312 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_BASE_LEVEL, getBaseLevel(cellNdx));
2315 void getReferenceParams (ReferenceParams& params, int cellNdx)
2317 params.baseLevel = getBaseLevel(cellNdx);
2330 int getMaxLevel (int cellNdx) const
2333 const int maxLevel = (deInt32Hash(cellNdx) ^ deStringHash(getName()) ^ 0x9111e7) % numLevels;
2338 void setTextureParams (int cellNdx)
2341 gl.texParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAX_LEVEL, getMaxLevel(cellNdx));
2344 void getReferenceParams (ReferenceParams& params, int cellNdx)
2346 params.maxLevel = getMaxLevel(cellNdx);