Lines Matching defs:depth
533 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, int width, int height, int depth, const void* data)
537 , m_depth (depth)
544 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, int width, int height, int depth, int rowPitch, int slicePitch, const void* data)
548 , m_depth (depth)
566 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, int width, int height, int depth, void* data)
567 : ConstPixelBufferAccess(format, width, height, depth, data)
571 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, int width, int height, int depth, int rowPitch, int slicePitch, void* data)
572 : ConstPixelBufferAccess(format, width, height, depth, rowPitch, slicePitch, data)
717 // \note Returns bit-representation of depth floating-point value.
1002 void PixelBufferAccess::setPixDepth (float depth, int x, int y, int z) const
1018 case TextureFormat::D: *((deUint32*)pixelPtr) = PN(depth, 8, 24); break;
1019 case TextureFormat::DS: *((deUint32*)pixelPtr) = (*((deUint32*)pixelPtr) & 0x000000ff) | PN(depth, 8, 24); break;
1027 *((float*)pixelPtr) = depth;
1032 floatToChannel(pixelPtr, depth, m_format.type);
1172 // depth internal formats cannot be non-normalized integers
1255 static Vec4 sampleNearest2D (const ConstPixelBufferAccess& access, const Sampler& sampler, float u, float v, int depth)
1271 return lookup(access, i, j, depth);
1297 int depth = access.getDepth();
1306 (sampler.wrapR == Sampler::CLAMP_TO_BORDER && !deInBounds32(z, 0, depth)))
1311 int k = wrap(sampler.wrapR, z, depth);
1320 int depth = access.getDepth();
1329 (sampler.wrapR == Sampler::CLAMP_TO_BORDER && !deInBounds32(z, 0, depth)))
1334 int k = wrap(sampler.wrapR, z, depth);
1385 static Vec4 sampleLinear2D (const ConstPixelBufferAccess& access, const Sampler& sampler, float u, float v, int depth)
1409 Vec4 p00 = (i0UseBorder || j0UseBorder) ? sampler.borderColor : lookup(access, i0, j0, depth);
1410 Vec4 p10 = (i1UseBorder || j0UseBorder) ? sampler.borderColor : lookup(access, i1, j0, depth);
1411 Vec4 p01 = (i0UseBorder || j1UseBorder) ? sampler.borderColor : lookup(access, i0, j1, depth);
1412 Vec4 p11 = (i1UseBorder || j1UseBorder) ? sampler.borderColor : lookup(access, i1, j1, depth);
1530 int depth = access.getDepth();
1543 int k0 = wrap(sampler.wrapR, z0, depth);
1544 int k1 = wrap(sampler.wrapR, z1, depth);
1554 bool k0UseBorder = sampler.wrapR == Sampler::CLAMP_TO_BORDER && !de::inBounds(k0, 0, depth);
1555 bool k1UseBorder = sampler.wrapR == Sampler::CLAMP_TO_BORDER && !de::inBounds(k1, 0, depth);
1582 int depth = access.getDepth();
1595 int k0 = wrap(sampler.wrapR, z0, depth);
1596 int k1 = wrap(sampler.wrapR, z1, depth);
1606 bool k0UseBorder = sampler.wrapR == Sampler::CLAMP_TO_BORDER && !de::inBounds(k0, 0, depth);
1607 bool k1UseBorder = sampler.wrapR == Sampler::CLAMP_TO_BORDER && !de::inBounds(k1, 0, depth);
1650 Vec4 ConstPixelBufferAccess::sample2D (const Sampler& sampler, Sampler::FilterMode filter, float s, float t, int depth) const
1652 DE_ASSERT(de::inBounds(depth, 0, m_depth));
1666 case Sampler::NEAREST: return sampleNearest2D (*this, sampler, u, v, depth);
1667 case Sampler::LINEAR: return sampleLinear2D (*this, sampler, u, v, depth);
1832 TextureLevel::TextureLevel (const TextureFormat& format, int width, int height, int depth)
1838 setSize(width, height, depth);
1845 void TextureLevel::setStorage (const TextureFormat& format, int width, int height, int depth)
1848 setSize(width, height, depth);
1851 void TextureLevel::setSize (int width, int height, int depth)
1857 m_depth = depth;
1862 Vec4 sampleLevelArray1D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, int depth, float lod)
1869 case Sampler::NEAREST: return levels[0].sample1D(sampler, filterMode, s, depth);
1870 case Sampler::LINEAR: return levels[0].sample1D(sampler, filterMode, s, depth);
1879 return levels[level].sample1D(sampler, levelFilter, s, depth);
1890 tcu::Vec4 t0 = levels[level0].sample1D(sampler, levelFilter, s, depth);
1891 tcu::Vec4 t1 = levels[level1].sample1D(sampler, levelFilter, s, depth);
1942 Vec4 sampleLevelArray2D (const ConstPixelBufferAccess* levels, int numLevels, const Sampler& sampler, float s, float t, int depth, float lod)
1949 case Sampler::NEAREST: return levels[0].sample2D(sampler, filterMode, s, t, depth);
1950 case Sampler::LINEAR: return levels[0].sample2D(sampler, filterMode, s, t, depth);
1959 return levels[level].sample2D(sampler, levelFilter, s, t, depth);
1970 tcu::Vec4 t0 = levels[level0].sample2D(sampler, levelFilter, s, t, depth);
1971 tcu::Vec4 t1 = levels[level1].sample2D(sampler, levelFilter, s, t, depth);
2182 Vec4 gatherArray2DOffsets (const ConstPixelBufferAccess& src, const Sampler& sampler, float s, float t, int depth, int componentNdx, const IVec2 (&offsets)[4])
2202 const Vec4 pixel = lookup(src, samplePositions[i].x(), samplePositions[i].y(), depth);
2209 Vec4 gatherArray2DOffsetsCompare (const ConstPixelBufferAccess& src, const Sampler& sampler, float ref, float s, float t, int depth, const IVec2 (&offsets)[4])
2218 const Vec4 gathered = gatherArray2DOffsets(src, noCompareSampler, s, t, depth, 0 /* component 0: depth */, offsets);
2227 static Vec4 sampleCubeSeamlessNearest (const ConstPixelBufferAccess& faceAccess, const Sampler& sampler, float s, float t, int depth)
2232 return faceAccess.sample2D(clampingSampler, Sampler::NEAREST, s, t, depth);
2369 static void getCubeLinearSamples (const ConstPixelBufferAccess (&faceAccesses)[CUBEFACE_LAST], CubeFace baseFace, float u, float v, int depth, Vec4 (&dst)[4])
2394 sampleColors[i] = lookup(faceAccesses[coords.face], coords.s, coords.t, depth);
2428 static Vec4 sampleCubeSeamlessLinear (const ConstPixelBufferAccess (&faceAccesses)[CUBEFACE_LAST], CubeFace baseFace, const Sampler& sampler, float s, float t, int depth)
2446 getCubeLinearSamples(faceAccesses, baseFace, u, v, depth, sampleColors);
2459 static Vec4 sampleLevelArrayCubeSeamless (const ConstPixelBufferAccess* const (&faces)[CUBEFACE_LAST], int numLevels, CubeFace face, const Sampler& sampler, float s, float t, int depth, float lod)
2467 return sampleCubeSeamlessNearest(faces[face][0], sampler, s, t, depth);
2475 return sampleCubeSeamlessLinear(faceAccesses, face, sampler, s, t, depth);
2486 return sampleCubeSeamlessNearest(faces[face][level], sampler, s, t, depth);
2495 return sampleCubeSeamlessLinear(faceAccesses, face, sampler, s, t, depth);
2512 t0 = sampleCubeSeamlessNearest(faces[face][level0], sampler, s, t, depth);
2513 t1 = sampleCubeSeamlessNearest(faces[face][level1], sampler, s, t, depth);
2527 t0 = sampleCubeSeamlessLinear(faceAccesses0, face, sampler, s, t, depth);
2528 t1 = sampleCubeSeamlessLinear(faceAccesses1, face, sampler, s, t, depth);
2540 static float sampleCubeSeamlessNearestCompare (const ConstPixelBufferAccess& faceAccess, const Sampler& sampler, float ref, float s, float t, int depth = 0)
2545 return faceAccess.sample2DCompare(clampingSampler, Sampler::NEAREST, ref, s, t, IVec3(0, 0, depth));
2715 const int depth = (slice * 6) + getCubeArrayFaceIndex(face);
2717 return getSubregion(level, 0, 0, depth, level.getWidth(), level.getHeight(), 1);
2894 inline int computeMipPyramidLevels (int width, int height, int depth)
2896 return deLog2Floor32(de::max(width, de::max(height, depth)))+1;
2959 void TextureLevelPyramid::allocLevel (int levelNdx, int width, int height, int depth)
2961 const int size = m_format.getPixelSize()*width*height*depth;
2966 m_access[levelNdx] = PixelBufferAccess(m_format, width, height, depth, m_data[levelNdx].getPtr());
3088 return sampleLevelArrayCubeSeamless(m_levels, m_numLevels, coords.face, sampler, coords.s, coords.t, 0 /* depth */, lod);
3090 return sampleLevelArray2D(m_levels[coords.face], m_numLevels, sampler, coords.s, coords.t, 0 /* depth */, lod);
3145 const Vec4 gathered = gather(noCompareSampler, s, t, r, 0 /* component 0: depth */);
3444 Texture3D::Texture3D (const TextureFormat& format, int width, int height, int depth)
3445 : TextureLevelPyramid (format, computeMipPyramidLevels(width, height, depth))
3448 , m_depth (depth)
3487 const int depth = getMipPyramidLevelSize(m_depth, levelNdx);
3489 TextureLevelPyramid::allocLevel(levelNdx, width, height, depth);
3538 TextureCubeArray::TextureCubeArray (const TextureFormat& format, int size, int depth)
3541 , m_depth (depth)