Lines Matching refs:m_format

986 	: m_format		(format)
988 , m_pitch (calculatePackedPitch(m_format, m_size))
996 : m_format (format)
998 , m_pitch (calculatePackedPitch(m_format, m_size))
1006 : m_format (format)
1016 : m_format (format)
1023 DE_ASSERT(m_format.getPixelSize() <= m_pitch.x());
1027 : m_format (format)
1034 DE_ASSERT(m_format.getPixelSize() <= m_pitch.x());
1038 : m_format (level.getFormat())
1040 , m_pitch (calculatePackedPitch(m_format, m_size))
1115 DE_ASSERT(!isCombinedDepthStencilType(m_format.type)); // combined types cannot be accessed directly
1116 DE_ASSERT(m_format.order != TextureFormat::DS); // combined formats cannot be accessed directly
1121 if (m_format.type == TextureFormat::UNORM_INT8)
1123 if (m_format.order == TextureFormat::RGBA || m_format.order == TextureFormat::sRGBA)
1125 else if (m_format.order == TextureFormat::RGB || m_format.order == TextureFormat::sRGB)
1139 switch (m_format.type)
1143 case TextureFormat::UNORM_SHORT_565: return swizzleGe( Vec4(UN16(11, 5), UN16( 5, 6), UN16( 0, 5), 1.0f), m_format.order, TextureFormat::RGB);
1144 case TextureFormat::UNSIGNED_SHORT_565: return swizzleGe(UVec4(UI16(11, 5), UI16( 5, 6), UI16( 0, 5), 1u), m_format.order, TextureFormat::RGB).cast<float>();
1145 case TextureFormat::UNORM_SHORT_555: return swizzleGe( Vec4(UN16(10, 5), UN16( 5, 5), UN16( 0, 5), 1.0f), m_format.order, TextureFormat::RGB);
1146 case TextureFormat::UNORM_SHORT_4444: return swizzleGe( Vec4(UN16(12, 4), UN16( 8, 4), UN16( 4, 4), UN16( 0, 4)), m_format.order, TextureFormat::RGBA);
1147 case TextureFormat::UNSIGNED_SHORT_4444: return swizzleGe(UVec4(UI16(12, 4), UI16( 8, 4), UI16( 4, 4), UI16( 0, 4)), m_format.order, TextureFormat::RGBA).cast<float>();
1148 case TextureFormat::UNORM_SHORT_5551: return swizzleGe( Vec4(UN16(11, 5), UN16( 6, 5), UN16( 1, 5), UN16( 0, 1)), m_format.order, TextureFormat::RGBA);
1149 case TextureFormat::UNSIGNED_SHORT_5551: return swizzleGe(UVec4(UI16(11, 5), UI16( 6, 5), UI16( 1, 5), UI16( 0, 1)), m_format.order, TextureFormat::RGBA).cast<float>();
1150 case TextureFormat::UNORM_SHORT_1555: return swizzleGe( Vec4(UN16(15, 1), UN16(10, 5), UN16( 5, 5), UN16( 0, 5)), m_format.order, TextureFormat::RGBA);
1152 case TextureFormat::UNORM_INT_1010102_REV: return swizzleGe( Vec4(UN32( 0, 10), UN32(10, 10), UN32(20, 10), UN32(30, 2)), m_format.order, TextureFormat::RGBA);
1153 case TextureFormat::SNORM_INT_1010102_REV: return swizzleGe( Vec4(SN32( 0, 10), SN32(10, 10), SN32(20, 10), SN32(30, 2)), m_format.order, TextureFormat::RGBA);
1155 case TextureFormat::UNSIGNED_INT_1010102_REV: return swizzleGe( UVec4(UI32(0, 10), UI32(10, 10), UI32(20, 10), UI32(30, 2)), m_format.order, TextureFormat::RGBA).cast<float>();
1157 case TextureFormat::SIGNED_INT_1010102_REV: return swizzleGe( UVec4(SI32(0, 10), SI32(10, 10), SI32(20, 10), SI32(30, 2)), m_format.order, TextureFormat::RGBA).cast<float>();
1178 const TextureSwizzle::Channel* channelMap = getChannelReadSwizzle(m_format.order).components;
1179 int channelSize = getChannelSize(m_format.type);
1189 result[c] = channelToFloat(pixelPtr + channelSize*((int)channelMap[c]), m_format.type);
1284 DE_ASSERT(!isCombinedDepthStencilType(m_format.type)); // combined types cannot be accessed directly
1285 DE_ASSERT(m_format.order != TextureFormat::DS); // combined formats cannot be accessed directly
1290 if (m_format.type == TextureFormat::UNORM_INT8)
1292 if (m_format.order == TextureFormat::RGBA || m_format.order == TextureFormat::sRGBA)
1294 else if (m_format.order == TextureFormat::RGB || m_format.order == TextureFormat::sRGB)
1303 switch (m_format.type)
1308 case TextureFormat::UNORM_SHORT_565: return swizzleGe(UVec4(U16(11, 5), U16( 5, 6), U16( 0, 5), 1).cast<int>(), m_format.order, TextureFormat::RGB);
1309 case TextureFormat::UNORM_SHORT_555: return swizzleGe(UVec4(U16(10, 5), U16( 5, 5), U16( 0, 5), 1).cast<int>(), m_format.order, TextureFormat::RGB);
1311 case TextureFormat::UNORM_SHORT_4444: return swizzleGe(UVec4(U16(12, 4), U16( 8, 4), U16( 4, 4), U16( 0, 4)).cast<int>(), m_format.order, TextureFormat::RGBA);
1313 case TextureFormat::UNORM_SHORT_5551: return swizzleGe(UVec4(U16(11, 5), U16( 6, 5), U16( 1, 5), U16( 0, 1)).cast<int>(), m_format.order, TextureFormat::RGBA);
1314 case TextureFormat::UNORM_SHORT_1555: return swizzleGe(UVec4(U16(15, 1), U16(10, 5), U16( 5, 5), U16( 0, 5)).cast<int>(), m_format.order, TextureFormat::RGBA);
1318 case TextureFormat::UNSIGNED_INT_1010102_REV: return swizzleGe(UVec4(U32( 0, 10), U32(10, 10), U32(20, 10), U32(30, 2)), m_format.order, TextureFormat::RGBA).cast<int>();
1321 case TextureFormat::SIGNED_INT_1010102_REV: return swizzleGe(IVec4(S32( 0, 10), S32(10, 10), S32(20, 10), S32(30, 2)), m_format.order, TextureFormat::RGBA);
1333 return getPixelIntGeneric<int>(pixelPtr, m_format);
1339 if (m_format.type == TextureFormat::UNORM_INT8 &&
1340 (m_format.order == TextureFormat::RGBA || m_format.order == TextureFormat::sRGBA ||
1341 m_format.order == TextureFormat::RGB || m_format.order == TextureFormat::sRGB))
1346 switch (m_format.type)
1373 return getPixelIntGeneric<deInt64>(pixelPtr, m_format);
1381 DE_ASSERT(!isCombinedDepthStencilType(m_format.type)); // combined types cannot be accessed directly
1382 DE_ASSERT(m_format.order != TextureFormat::DS); // combined formats cannot be accessed directly
1386 if (m_format.type == TextureFormat::UNORM_INT8)
1388 if (m_format.order == TextureFormat::RGBA || m_format.order == TextureFormat::sRGBA)
1390 else if (m_format.order == TextureFormat::RGB || m_format.order == TextureFormat::sRGB)
1398 switch (m_format.type)
1403 case TextureFormat::UNORM_SHORT_565: return swizzleGe(U64Vec4(U16(11, 5), U16( 5, 6), U16( 0, 5), 1), m_format.order, TextureFormat::RGB);
1404 case TextureFormat::UNORM_SHORT_555: return swizzleGe(U64Vec4(U16(10, 5), U16( 5, 5), U16( 0, 5), 1), m_format.order, TextureFormat::RGB);
1406 case TextureFormat::UNORM_SHORT_4444: return swizzleGe(U64Vec4(U16(12, 4), U16( 8, 4), U16( 4, 4), U16( 0, 4)), m_format.order, TextureFormat::RGBA);
1408 case TextureFormat::UNORM_SHORT_5551: return swizzleGe(U64Vec4(U16(11, 5), U16( 6, 5), U16( 1, 5), U16( 0, 1)), m_format.order, TextureFormat::RGBA);
1412 case TextureFormat::UNSIGNED_INT_1010102_REV: return swizzleGe(U64Vec4(U32( 0, 10), U32(10, 10), U32(20, 10), U32(30, 2)), m_format.order, TextureFormat::RGBA);
1415 case TextureFormat::SIGNED_INT_1010102_REV: return swizzleGe(U64Vec4(U32( 0, 10), U32(10, 10), U32(20, 10), U32(30, 2)), m_format.order, TextureFormat::RGBA);
1416 case TextureFormat::UNORM_SHORT_1555: return swizzleGe(U64Vec4(U16(15, 1), U16(10, 5), U16( 5, 5), U16( 0, 5)), m_format.order, TextureFormat::RGBA);
1428 return getPixelAsBitsUint64(pixelPtr, m_format);
1469 switch (m_format.type)
1472 DE_ASSERT(m_format.order == TextureFormat::DS);
1476 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1480 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1484 DE_ASSERT(m_format.order == TextureFormat::DS);
1488 DE_ASSERT(m_format.order == TextureFormat::D); // no other combined depth stencil types
1489 return channelToFloat(pixelPtr, m_format.type);
1501 switch (m_format.type)
1504 DE_ASSERT(m_format.order == TextureFormat::DS);
1509 DE_ASSERT(m_format.order == TextureFormat::DS);
1513 DE_ASSERT(m_format.order == TextureFormat::DS);
1518 DE_ASSERT(m_format.order == TextureFormat::S); // no other combined depth stencil types
1519 return channelToInt(pixelPtr, m_format.type);
1529 DE_ASSERT(!isCombinedDepthStencilType(m_format.type)); // combined types cannot be accessed directly
1530 DE_ASSERT(m_format.order != TextureFormat::DS); // combined formats cannot be accessed directly
1535 if (m_format.type == TextureFormat::UNORM_INT8)
1537 if (m_format.order == TextureFormat::RGBA || m_format.order == TextureFormat::sRGBA)
1542 else if (m_format.order == TextureFormat::RGB || m_format.order == TextureFormat::sRGB)
1554 switch (m_format.type)
1562 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1569 const UVec4 swizzled = swizzleGe(color.cast<deUint32>(), TextureFormat::RGB, m_format.order);
1576 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1583 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1590 const UVec4 swizzled = swizzleGe(color.cast<deUint32>(), TextureFormat::RGBA, m_format.order);
1597 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1604 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1611 const UVec4 swizzled = swizzleGe(color.cast<deUint32>(), TextureFormat::RGBA, m_format.order);
1618 const Vec4 u = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1625 const Vec4 u = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1633 const UVec4 u = swizzleGe(color.cast<deUint32>(), TextureFormat::RGBA, m_format.order);
1641 const IVec4 u = swizzleGe(color.cast<deInt32>(), TextureFormat::RGBA, m_format.order);
1657 int numChannels = getNumUsedChannels(m_format.order);
1658 const TextureSwizzle::Channel* map = getChannelWriteSwizzle(m_format.order).components;
1659 int channelSize = getChannelSize(m_format.type);
1664 floatToChannel(pixelPtr + channelSize*c, color[map[c]], m_format.type);
1681 DE_ASSERT(!isCombinedDepthStencilType(m_format.type)); // combined types cannot be accessed directly
1682 DE_ASSERT(m_format.order != TextureFormat::DS); // combined formats cannot be accessed directly
1687 if (m_format.type == TextureFormat::UNORM_INT8)
1689 if (m_format.order == TextureFormat::RGBA || m_format.order == TextureFormat::sRGBA)
1694 else if (m_format.order == TextureFormat::RGB || m_format.order == TextureFormat::sRGB)
1704 switch (m_format.type)
1713 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1720 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1728 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1736 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1743 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1752 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1761 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1769 int numChannels = getNumUsedChannels(m_format.order);
1770 const TextureSwizzle::Channel* map = getChannelWriteSwizzle(m_format.order).components;
1771 int channelSize = getChannelSize(m_format.type);
1776 intToChannel(pixelPtr + channelSize*c, color[map[c]], m_format.type);
1794 switch (m_format.type)
1797 DE_ASSERT(m_format.order == TextureFormat::DS);
1802 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1807 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1812 DE_ASSERT(m_format.order == TextureFormat::DS);
1817 DE_ASSERT(m_format.order == TextureFormat::D); // no other combined depth stencil types
1818 floatToChannel(pixelPtr, depth, m_format.type);
1831 switch (m_format.type)
1835 DE_ASSERT(m_format.order == TextureFormat::DS);
1840 DE_ASSERT(m_format.order == TextureFormat::DS);
1845 DE_ASSERT(m_format.order == TextureFormat::DS);
1850 DE_ASSERT(m_format.order == TextureFormat::S); // no other combined depth stencil types
1851 intToChannel(pixelPtr, stencil, m_format.type);
2518 const bool isFixedPointDepth = isFixedPointDepthTextureFormat(m_format);
2543 const bool isFixedPointDepth = isFixedPointDepthTextureFormat(m_format);
2566 : m_format ()
2572 : m_format (format)
2578 : m_format (format)
2590 m_format = format;
2596 int pixelSize = m_format.getPixelSize();
3698 : m_format (format)
3705 : m_format (other.m_format)
3726 m_format = other.m_format;
3752 const int size = m_format.getPixelSize()*width*height*depth;
3757 m_access[levelNdx] = PixelBufferAccess(m_format, width, height, depth, m_data[levelNdx].getPtr());
3963 : m_format (format)
3980 : m_format (other.m_format)
4024 m_format = other.m_format;
4054 const int dataSize = m_format.getPixelSize()*size*size;
4058 m_access[face][levelNdx] = PixelBufferAccess(m_format, size, size, 1, m_data[face][levelNdx].getPtr());