Lines Matching defs:target
410 const GLint& target = *iter;
418 if (target == GL_TEXTURE_BUFFER) {
441 SparseTextureUtils::getTexturePageSizes(gl, target, format.first, pageSizeX, pageSizeY, pageSizeZ);
445 m_testCtx.getLog() << tcu::TestLog::Message << "Standard Virtual Page Size mismatch, target: " << target
592 * @param target Target for which texture is binded
596 * @return target Structure of token strings
599 GLint target, GLint verifyTarget, GLint format, GLint sample, const std::string outputBase, const std::string inputBase)
868 if (target == GL_TEXTURE_1D)
874 else if (target == GL_TEXTURE_1D_ARRAY)
880 else if (target == GL_TEXTURE_2D_ARRAY)
886 else if (target == GL_TEXTURE_3D)
893 else if (target == GL_TEXTURE_CUBE_MAP)
899 else if (target == GL_TEXTURE_CUBE_MAP_ARRAY)
905 else if (target == GL_TEXTURE_RECTANGLE)
909 else if (target == GL_TEXTURE_2D_MULTISAMPLE)
914 else if (target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
933 /** Check if specific combination of target and format is allowed
935 * @param target Target for which texture is binded
938 * @return Returns true if target/format combination is allowed, false otherwise.
940 bool SparseTexture2CommitmentTestCase::caseAllowed(GLint target, GLint format)
944 if ((target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) &&
956 * @param target Target for which texture is binded
963 bool SparseTexture2CommitmentTestCase::sparseAllocateTexture(const Functions& gl, GLint target, GLint format,
968 prepareTexture(gl, target, format, texture);
970 gl.texParameteri(target, GL_TEXTURE_SPARSE_ARB, GL_TRUE);
974 if (target != GL_TEXTURE_RECTANGLE && target != GL_TEXTURE_2D_MULTISAMPLE &&
975 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
982 if (target != GL_TEXTURE_2D_MULTISAMPLE && target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
989 Texture::Storage(gl, target, deMax32(mState.levels, mState.samples), format, mState.width, mState.height,
999 * @param target Target for which texture is binded
1006 bool SparseTexture2CommitmentTestCase::allocateTexture(const Functions& gl, GLint target, GLint format, GLuint& texture,
1011 prepareTexture(gl, target, format, texture);
1014 if (target != GL_TEXTURE_RECTANGLE && target != GL_TEXTURE_2D_MULTISAMPLE &&
1015 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1023 if (target != GL_TEXTURE_2D_MULTISAMPLE && target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1030 Texture::Storage(gl, target, deMax32(mState.levels, mState.samples), format, mState.width, mState.height,
1040 * @param target Target for which texture is binded
1046 bool SparseTexture2CommitmentTestCase::writeDataToTexture(const Functions& gl, GLint target, GLint format,
1059 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1063 if (target == GL_TEXTURE_CUBE_MAP)
1074 if (target != GL_TEXTURE_2D_MULTISAMPLE && target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1076 Texture::SubImage(gl, target, level, 0, 0, 0, width, height, depth, transferFormat.format,
1089 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
1093 TokenStrings s = createShaderTokens(target, verifyTarget, format, sample);
1123 mLog << "Compute shader compilation failed (writing) for target: " << target
1138 * @param target Target for which texture is binded
1145 bool SparseTexture2CommitmentTestCase::verifyTextureData(const Functions& gl, GLint target, GLint format,
1158 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1168 if (target != GL_TEXTURE_CUBE_MAP && target != GL_TEXTURE_2D_MULTISAMPLE &&
1169 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1183 Texture::GetData(gl, level, target, transferFormat.format, transferFormat.dataType, (GLvoid*)out_data);
1198 else if (target == GL_TEXTURE_CUBE_MAP)
1248 else if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1263 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
1286 TokenStrings s = createShaderTokens(target, verifyTarget, format, sample);
1352 mLog << "Compute shader compilation failed (reading) for target: " << target << ", format: " << format
1417 const GLint& target = *iter;
1424 if (!caseAllowed(target, format))
1428 mLog << "Testing uncommitted regions access for target: " << target << ", format: " << format << " - ";
1430 sparseAllocateTexture(gl, target, format, texture, 3);
1433 if (commitTexturePage(gl, target, format, texture, l))
1435 writeDataToTexture(gl, target, format, texture, l);
1436 result = result && UncommittedReads(gl, target, format, texture, l);
1437 result = result && UncommittedAtomicOperations(gl, target, format, texture, l);
1461 * @param target Target for which texture is binded
1466 bool UncommittedRegionsAccessTestCase::readsAllowed(GLint target, GLint format, bool shaderOnly)
1468 DE_UNREF(target);
1480 * @param target Target for which texture is binded
1485 bool UncommittedRegionsAccessTestCase::atomicAllowed(GLint target, GLint format)
1487 DE_UNREF(target);
1499 * @param target Target for which texture is binded
1504 bool UncommittedRegionsAccessTestCase::depthStencilAllowed(GLint target, GLint format)
1506 if (target == GL_TEXTURE_2D && format == GL_RGBA8)
1517 * @param target Target for which texture is binded
1524 bool UncommittedRegionsAccessTestCase::UncommittedReads(const Functions& gl, GLint target, GLint format,
1530 if (readsAllowed(target, format, false))
1533 result = result && verifyTextureDataExtended(gl, target, format, texture, level, false);
1537 if (result && readsAllowed(target, format, true))
1540 result = result && verifyTextureDataExtended(gl, target, format, texture, level, true);
1544 if (result && level == 0 && target != GL_TEXTURE_RECTANGLE && target != GL_TEXTURE_2D_MULTISAMPLE &&
1545 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1573 Texture::Bind(gl, texture, target);
1574 gl.generateMipmap(target);
1578 result = result && verifyTextureDataExtended(gl, target, format, texture, level, false);
1587 * @param target Target for which texture is binded
1594 bool UncommittedRegionsAccessTestCase::UncommittedAtomicOperations(const Functions& gl, GLint target, GLint format,
1599 if (atomicAllowed(target, format))
1602 result = result && verifyAtomicOperations(gl, target, format, texture, level);
1611 * @param target Target for which texture is binded
1618 bool UncommittedRegionsAccessTestCase::UncommittedDepthStencil(const Functions& gl, GLint target, GLint format,
1621 if (!depthStencilAllowed(target, format))
1631 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1646 mLog << "Shader compilation failed (depth_stencil) for target: " << target << ", format: " << format
1661 Texture::Bind(gl, texture, target);
1731 * @param target Target for which texture is binded
1739 bool UncommittedRegionsAccessTestCase::verifyTextureDataExtended(const Functions& gl, GLint target, GLint format,
1752 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
1763 if (!shaderOnly && target != GL_TEXTURE_CUBE_MAP && target != GL_TEXTURE_2D_MULTISAMPLE &&
1764 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
1779 Texture::GetData(gl, level, target, transferFormat.format, transferFormat.dataType, (GLvoid*)out_data);
1805 else if (!shaderOnly && target == GL_TEXTURE_CUBE_MAP)
1869 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
1874 if (target == GL_TEXTURE_CUBE_MAP)
1877 target = GL_TEXTURE_2D;
1909 TokenStrings s = createShaderTokens(target, verifyTarget, format, sample);
1975 mLog << "Compute shader compilation failed (reading) for target: " << target << ", format: " << format
1992 * @param target Target for which texture is binded
1999 bool UncommittedRegionsAccessTestCase::verifyAtomicOperations(const Functions& gl, GLint target, GLint format,
2010 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
2022 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
2026 if (target == GL_TEXTURE_CUBE_MAP)
2029 target = GL_TEXTURE_2D;
2061 TokenStrings s = createShaderTokens(target, verifyTarget, format, sample);
2129 mLog << "Compute shader compilation failed (atomic) for target: " << target << ", format: " << format
2423 const GLint& target = *iter;
2430 if (!caseAllowed(target, format))
2436 // Check if target is allowed for current lookup function
2438 if (!funcAllowed(target, format, funcToken))
2442 mLog << "Testing sparse texture lookup functions for target: " << target << ", format: " << format
2445 sparseAllocateTexture(gl, target, format, texture, 3);
2447 setupDepthMode(gl, target, texture);
2451 if (commitTexturePage(gl, target, format, texture, l))
2453 writeDataToTexture(gl, target, format, texture, l);
2454 result = result && verifyLookupTextureData(gl, target, format, texture, l, funcToken);
2479 * @param target Target for which texture is binded
2488 GLint target, GLint verifyTarget, GLint format, GLint level, GLint sample, FunctionToken& funcToken)
2503 TokenStrings ss = createShaderTokens(target, verifyTarget, format, sample, "image", inputType);
2524 if (inputType == "sampler" && target != GL_TEXTURE_3D && target != GL_TEXTURE_2D_MULTISAMPLE &&
2525 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
2536 if (target == GL_TEXTURE_1D)
2543 else if (target == GL_TEXTURE_1D_ARRAY)
2550 else if (target == GL_TEXTURE_2D_ARRAY)
2554 else if (target == GL_TEXTURE_3D)
2559 else if (target == GL_TEXTURE_CUBE_MAP)
2564 else if (target == GL_TEXTURE_CUBE_MAP_ARRAY)
2570 else if (target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
2575 if ((target == GL_TEXTURE_CUBE_MAP || target == GL_TEXTURE_CUBE_MAP_ARRAY) &&
2597 // Extend coord type dimension and coord vector definition if shadow sampler and non-cube map array target selected
2601 if (target != GL_TEXTURE_CUBE_MAP_ARRAY)
2618 if (target != GL_TEXTURE_RECTANGLE && target != GL_TEXTURE_2D_MULTISAMPLE &&
2619 target != GL_TEXTURE_2D_MULTISAMPLE_ARRAY)
2626 if (target == GL_TEXTURE_RECTANGLE || funcName.find("Fetch") != std::string::npos ||
2639 else if (s.coordType == "vec2" && target == GL_TEXTURE_1D_ARRAY)
2651 if (s.coordType == "vec3" && target == GL_TEXTURE_1D)
2653 else if (s.coordType == "vec3" && target == GL_TEXTURE_1D_ARRAY)
2669 /** Check if specific combination of target and format is
2672 * @param target Target for which texture is binded
2675 * @return Returns true if target/format combination is allowed, false otherwise.
2677 bool SparseTexture2LookupTestCase::caseAllowed(GLint target, GLint format)
2679 DE_UNREF(target);
2687 if ((target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY || target == GL_TEXTURE_3D) &&
2696 /** Check if specific lookup function is allowed for specific target and format
2698 * @param target Target for which texture is binded
2702 * @return Returns true if target/format combination is allowed, false otherwise.
2704 bool SparseTexture2LookupTestCase::funcAllowed(GLint target, GLint format, FunctionToken& funcToken)
2706 if (funcToken.allowedTargets.find(target) == funcToken.allowedTargets.end())
2713 if (target != GL_TEXTURE_2D)
2719 if (target != GL_TEXTURE_2D && target != GL_TEXTURE_2D_ARRAY && target != GL_TEXTURE_RECTANGLE)
2730 if (target == GL_TEXTURE_CUBE_MAP_ARRAY)
2745 * @param target Target for which texture is binded
2751 bool SparseTexture2LookupTestCase::writeDataToTexture(const Functions& gl, GLint target, GLint format, GLuint& texture,
2762 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
2766 if (target == GL_TEXTURE_CUBE_MAP)
2783 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
2787 TokenStrings s = createShaderTokens(target, verifyTarget, format, sample);
2821 mLog << "Compute shader compilation failed (writing) for target: " << target << ", format: " << format
2834 * @param target Target for which texture is binded
2837 void SparseTexture2LookupTestCase::setupDepthMode(const Functions& gl, GLint target, GLuint& texture)
2839 Texture::Bind(gl, texture, target);
2840 gl.texParameteri(target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_REF_TO_TEXTURE);
2842 gl.texParameteri(target, GL_TEXTURE_COMPARE_FUNC, GL_ALWAYS);
2849 * @param target Target for which texture is binded
2857 bool SparseTexture2LookupTestCase::verifyLookupTextureData(const Functions& gl, GLint target, GLint format,
2868 SparseTextureUtils::getTextureLevelSize(target, mState, level, width, height, depth);
2878 if (target == GL_TEXTURE_CUBE_MAP)
2898 if (target == GL_TEXTURE_2D_MULTISAMPLE || target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE)
2921 TokenStringsExt s = createLookupShaderTokens(target, verifyTarget, format, level, sample, f);
2981 gl.bindTexture(target, texture);
3030 mLog << "Compute shader compilation failed (lookup) for target: " << target << ", format: " << format