Lines Matching refs:format

125  * @param format       Texture internal format
130 void SparseTextureUtils::getTexturePageSizes(const glw::Functions& gl, glw::GLint target, glw::GLint format,
133 gl.getInternalformativ(target, format, GL_VIRTUAL_PAGE_SIZE_X_ARB, 1, &pageSizeX);
136 gl.getInternalformativ(target, format, GL_VIRTUAL_PAGE_SIZE_Y_ARB, 1, &pageSizeY);
139 gl.getInternalformativ(target, format, GL_VIRTUAL_PAGE_SIZE_Z_ARB, 1, &pageSizeZ);
220 * @param internal_format Internal format of texture
261 * @param format Format of data
265 void Texture::GetData(const glw::Functions& gl, glw::GLint level, glw::GLenum target, glw::GLenum format,
268 gl.getTexImage(target, level, format, type, out_data);
282 * @param format Format of data
287 glw::GLint z, glw::GLsizei width, glw::GLsizei height, glw::GLsizei depth, glw::GLenum format,
293 gl.texSubImage1D(target, level, x, width, format, type, pixels);
296 gl.texSubImage2D(target, level, x, y, width, depth, format, type, pixels);
300 gl.texSubImage2D(target, level, x, y, width, height, format, type, pixels);
303 gl.texSubImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, level, x, y, width, height, format, type, pixels);
304 gl.texSubImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, level, x, y, width, height, format, type, pixels);
305 gl.texSubImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, level, x, y, width, height, format, type, pixels);
306 gl.texSubImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, level, x, y, width, height, format, type, pixels);
307 gl.texSubImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, level, x, y, width, height, format, type, pixels);
308 gl.texSubImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, level, x, y, width, height, format, type, pixels);
313 gl.texSubImage3D(target, level, x, y, z, width, height, depth, format, type, pixels);
881 const GLint& format = *formIter;
884 gl.getInternalformativ(target, format, GL_NUM_VIRTUAL_PAGE_SIZES_ARB, 1, &value);
889 << ", format: " << format << " returns wrong value: " << value << " - ";
899 SparseTextureUtils::getTexturePageSizes(gl, target, format, pageSizeX, pageSizeY, pageSizeZ);
1095 const GLint& format = *formIter;
1098 mLog << "Testing sparse texture allocation for target: " << target << ", format: " << format << " - ";
1100 result = positiveTesting(gl, target, format) && verifyTexParameterErrors(gl, target, format) &&
1101 verifyTexStorageVirtualPageSizeIndexError(gl, target, format) &&
1102 verifyTexStorageFullArrayCubeMipmapsError(gl, target, format) &&
1103 verifyTexStorageInvalidValueErrors(gl, target, format);
1122 const GLint& format = *formIter;
1125 mLog << "Testing sparse texture allocation for target [full array]: " << target << ", format: " << format
1128 result = verifyTexStorageFullArrayCubeMipmapsError(gl, target, format);
1143 /** Testing if texStorage* functionality added in ARB_sparse_texture extension works properly for given target and internal format
1147 * @param format Texture internal format
1151 bool SparseTextureAllocationTestCase::positiveTesting(const Functions& gl, GLint target, GLint format)
1164 SparseTextureUtils::getTexturePageSizes(gl, target, format, pageSizeX, pageSizeY, pageSizeZ);
1182 Texture::Storage(gl, target, 1, format, pageSizeX, pageSizeY, depth * pageSizeZ);
1193 /** Verifies if texParameter* generate proper errors for given target and internal format.
1197 * @param format Texture internal format
1201 bool SparseTextureAllocationTestCase::verifyTexParameterErrors(const Functions& gl, GLint target, GLint format)
1215 Texture::Storage(gl, target, 1, format, 8, 8, depth);
1232 // Test error only if texture is immutable format, otherwise skip
1295 /** Verifies if texStorage* generate proper error for given target and internal format when
1300 * @param format Texture internal format
1305 GLint format)
1324 gl.getInternalformativ(target, format, GL_NUM_VIRTUAL_PAGE_SIZES_ARB, 1, &numPageSizes);
1343 Texture::Storage(gl, target, 1, format, 8, 8, depth);
1354 /** Verifies if texStorage* generate proper errors for given target and internal format and
1359 * @param format Texture internal format
1364 GLint format)
1391 SparseTextureUtils::getTexturePageSizes(gl, target, format, pageSizeX, pageSizeY, pageSizeZ);
1406 Texture::Storage(gl, target, levels, format, widthHeight + pageSize, widthHeight + pageSize, depth);
1412 Texture::Storage(gl, target, levels, format, width + pageSizeX, height, depth);
1418 Texture::Storage(gl, target, levels, format, width, height + pageSizeY, depth);
1430 /** Verifies if texStorage* generate proper errors for given target and internal format when
1435 * @param format Texture internal format
1440 GLint format)
1452 SparseTextureUtils::getTexturePageSizes(gl, target, format, pageSizeX, pageSizeY, pageSizeZ);
1476 Texture::Storage(gl, target, 1, format, width + max3DTextureSize, height, depth);
1484 Texture::Storage(gl, target, 1, format, width, height + max3DTextureSize, depth);
1508 Texture::Storage(gl, target, 1, format, width, height, depth + max3DTextureSize);
1531 Texture::Storage(gl, target, 1, format, width + maxTextureSize, height, depth);
1541 Texture::Storage(gl, target, 1, format, width, height + maxTextureSize, depth);
1562 Texture::Storage(gl, target, 1, format, width, height, depth + maxArrayTextureLayers);
1576 Texture::Storage(gl, target, 1, format, pageSizeX + 1, height, depth);
1586 Texture::Storage(gl, target, 1, format, width, pageSizeY + 1, depth);
1596 Texture::Storage(gl, target, 1, format, width, height, pageSizeZ + 1);
1712 const GLint& format = *formIter;
1714 if (!caseAllowed(target, format))
1718 mLog << "Testing sparse texture commitment for target: " << target << ", format: " << format << " - ";
1721 sparseAllocateTexture(gl, target, format, texture, 3);
1723 writeDataToTexture(gl, target, format, texture, l);
1728 if (commitTexturePage(gl, target, format, texture, l))
1730 writeDataToTexture(gl, target, format, texture, l);
1731 result = verifyTextureData(gl, target, format, texture, l);
1741 result = result && verifyInvalidOperationErrors(gl, target, format, texture);
1742 result = result && verifyInvalidValueErrors(gl, target, format, texture);
1761 * @param format Texture internal format
1771 void SparseTextureCommitmentTestCase::texPageCommitment(const glw::Functions& gl, glw::GLint target, glw::GLint format,
1776 DE_UNREF(format);
1782 /** Check if specific combination of target and format is allowed
1785 * @param format Texture internal format
1787 * @return Returns true if target/format combination is allowed, false otherwise.
1789 bool SparseTextureCommitmentTestCase::caseAllowed(GLint target, GLint format)
1792 DE_UNREF(format);
1800 * @param format Texture internal format
1805 bool SparseTextureCommitmentTestCase::prepareTexture(const Functions& gl, GLint target, GLint format, GLuint& texture)
1811 SparseTextureUtils::getTexturePageSizes(gl, target, format, mState.pageSizeX, mState.pageSizeY, mState.pageSizeZ);
1826 mState.format = glu::mapGLInternalFormat(format);
1835 * @param format Texture internal format
1841 bool SparseTextureCommitmentTestCase::sparseAllocateTexture(const Functions& gl, GLint target, GLint format,
1846 prepareTexture(gl, target, format, texture);
1854 Texture::Storage(gl, target, mState.levels, format, mState.width, mState.height, mState.depth);
1864 * @param format Texture internal format
1870 bool SparseTextureCommitmentTestCase::allocateTexture(const Functions& gl, GLint target, GLint format, GLuint& texture,
1875 prepareTexture(gl, target, format, texture);
1883 Texture::Storage(gl, target, mState.levels, format, mState.width, mState.height, mState.depth);
1893 * @param format Texture internal format
1898 bool SparseTextureCommitmentTestCase::writeDataToTexture(const Functions& gl, GLint target, GLint format,
1901 DE_UNREF(format);
1909 TransferFormat transferFormat = glu::getTransferFormat(mState.format);
1918 GLint texSize = width * height * depth * mState.format.getPixelSize();
1926 Texture::SubImage(gl, target, level, 0, 0, 0, width, height, depth, transferFormat.format,
1938 * @param format Texture internal format
1944 bool SparseTextureCommitmentTestCase::verifyTextureData(const Functions& gl, GLint target, GLint format,
1947 DE_UNREF(format);
1955 TransferFormat transferFormat = glu::getTransferFormat(mState.format);
1972 GLint texSize = width * height * depth * mState.format.getPixelSize();
1984 Texture::GetData(gl, level, target, transferFormat.format, transferFormat.dataType, (GLvoid*)out_data);
1992 int pixelSize = mState.format.getPixelSize();
2010 GLint texSize = width * height * mState.format.getPixelSize();
2030 Texture::GetData(gl, level, subTarget, transferFormat.format, transferFormat.dataType, (GLvoid*)out_data);
2038 int pixelSize = mState.format.getPixelSize();
2057 * @param format Texture internal format
2063 bool SparseTextureCommitmentTestCase::commitTexturePage(const Functions& gl, GLint target, GLint format,
2089 texPageCommitment(gl, target, format, texture, level, 0, 0, 0, widthCommitted, height, depth, GL_TRUE);
2152 * @param format Texture internal format
2157 bool SparseTextureCommitmentTestCase::verifyInvalidOperationErrors(const Functions& gl, GLint target, GLint format,
2178 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.pageSizeX, mState.pageSizeY, mState.pageSizeZ,
2189 allocateTexture(gl, target, format, texture, 1);
2191 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.pageSizeX, mState.pageSizeY, mState.pageSizeZ,
2200 sparseAllocateTexture(gl, target, format, texture, 1);
2203 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.width + mState.pageSizeX, mState.height,
2210 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.width, mState.height + mState.pageSizeY,
2219 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.width, mState.height,
2230 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, 1, mState.pageSizeY, mState.pageSizeZ, GL_TRUE);
2240 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.pageSizeX, 1, mState.pageSizeZ, GL_TRUE);
2252 texPageCommitment(gl, target, format, texture, 0, 0, 0, 0, mState.pageSizeX, mState.pageSizeY,
2273 * @param format Texture internal format
2278 bool SparseTextureCommitmentTestCase::verifyInvalidValueErrors(const Functions& gl, GLint target, GLint format,
2285 sparseAllocateTexture(gl, target, format, texture, 1);
2290 texPageCommitment(gl, target, format, texture, 0, 1, 0, 0, mState.pageSizeX, mState.pageSizeY, mState.pageSizeZ,
2300 texPageCommitment(gl, target, format, texture, 0, 0, 1, 0, mState.pageSizeX, mState.pageSizeY, mState.pageSizeZ,
2311 texPageCommitment(gl, target, format, texture, 0, 0, 0, mState.minDepth, mState.pageSizeX, mState.pageSizeY,
2370 const GLint& format = *formIter;
2373 mLog << "Testing DSA sparse texture commitment for target: " << target << ", format: " << format << " - ";
2376 sparseAllocateTexture(gl, target, format, texture, 3);
2379 if (commitTexturePage(gl, target, format, texture, l))
2381 writeDataToTexture(gl, target, format, texture, l);
2382 result = verifyTextureData(gl, target, format, texture, l);
2392 result = result && verifyInvalidOperationErrors(gl, target, format, texture);
2393 result = result && verifyInvalidValueErrors(gl, target, format, texture);
2412 * @param format Texture internal format
2423 glw::GLint format, glw::GLuint& texture, GLint level,
2428 DE_UNREF(format);