Lines Matching defs:depth
107 inline int getNumMipLevels3D (int width, int height, int depth)
109 return deLog2Floor32(de::max(width, de::max(height, depth)))+1;
207 TCU_FAIL("Can't map depth buffer format");
220 TCU_FAIL("Can't map depth buffer format");
959 tcu::ConstPixelBufferAccess ReferenceContext::getUnpack3DAccess (const tcu::TextureFormat& format, int width, int height, int depth, const void* data)
968 return tcu::ConstPixelBufferAccess(format, width, height, depth, rowPitch, slicePitch, ptr);
990 int depth = dst.getDepth();
992 DE_ASSERT(src.getWidth() == width && src.getHeight() == height && src.getDepth() == depth);
998 // copy only depth and stencil
999 for (int z = 0; z < depth; z++)
1009 // copy only depth
1010 for (int z = 0; z < depth; z++)
1041 void ReferenceContext::texImage3D (deUint32 target, int level, deUint32 internalFormat, int width, int height, int depth, int border, deUint32 format, deUint32 type, const void* data)
1045 const bool isDstFloatDepthFormat = (internalFormat == GL_DEPTH_COMPONENT32F || internalFormat == GL_DEPTH32F_STENCIL8); // depth components are limited to [0,1] range
1050 RC_IF_ERROR(width < 0 || height < 0 || depth < 0 || level < 0, GL_INVALID_VALUE, RC_RET_VOID);
1065 RC_IF_ERROR(width > m_limits.maxTexture2DSize || height != 1 || depth != 1, GL_INVALID_VALUE, RC_RET_VOID);
1100 RC_IF_ERROR(width > m_limits.maxTexture2DSize || height > m_limits.maxTexture2DSize || depth != 1, GL_INVALID_VALUE, RC_RET_VOID);
1141 RC_IF_ERROR(width != height || width > m_limits.maxTextureCubeSize || depth != 1, GL_INVALID_VALUE, RC_RET_VOID);
1180 depth > m_limits.maxTexture2DArrayLayers, GL_INVALID_VALUE, RC_RET_VOID);
1193 depth != dst.getDepth(), GL_INVALID_OPERATION, RC_RET_VOID);
1196 texture->allocLevel(level, storageFmt, width, height, depth);
1200 ConstPixelBufferAccess src = getUnpack3DAccess(transferFmt, width, height, depth, unpackPtr);
1219 depth > m_limits.maxTexture3DSize, GL_INVALID_VALUE, RC_RET_VOID);
1232 depth != dst.getDepth(), GL_INVALID_OPERATION, RC_RET_VOID);
1235 texture->allocLevel(level, storageFmt, width, height, depth);
1239 ConstPixelBufferAccess src = getUnpack3DAccess(transferFmt, width, height, depth, unpackPtr);
1258 depth % 6 != 0 ||
1259 depth > m_limits.maxTexture2DArrayLayers, GL_INVALID_VALUE, RC_RET_VOID);
1272 depth != dst.getDepth(), GL_INVALID_OPERATION, RC_RET_VOID);
1275 texture->allocLevel(level, storageFmt, width, height, depth);
1279 ConstPixelBufferAccess src = getUnpack3DAccess(transferFmt, width, height, depth, unpackPtr);
1307 void ReferenceContext::texSubImage3D (deUint32 target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, deUint32 format, deUint32 type, const void* data)
1312 RC_IF_ERROR(width < 0 || height < 0 || depth < 0, GL_INVALID_VALUE, RC_RET_VOID);
1318 ConstPixelBufferAccess src = getUnpack3DAccess(transferFmt, width, height, depth, getPixelUnpackPtr(data));
1330 zoffset + depth > dst.getDepth(),
1333 // depth components are limited to [0,1] range
1335 depthValueFloatClampCopy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1337 tcu::copy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1349 zoffset + depth > dst.getDepth(),
1352 // depth components are limited to [0,1] range
1354 depthValueFloatClampCopy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1356 tcu::copy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1374 zoffset + depth > dst.getDepth(),
1377 // depth components are limited to [0,1] range
1379 depthValueFloatClampCopy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1381 tcu::copy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1393 zoffset + depth > dst.getDepth(),
1396 // depth components are limited to [0,1] range
1398 depthValueFloatClampCopy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1400 tcu::copy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1412 zoffset + depth > dst.getDepth(),
1415 // depth components are limited to [0,1] range
1417 depthValueFloatClampCopy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1419 tcu::copy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1431 zoffset + depth > dst.getDepth(),
1434 // depth components are limited to [0,1] range
1436 depthValueFloatClampCopy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1438 tcu::copy(tcu::getSubregion(dst, xoffset, yoffset, zoffset, width, height, depth), src);
1731 void ReferenceContext::texStorage3D (deUint32 target, int levels, deUint32 internalFormat, int width, int height, int depth)
1750 depth >= m_limits.maxTexture2DArrayLayers, GL_INVALID_VALUE, RC_RET_VOID);
1761 texture.allocLevel(level, storageFmt, levelW, levelH, depth);
1770 depth > m_limits.maxTexture3DSize, GL_INVALID_VALUE, RC_RET_VOID);
1780 int levelD = de::max(1, depth >> level);
1790 depth % 6 != 0 ||
1792 depth >= m_limits.maxTexture2DArrayLayers, GL_INVALID_VALUE, RC_RET_VOID);
1803 texture.allocLevel(level, storageFmt, levelW, levelH, depth);
1993 // Attach to both depth and stencil.
2055 // Attach to both depth and stencil.
2125 // Attach both to depth and stencil.
2637 void ReferenceContext::clearDepthf (float depth)
2639 m_clearDepth = de::clamp(depth, 0.0f, 1.0f);
3058 static inline void writeDepthOnly (const rr::MultisamplePixelBufferAccess& access, int s, int x, int y, float depth)
3060 access.raw().setPixDepth(depth, s, x, y);
3332 bool discardBuffers[3] = { false, false, false }; // Color, depth, stencil
3444 // Slow path where depth or stencil is masked out in write.
3548 float depth = value[0];
3550 rr::clearDepth(access, depth);
3587 void ReferenceContext::clearBufferfi (deUint32 buffer, int drawbuffer, float depth, int stencil)
3590 clearBufferfv(GL_DEPTH, drawbuffer, &depth);
4720 void TextureLevelArray::allocLevel (int level, const tcu::TextureFormat& format, int width, int height, int depth)
4722 const int dataSize = format.getPixelSize()*width*height*depth;
4730 m_access[level] = PixelBufferAccess(format, width, height, depth, m_data[level].getPtr());
5333 void Texture3D::allocLevel (int level, const tcu::TextureFormat& format, int width, int height, int depth)
5335 m_levels.allocLevel(level, format, width, height, depth);
5421 const int depth = getLevel(baseLevel).getDepth();
5423 const int numLevels = isMipmap ? de::min(getMaxLevel()-baseLevel+1, getNumMipLevels3D(width, height, depth)) : 1;