Lines Matching refs:target
249 /** Check if specific lookup function is allowed for specific target and format
251 * @param target Target for which texture is binded
255 * @return Returns true if target/format combination is allowed, false otherwise.
257 bool SparseTextureClampLookupResidencyTestCase::funcAllowed(GLint target, GLint format, FunctionToken& funcToken)
259 if (funcToken.allowedTargets.find(target) == funcToken.allowedTargets.end())
264 if (target == GL_TEXTURE_CUBE_MAP_ARRAY &&
275 * @param target Target for which texture is binded
283 bool SparseTextureClampLookupResidencyTestCase::verifyLookupTextureData(const Functions& gl, GLint target, GLint format,
295 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
305 if (target == GL_TEXTURE_CUBE_MAP)
347 TokenStringsExt s = createLookupShaderTokens(target, verifyTarget, format, level, sample, f);
412 gl.bindTexture(target, texture);
414 gl.texParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
415 gl.texParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
418 draw(target, z, program);
443 mLog << "Shader compilation failed (lookup residency) for target: " << target << ", format: " << format
464 void SparseTextureClampLookupResidencyTestCase::draw(GLint target, GLint layer, const ShaderProgram& program)
500 if (target == GL_TEXTURE_1D || target == GL_TEXTURE_1D_ARRAY)
502 else if (target == GL_TEXTURE_3D)
504 else if (target == GL_TEXTURE_CUBE_MAP)
506 else if (target == GL_TEXTURE_CUBE_MAP_ARRAY)
629 const GLint& target = *iter;
636 if (!caseAllowed(target, format))
642 // Check if target is allowed for current lookup function
644 if (!funcAllowed(target, format, funcToken))
652 mLog << "Testing sparse texture lookup color functions for target: " << target << ", format: " << format
656 sparseAllocateTexture(gl, target, format, texture, 3);
658 allocateTexture(gl, target, format, texture, 3);
661 setupDepthMode(gl, target, texture);
667 if (!isSparse || commitTexturePage(gl, target, format, texture, l))
669 writeDataToTexture(gl, target, format, texture, l);
676 result = result && verifyLookupTextureData(gl, target, format, texture, l, funcToken);
701 * @param target Target for which texture is binded
707 bool SparseTextureClampLookupColorTestCase::writeDataToTexture(const Functions& gl, GLint target, GLint format,
718 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
722 if (target == GL_TEXTURE_CUBE_MAP)
739 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
743 TokenStrings s = createShaderTokens(target, verifyTarget, format, sample);
780 mLog << "Compute shader compilation failed (writing) for target: " << target << ", format: " << format
793 * @param target Target for which texture is binded
801 bool SparseTextureClampLookupColorTestCase::verifyLookupTextureData(const Functions& gl, GLint target, GLint format,
813 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
820 if (target == GL_TEXTURE_CUBE_MAP)
864 TokenStringsExt s = createLookupShaderTokens(target, verifyTarget, format, level, sample, f);
930 gl.bindTexture(target, texture);
932 gl.texParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
933 gl.texParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
936 draw(target, z, program);
955 mLog << "Shader compilation failed (lookup color) for target: " << target << ", format: " << format
979 * @param target Target for which texture is binded
985 bool SparseTextureClampLookupColorTestCase::prepareTexture(const Functions& gl, GLint target, GLint format,
989 Texture::Bind(gl, texture, target);
991 mState.minDepth = SparseTextureUtils::getTargetDepth(target);
992 SparseTextureUtils::getTexturePageSizes(gl, target, format, mState.pageSizeX, mState.pageSizeY, mState.pageSizeZ);
995 if (target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_CUBE_MAP_ARRAY)
1015 * @param target Target for which texture is binded
1022 bool SparseTextureClampLookupColorTestCase::commitTexturePage(const Functions& gl, GLint target, GLint format,
1031 if (!isInPageSizesRange(target, level) || !isPageSizesMultiplication(target, level))
1040 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1042 if (target == GL_TEXTURE_CUBE_MAP)
1045 Texture::Bind(gl, texture, target);
1046 texPageCommitment(gl, target, format, texture, level, 0, 0, 0, width, height, depth, GL_TRUE);
1054 * @param target Target for which texture is binded
1059 bool SparseTextureClampLookupColorTestCase::isInPageSizesRange(GLint target, GLint level)
1064 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1066 if (target == GL_TEXTURE_CUBE_MAP)
1079 * @param target Target for which texture is binded
1084 bool SparseTextureClampLookupColorTestCase::isPageSizesMultiplication(GLint target, GLint level)
1089 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1091 if (target == GL_TEXTURE_CUBE_MAP)