Lines Matching refs:TextureFormat

275 inline float channelToFloat (const deUint8* value, TextureFormat::ChannelType type)
278 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
282 case TextureFormat::SNORM_INT8: return de::max(-1.0f, (float)*((const deInt8*)value) / 127.0f);
283 case TextureFormat::SNORM_INT16: return de::max(-1.0f, (float)*((const deInt16*)value) / 32767.0f);
284 case TextureFormat::SNORM_INT32: return de::max(-1.0f, (float)*((const deInt32*)value) / 2147483647.0f);
285 case TextureFormat::UNORM_INT8: return (float)*((const deUint8*)value) / 255.0f;
286 case TextureFormat::UNORM_INT16: return (float)*((const deUint16*)value) / 65535.0f;
287 case TextureFormat::UNORM_INT24: return (float)readUint24(value) / 16777215.0f;
288 case TextureFormat::UNORM_INT32: return (float)*((const deUint32*)value) / 4294967295.0f;
289 case TextureFormat::SIGNED_INT8: return (float)*((const deInt8*)value);
290 case TextureFormat::SIGNED_INT16: return (float)*((const deInt16*)value);
291 case TextureFormat::SIGNED_INT32: return (float)*((const deInt32*)value);
292 case TextureFormat::SIGNED_INT64: return (float)*((const deInt64*)value);
293 case TextureFormat::UNSIGNED_INT8: return (float)*((const deUint8*)value);
294 case TextureFormat::UNSIGNED_INT16: return (float)*((const deUint16*)value);
295 case TextureFormat::UNSIGNED_INT24: return (float)readUint24(value);
296 case TextureFormat::UNSIGNED_INT32: return (float)*((const deUint32*)value);
297 case TextureFormat::UNSIGNED_INT64: return (float)*((const deUint64*)value);
298 case TextureFormat::HALF_FLOAT: return deFloat16To32(*(const deFloat16*)value);
299 case TextureFormat::FLOAT: return *((const float*)value);
300 case TextureFormat::FLOAT64: return (float)*((const double*)value);
301 case TextureFormat::UNORM_SHORT_10: return (float)((*((const deUint16*)value)) >> 6u) / 1023.0f;
302 case TextureFormat::UNORM_SHORT_12: return (float)((*((const deUint16*)value)) >> 4u) / 4095.0f;
303 case TextureFormat::USCALED_INT8: return (float)*((const deUint8*)value);
304 case TextureFormat::USCALED_INT16: return (float)*((const deUint16*)value);
305 case TextureFormat::SSCALED_INT8: return (float)*((const deInt8*)value);
306 case TextureFormat::SSCALED_INT16: return (float)*((const deInt16*)value);
314 inline T channelToIntType (const deUint8* value, TextureFormat::ChannelType type)
317 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
321 case TextureFormat::SNORM_INT8: return (T)*((const deInt8*)value);
322 case TextureFormat::SNORM_INT16: return (T)*((const deInt16*)value);
323 case TextureFormat::SNORM_INT32: return (T)*((const deInt32*)value);
324 case TextureFormat::UNORM_INT8: return (T)*((const deUint8*)value);
325 case TextureFormat::UNORM_INT16: return (T)*((const deUint16*)value);
326 case TextureFormat::UNORM_INT24: return (T)readUint24(value);
327 case TextureFormat::UNORM_INT32: return (T)*((const deUint32*)value);
328 case TextureFormat::SIGNED_INT8: return (T)*((const deInt8*)value);
329 case TextureFormat::SIGNED_INT16: return (T)*((const deInt16*)value);
330 case TextureFormat::SIGNED_INT32: return (T)*((const deInt32*)value);
331 case TextureFormat::SIGNED_INT64: return (T)*((const deInt64*)value);
332 case TextureFormat::UNSIGNED_INT8: return (T)*((const deUint8*)value);
333 case TextureFormat::UNSIGNED_INT16: return (T)*((const deUint16*)value);
334 case TextureFormat::UNSIGNED_INT24: return (T)readUint24(value);
335 case TextureFormat::UNSIGNED_INT32: return (T)*((const deUint32*)value);
336 case TextureFormat::UNSIGNED_INT64: return (T)*((const deUint64*)value);
337 case TextureFormat::HALF_FLOAT: return (T)deFloat16To32(*(const deFloat16*)value);
338 case TextureFormat::FLOAT: return (T)*((const float*)value);
339 case TextureFormat::FLOAT64: return (T)*((const double*)value);
340 case TextureFormat::UNORM_SHORT_10: return (T)((*(((const deUint16*)value))) >> 6u);
341 case TextureFormat::UNORM_SHORT_12: return (T)((*(((const deUint16*)value))) >> 4u);
342 case TextureFormat::USCALED_INT8: return (T)*((const deUint8*)value);
343 case TextureFormat::USCALED_INT16: return (T)*((const deUint16*)value);
344 case TextureFormat::SSCALED_INT8: return (T)*((const deInt8*)value);
345 case TextureFormat::SSCALED_INT16: return (T)*((const deInt16*)value);
352 inline uint64_t retrieveChannelBitsAsUint64 (const deUint8* value, TextureFormat::ChannelType type)
355 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
359 case TextureFormat::SNORM_INT8: return (uint64_t)*((const uint8_t*)value);
360 case TextureFormat::SNORM_INT16: return (uint64_t)*((const uint16_t*)value);
361 case TextureFormat::SNORM_INT32: return (uint64_t)*((const uint32_t*)value);
362 case TextureFormat::UNORM_INT8: return (uint64_t)*((const uint8_t*)value);
363 case TextureFormat::UNORM_INT16: return (uint64_t)*((const uint16_t*)value);
364 case TextureFormat::UNORM_INT24: return (uint64_t)readUint24(value);
365 case TextureFormat::UNORM_INT32: return (uint64_t)*((const uint32_t*)value);
366 case TextureFormat::SIGNED_INT8: return (uint64_t)*((const uint8_t*)value);
367 case TextureFormat::SIGNED_INT16: return (uint64_t)*((const uint16_t*)value);
368 case TextureFormat::SIGNED_INT32: return (uint64_t)*((const uint32_t*)value);
369 case TextureFormat::SIGNED_INT64: return (uint64_t)*((const uint64_t*)value);
370 case TextureFormat::UNSIGNED_INT8: return (uint64_t)*((const uint8_t*)value);
371 case TextureFormat::UNSIGNED_INT16: return (uint64_t)*((const uint16_t*)value);
372 case TextureFormat::UNSIGNED_INT24: return (uint64_t)readUint24(value);
373 case TextureFormat::UNSIGNED_INT32: return (uint64_t)*((const uint32_t*)value);
374 case TextureFormat::UNSIGNED_INT64: return (uint64_t)*((const uint64_t*)value);
375 case TextureFormat::HALF_FLOAT: return (uint64_t)*((const uint16_t*)value);
376 case TextureFormat::FLOAT: return (uint64_t)*((const uint32_t*)value);
377 case TextureFormat::FLOAT64: return (uint64_t)*((const uint64_t*)value);
378 case TextureFormat::UNORM_SHORT_10: return (uint64_t)((*((const uint16_t*)value)) >> 6u);
379 case TextureFormat::UNORM_SHORT_12: return (uint64_t)((*((const uint16_t*)value)) >> 4u);
380 case TextureFormat::USCALED_INT8: return (uint64_t)*((const uint8_t*)value);
381 case TextureFormat::USCALED_INT16: return (uint64_t)*((const uint16_t*)value);
382 case TextureFormat::SSCALED_INT8: return (uint64_t)*((const uint8_t*)value);
383 case TextureFormat::SSCALED_INT16: return (uint64_t)*((const uint16_t*)value);
390 inline int channelToInt (const deUint8* value, TextureFormat::ChannelType type)
395 void floatToChannel (deUint8* dst, float src, TextureFormat::ChannelType type)
398 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
402 case TextureFormat::SNORM_INT8: *((deInt8*)dst) = convertSatRte<deInt8> (src * 127.0f); break;
403 case TextureFormat::SNORM_INT16: *((deInt16*)dst) = convertSatRte<deInt16> (src * 32767.0f); break;
404 case TextureFormat::SNORM_INT32: *((deInt32*)dst) = convertSatRte<deInt32> (src * 2147483647.0f); break;
405 case TextureFormat::UNORM_INT8: *((deUint8*)dst) = convertSatRte<deUint8> (src * 255.0f); break;
406 case TextureFormat::UNORM_INT16: *((deUint16*)dst) = convertSatRte<deUint16> (src * 65535.0f); break;
407 case TextureFormat::UNORM_INT24: writeUint24(dst, convertSatRteUint24 (src * 16777215.0f)); break;
408 case TextureFormat::UNORM_INT32: *((deUint32*)dst) = convertSatRte<deUint32> (src * 4294967295.0f); break;
409 case TextureFormat::SIGNED_INT8: *((deInt8*)dst) = convertSatRte<deInt8> (src); break;
410 case TextureFormat::SIGNED_INT16: *((deInt16*)dst) = convertSatRte<deInt16> (src); break;
411 case TextureFormat::SIGNED_INT32: *((deInt32*)dst) = convertSatRte<deInt32> (src); break;
412 case TextureFormat::UNSIGNED_INT8: *((deUint8*)dst) = convertSatRte<deUint8> (src); break;
413 case TextureFormat::UNSIGNED_INT16: *((deUint16*)dst) = convertSatRte<deUint16> (src); break;
414 case TextureFormat::UNSIGNED_INT24: writeUint24(dst, convertSatRteUint24 (src)); break;
415 case TextureFormat::UNSIGNED_INT32: *((deUint32*)dst) = convertSatRte<deUint32> (src); break;
416 case TextureFormat::HALF_FLOAT: *((deFloat16*)dst) = deFloat32To16 (src); break;
417 case TextureFormat::FLOAT: *((float*)dst) = src; break;
418 case TextureFormat::FLOAT64: *((double*)dst) = (double)src; break;
419 case TextureFormat::UNORM_SHORT_10: *((deUint16*)dst) = (deUint16)(convertSatRteUint10(src * 1023.0f) << 6u); break;
420 case TextureFormat::UNORM_SHORT_12: *((deUint16*)dst) = (deUint16)(convertSatRteUint12(src * 4095.0f) << 4u); break;
421 case TextureFormat::USCALED_INT8: *((deUint8*)dst) = convertSatRte<deUint8> (src); break;
422 case TextureFormat::USCALED_INT16: *((deUint16*)dst) = convertSatRte<deUint16> (src); break;
423 case TextureFormat::SSCALED_INT8: *((deInt8*)dst) = convertSatRte<deInt8> (src); break;
424 case TextureFormat::SSCALED_INT16: *((deInt16*)dst) = convertSatRte<deInt16> (src); break;
486 void intToChannel (deUint8* dst, int src, TextureFormat::ChannelType type)
489 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
493 case TextureFormat::SNORM_INT8: *((deInt8*)dst) = convertSat<deInt8> (src); break;
494 case TextureFormat::SNORM_INT16: *((deInt16*)dst) = convertSat<deInt16> (src); break;
495 case TextureFormat::UNORM_INT8: *((deUint8*)dst) = convertSat<deUint8> (src); break;
496 case TextureFormat::UNORM_INT16: *((deUint16*)dst) = convertSat<deUint16> (src); break;
497 case TextureFormat::UNORM_INT24: writeUint24(dst, convertSatUint24 (src)); break;
498 case TextureFormat::SIGNED_INT8: *((deInt8*)dst) = convertSat<deInt8> (src); break;
499 case TextureFormat::SIGNED_INT16: *((deInt16*)dst) = convertSat<deInt16> (src); break;
500 case TextureFormat::SIGNED_INT32: *((deInt32*)dst) = convertSat<deInt32> (src); break;
501 case TextureFormat::SIGNED_INT64: *((deInt64*)dst) = convertSat<deInt64> ((deInt64)src); break;
502 case TextureFormat::UNSIGNED_INT8: *((deUint8*)dst) = convertSat<deUint8> ((deUint32)src); break;
503 case TextureFormat::UNSIGNED_INT16: *((deUint16*)dst) = convertSat<deUint16> ((deUint32)src); break;
504 case TextureFormat::UNSIGNED_INT24: writeUint24(dst, convertSatUint24 ((deUint32)src)); break;
505 case TextureFormat::UNSIGNED_INT32: *((deUint32*)dst) = convertSat<deUint32> ((deUint32)src); break;
506 case TextureFormat::UNSIGNED_INT64: *((deUint64*)dst) = convertSat<deUint64> ((deUint64)src); break;
507 case TextureFormat::HALF_FLOAT: *((deFloat16*)dst) = deFloat32To16((float)src); break;
508 case TextureFormat::FLOAT: *((float*)dst) = (float)src; break;
509 case TextureFormat::FLOAT64: *((double*)dst) = (double)src; break;
510 case TextureFormat::UNORM_SHORT_10: *((deUint16*)dst) = (deUint16)(convertSatUint10(src) << 6u); break;
511 case TextureFormat::UNORM_SHORT_12: *((deUint16*)dst) = (deUint16)(convertSatUint12(src) << 4u); break;
512 case TextureFormat::USCALED_INT8: *((deUint8*)dst) = convertSat<deUint8> ((deUint32)src); break;
513 case TextureFormat::USCALED_INT16: *((deUint16*)dst) = convertSat<deUint16> ((deUint32)src); break;
514 case TextureFormat::SSCALED_INT8: *((deInt8*)dst) = convertSat<deInt8> (src); break;
515 case TextureFormat::SSCALED_INT16: *((deInt16*)dst) = convertSat<deInt16> (src); break;
597 bool isColorOrder (TextureFormat::ChannelOrder order)
599 DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 22);
603 case TextureFormat::R:
604 case TextureFormat::A:
605 case TextureFormat::I:
606 case TextureFormat::L:
607 case TextureFormat::LA:
608 case TextureFormat::RG:
609 case TextureFormat::RA:
610 case TextureFormat::RGB:
611 case TextureFormat::RGBA:
612 case TextureFormat::ARGB:
613 case TextureFormat::ABGR:
614 case TextureFormat::BGR:
615 case TextureFormat::BGRA:
616 case TextureFormat::sR:
617 case TextureFormat::sRG:
618 case TextureFormat::sRGB:
619 case TextureFormat::sRGBA:
620 case TextureFormat::sBGR:
621 case TextureFormat::sBGRA:
636 bool isValid (TextureFormat format)
642 case TextureFormat::SNORM_INT8:
643 case TextureFormat::SNORM_INT16:
644 case TextureFormat::SNORM_INT32:
647 case TextureFormat::UNORM_INT8:
648 case TextureFormat::UNORM_INT16:
649 case TextureFormat::UNORM_INT24:
650 case TextureFormat::UNORM_INT32:
651 return isColor || format.order == TextureFormat::D;
653 case TextureFormat::UNORM_BYTE_44:
654 case TextureFormat::UNSIGNED_BYTE_44:
655 return format.order == TextureFormat::RG;
657 case TextureFormat::UNORM_SHORT_565:
658 case TextureFormat::UNORM_SHORT_555:
659 case TextureFormat::UNSIGNED_SHORT_565:
660 return format.order == TextureFormat::RGB || format.order == TextureFormat::BGR;
662 case TextureFormat::UNORM_SHORT_4444:
663 case TextureFormat::UNORM_SHORT_5551:
664 case TextureFormat::UNSIGNED_SHORT_4444:
665 case TextureFormat::UNSIGNED_SHORT_5551:
666 return format.order == TextureFormat::RGBA || format.order == TextureFormat::BGRA
667 || format.order == TextureFormat::ARGB || format.order == TextureFormat::ABGR;
669 case TextureFormat::UNORM_SHORT_1555:
670 return format.order == TextureFormat::ARGB || format.order == TextureFormat::ABGR;
672 case TextureFormat::UNORM_INT_101010:
673 return format.order == TextureFormat::RGB;
675 case TextureFormat::SNORM_INT_1010102_REV:
676 case TextureFormat::UNORM_INT_1010102_REV:
677 case TextureFormat::SIGNED_INT_1010102_REV:
678 case TextureFormat::UNSIGNED_INT_1010102_REV:
679 case TextureFormat::USCALED_INT_1010102_REV:
680 case TextureFormat::SSCALED_INT_1010102_REV:
681 return format.order == TextureFormat::RGBA || format.order == TextureFormat::BGRA;
683 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:
684 case TextureFormat::UNSIGNED_INT_999_E5_REV:
685 return format.order == TextureFormat::RGB;
687 case TextureFormat::UNSIGNED_INT_16_8_8:
688 return format.order == TextureFormat::DS;
690 case TextureFormat::UNSIGNED_INT_24_8:
691 case TextureFormat::UNSIGNED_INT_24_8_REV:
692 return format.order == TextureFormat::D || format.order == TextureFormat::DS;
694 case TextureFormat::SIGNED_INT8:
695 case TextureFormat::SIGNED_INT16:
696 case TextureFormat::SIGNED_INT32:
697 case TextureFormat::SSCALED_INT8:
698 case TextureFormat::SSCALED_INT16:
699 case TextureFormat::SIGNED_INT64:
702 case TextureFormat::UNSIGNED_INT8:
703 case TextureFormat::UNSIGNED_INT16:
704 case TextureFormat::UNSIGNED_INT24:
705 case TextureFormat::UNSIGNED_INT32:
706 case TextureFormat::USCALED_INT8:
707 case TextureFormat::USCALED_INT16:
708 case TextureFormat::UNSIGNED_INT64:
709 return isColor || format.order == TextureFormat::S;
711 case TextureFormat::HALF_FLOAT:
712 case TextureFormat::FLOAT:
713 case TextureFormat::FLOAT64:
714 return isColor || format.order == TextureFormat::D;
716 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
717 return format.order == TextureFormat::DS;
719 case TextureFormat::UNORM_SHORT_10:
720 case TextureFormat::UNORM_SHORT_12:
728 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
731 int getNumUsedChannels (TextureFormat::ChannelOrder order)
734 DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 22);
738 case TextureFormat::R: return 1;
739 case TextureFormat::A: return 1;
740 case TextureFormat::I: return 1;
741 case TextureFormat::L: return 1;
742 case TextureFormat::LA: return 2;
743 case TextureFormat::RG: return 2;
744 case TextureFormat::RA: return 2;
745 case TextureFormat::RGB: return 3;
746 case TextureFormat::RGBA: return 4;
747 case TextureFormat::ARGB: return 4;
748 case TextureFormat::ABGR: return 4;
749 case TextureFormat::BGR: return 3;
750 case TextureFormat::BGRA: return 4;
751 case TextureFormat::sR: return 1;
752 case TextureFormat::sRG: return 2;
753 case TextureFormat::sRGB: return 3;
754 case TextureFormat::sRGBA: return 4;
755 case TextureFormat::sBGR: return 3;
756 case TextureFormat::sBGRA: return 4;
757 case TextureFormat::D: return 1;
758 case TextureFormat::S: return 1;
759 case TextureFormat::DS: return 2;
766 int getChannelSize (TextureFormat::ChannelType type)
769 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
773 case TextureFormat::SNORM_INT8: return 1;
774 case TextureFormat::SNORM_INT16: return 2;
775 case TextureFormat::SNORM_INT32: return 4;
776 case TextureFormat::UNORM_INT8: return 1;
777 case TextureFormat::UNORM_INT16: return 2;
778 case TextureFormat::UNORM_INT24: return 3;
779 case TextureFormat::UNORM_INT32: return 4;
780 case TextureFormat::SIGNED_INT8: return 1;
781 case TextureFormat::SIGNED_INT16: return 2;
782 case TextureFormat::SIGNED_INT32: return 4;
783 case TextureFormat::SIGNED_INT64: return 8;
784 case TextureFormat::UNSIGNED_INT8: return 1;
785 case TextureFormat::UNSIGNED_INT16: return 2;
786 case TextureFormat::UNSIGNED_INT24: return 3;
787 case TextureFormat::UNSIGNED_INT32: return 4;
788 case TextureFormat::UNSIGNED_INT64: return 8;
789 case TextureFormat::HALF_FLOAT: return 2;
790 case TextureFormat::FLOAT: return 4;
791 case TextureFormat::FLOAT64: return 8;
792 case TextureFormat::UNORM_SHORT_10: return 2;
793 case TextureFormat::UNORM_SHORT_12: return 2;
794 case TextureFormat::USCALED_INT8: return 1;
795 case TextureFormat::USCALED_INT16: return 2;
796 case TextureFormat::SSCALED_INT8: return 1;
797 case TextureFormat::SSCALED_INT16: return 2;
805 int getPixelSize (TextureFormat format)
807 const TextureFormat::ChannelOrder order = format.order;
808 const TextureFormat::ChannelType type = format.type;
813 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
817 case TextureFormat::UNORM_BYTE_44:
818 case TextureFormat::UNSIGNED_BYTE_44:
821 case TextureFormat::UNORM_SHORT_565:
822 case TextureFormat::UNORM_SHORT_555:
823 case TextureFormat::UNORM_SHORT_4444:
824 case TextureFormat::UNORM_SHORT_5551:
825 case TextureFormat::UNORM_SHORT_1555:
826 case TextureFormat::UNSIGNED_SHORT_565:
827 case TextureFormat::UNSIGNED_SHORT_4444:
828 case TextureFormat::UNSIGNED_SHORT_5551:
831 case TextureFormat::UNORM_INT_101010:
832 case TextureFormat::UNSIGNED_INT_999_E5_REV:
833 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:
834 case TextureFormat::SNORM_INT_1010102_REV:
835 case TextureFormat::UNORM_INT_1010102_REV:
836 case TextureFormat::SIGNED_INT_1010102_REV:
837 case TextureFormat::UNSIGNED_INT_1010102_REV:
838 case TextureFormat::UNSIGNED_INT_24_8:
839 case TextureFormat::UNSIGNED_INT_24_8_REV:
840 case TextureFormat::UNSIGNED_INT_16_8_8:
841 case TextureFormat::USCALED_INT_1010102_REV:
842 case TextureFormat::SSCALED_INT_1010102_REV:
845 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
853 int TextureFormat::getPixelSize (void) const
858 const TextureSwizzle& getChannelReadSwizzle (TextureFormat::ChannelOrder order)
861 DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 22);
883 case TextureFormat::R: return R;
884 case TextureFormat::A: return A;
885 case TextureFormat::I: return I;
886 case TextureFormat::L: return L;
887 case TextureFormat::LA: return LA;
888 case TextureFormat::RG: return RG;
889 case TextureFormat::RA: return RA;
890 case TextureFormat::RGB: return RGB;
891 case TextureFormat::RGBA: return RGBA;
892 case TextureFormat::ARGB: return ARGB;
893 case TextureFormat::ABGR: return ABGR;
894 case TextureFormat::BGR: return BGR;
895 case TextureFormat::BGRA: return BGRA;
896 case TextureFormat::sR: return R;
897 case TextureFormat::sRG: return RG;
898 case TextureFormat::sRGB: return RGB;
899 case TextureFormat::sRGBA: return RGBA;
900 case TextureFormat::sBGR: return BGR;
901 case TextureFormat::sBGRA: return BGRA;
902 case TextureFormat::D: return D;
903 case TextureFormat::S: return S;
904 case TextureFormat::DS: return DS;
912 const TextureSwizzle& getChannelWriteSwizzle (TextureFormat::ChannelOrder order)
915 DE_STATIC_ASSERT(TextureFormat::CHANNELORDER_LAST == 22);
936 case TextureFormat::R: return R;
937 case TextureFormat::A: return A;
938 case TextureFormat::I: return I;
939 case TextureFormat::L: return L;
940 case TextureFormat::LA: return LA;
941 case TextureFormat::RG: return RG;
942 case TextureFormat::RA: return RA;
943 case TextureFormat::RGB: return RGB;
944 case TextureFormat::RGBA: return RGBA;
945 case TextureFormat::ARGB: return ARGB;
946 case TextureFormat::ABGR: return ABGR;
947 case TextureFormat::BGR: return BGR;
948 case TextureFormat::BGRA: return BGRA;
949 case TextureFormat::sR: return R;
950 case TextureFormat::sRG: return RG;
951 case TextureFormat::sRGB: return RGB;
952 case TextureFormat::sRGBA: return RGBA;
953 case TextureFormat::sBGR: return BGR;
954 case TextureFormat::sBGRA: return BGRA;
955 case TextureFormat::D: return D;
956 case TextureFormat::S: return S;
958 case TextureFormat::DS:
968 IVec3 calculatePackedPitch (const TextureFormat& format, const IVec3& size)
985 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, int width, int height, int depth, const void* data)
995 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, const IVec3& size, const void* data)
1005 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, int width, int height, int depth, int rowPitch, int slicePitch, const void* data)
1015 ConstPixelBufferAccess::ConstPixelBufferAccess (const TextureFormat& format, const IVec3& size, const IVec3& pitch, const void* data)
1026 ConstPixelBufferAccess::ConstPixelBufferAccess(const TextureFormat& format, const IVec3& size, const IVec3& pitch, const IVec3& block, const void* data)
1046 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, int width, int height, int depth, void* data)
1051 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, const IVec3& size, void* data)
1056 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, int width, int height, int depth, int rowPitch, int slicePitch, void* data)
1061 PixelBufferAccess::PixelBufferAccess (const TextureFormat& format, const IVec3& size, const IVec3& pitch, void* data)
1066 PixelBufferAccess::PixelBufferAccess(const TextureFormat& format, const IVec3& size, const IVec3& pitch, const IVec3& block, void* data)
1079 Vector<T, 4> swizzleGe (const Vector<T, 4>& v, TextureFormat::ChannelOrder src, TextureFormat::ChannelOrder dst)
1085 if ((src == TextureFormat::RGBA && dst == TextureFormat::ARGB) ||
1086 (src == TextureFormat::BGRA && dst == TextureFormat::ABGR))
1089 if ((src == TextureFormat::ARGB && dst == TextureFormat::RGBA) ||
1090 (src == TextureFormat::ABGR && dst == TextureFormat::BGRA))
1093 if ((src == TextureFormat::BGRA && dst == TextureFormat::ARGB) ||
1094 (src == TextureFormat::ABGR && dst == TextureFormat::RGBA) ||
1095 (src == TextureFormat::RGBA && dst == TextureFormat::ABGR) ||
1096 (src == TextureFormat::ARGB && dst == TextureFormat::BGRA))
1099 if ((src == TextureFormat::RGB && dst == TextureFormat::BGR) ||
1100 (src == TextureFormat::BGR && dst == TextureFormat::RGB) ||
1101 (src == TextureFormat::RGBA && dst == TextureFormat::BGRA) ||
1102 (src == TextureFormat::BGRA && dst == TextureFormat::RGBA))
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)
1141 case TextureFormat::UNORM_BYTE_44: return Vec4(UN8 (4, 4), UN8 ( 0, 4), 0.0f, 1.0f);
1142 case TextureFormat::UNSIGNED_BYTE_44: return UVec4(UI8 (4, 4), UI8 ( 0, 4), 0u, 1u).cast<float>();
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);
1151 case TextureFormat::UNORM_INT_101010: return Vec4(UN32(22, 10), UN32(12, 10), UN32( 2, 10), 1.0f);
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);
1154 case TextureFormat::USCALED_INT_1010102_REV:
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>();
1156 case TextureFormat::SSCALED_INT_1010102_REV:
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>();
1158 case TextureFormat::UNSIGNED_INT_999_E5_REV: return unpackRGB999E5(*((const deUint32*)pixelPtr));
1160 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:
1209 static tcu::Vector<T, 4> getPixelIntGeneric (const deUint8* pixelPtr, const tcu::TextureFormat& format)
1244 static U64Vec4 getPixelAsBitsUint64 (const deUint8* pixelPtr, const tcu::TextureFormat& format)
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)
1305 case TextureFormat::UNSIGNED_BYTE_44: // Fall-through
1306 case TextureFormat::UNORM_BYTE_44: return UVec4(U8 ( 4, 4), U8 ( 0, 4), 0u, 1u).cast<int>();
1307 case TextureFormat::UNSIGNED_SHORT_565: // Fall-through
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);
1310 case TextureFormat::UNSIGNED_SHORT_4444: // Fall-through
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);
1312 case TextureFormat::UNSIGNED_SHORT_5551: // Fall-through
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);
1315 case TextureFormat::UNORM_INT_101010: return UVec4(U32(22, 10), U32(12, 10), U32( 2, 10), 1).cast<int>();
1316 case TextureFormat::UNORM_INT_1010102_REV: // Fall-through
1317 case TextureFormat::USCALED_INT_1010102_REV: // Fall-through
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>();
1319 case TextureFormat::SNORM_INT_1010102_REV: // Fall-through
1320 case TextureFormat::SSCALED_INT_1010102_REV: // Fall-through
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);
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))
1348 case TextureFormat::UNSIGNED_BYTE_44:
1349 case TextureFormat::UNORM_BYTE_44:
1350 case TextureFormat::UNSIGNED_SHORT_565:
1351 case TextureFormat::UNORM_SHORT_565:
1352 case TextureFormat::UNORM_SHORT_555:
1353 case TextureFormat::UNSIGNED_SHORT_4444:
1354 case TextureFormat::UNORM_SHORT_4444:
1355 case TextureFormat::UNSIGNED_SHORT_5551:
1356 case TextureFormat::UNORM_SHORT_5551:
1357 case TextureFormat::UNORM_INT_101010:
1358 case TextureFormat::UNORM_INT_1010102_REV:
1359 case TextureFormat::USCALED_INT_1010102_REV:
1360 case TextureFormat::UNSIGNED_INT_1010102_REV:
1361 case TextureFormat::SNORM_INT_1010102_REV:
1362 case TextureFormat::SSCALED_INT_1010102_REV:
1363 case TextureFormat::SIGNED_INT_1010102_REV:
1364 case TextureFormat::UNORM_SHORT_1555:
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)
1400 case TextureFormat::UNSIGNED_BYTE_44: // Fall-through
1401 case TextureFormat::UNORM_BYTE_44: return U64Vec4(U8 ( 4, 4), U8 ( 0, 4), 0u, 1u);
1402 case TextureFormat::UNSIGNED_SHORT_565: // Fall-through
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);
1405 case TextureFormat::UNSIGNED_SHORT_4444: // Fall-through
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);
1407 case TextureFormat::UNSIGNED_SHORT_5551: // Fall-through
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);
1409 case TextureFormat::UNORM_INT_101010: return U64Vec4(U32(22, 10), U32(12, 10), U32( 2, 10), 1);
1410 case TextureFormat::UNORM_INT_1010102_REV: // Fall-through
1411 case TextureFormat::USCALED_INT_1010102_REV: // Fall-through
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);
1413 case TextureFormat::SNORM_INT_1010102_REV: // Fall-through
1414 case TextureFormat::SSCALED_INT_1010102_REV: // Fall-through
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);
1471 case TextureFormat::UNSIGNED_INT_16_8_8:
1472 DE_ASSERT(m_format.order == TextureFormat::DS);
1475 case TextureFormat::UNSIGNED_INT_24_8:
1476 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1479 case TextureFormat::UNSIGNED_INT_24_8_REV:
1480 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1483 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
1484 DE_ASSERT(m_format.order == TextureFormat::DS);
1488 DE_ASSERT(m_format.order == TextureFormat::D); // no other combined depth stencil types
1503 case TextureFormat::UNSIGNED_INT_24_8_REV:
1504 DE_ASSERT(m_format.order == TextureFormat::DS);
1507 case TextureFormat::UNSIGNED_INT_16_8_8:
1508 case TextureFormat::UNSIGNED_INT_24_8:
1509 DE_ASSERT(m_format.order == TextureFormat::DS);
1512 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
1513 DE_ASSERT(m_format.order == TextureFormat::DS);
1518 DE_ASSERT(m_format.order == TextureFormat::S); // no other combined depth stencil types
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)
1556 case TextureFormat::UNORM_BYTE_44: *((deUint8 *)pixelPtr) = (deUint8)(PN(color[0], 4, 4) | PN(color[1], 0, 4)); break;
1557 case TextureFormat::UNSIGNED_BYTE_44: *((deUint8 *)pixelPtr) = (deUint8)(PU((deUint32)color[0], 4, 4) | PU((deUint32)color[1], 0, 4)); break;
1558 case TextureFormat::UNORM_INT_101010: *((deUint32*)pixelPtr) = PN(color[0], 22, 10) | PN(color[1], 12, 10) | PN(color[2], 2, 10); break;
1560 case TextureFormat::UNORM_SHORT_565:
1562 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1567 case TextureFormat::UNSIGNED_SHORT_565:
1569 const UVec4 swizzled = swizzleGe(color.cast<deUint32>(), TextureFormat::RGB, m_format.order);
1574 case TextureFormat::UNORM_SHORT_555:
1576 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1581 case TextureFormat::UNORM_SHORT_4444:
1583 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1588 case TextureFormat::UNSIGNED_SHORT_4444:
1590 const UVec4 swizzled = swizzleGe(color.cast<deUint32>(), TextureFormat::RGBA, m_format.order);
1595 case TextureFormat::UNORM_SHORT_5551:
1597 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1602 case TextureFormat::UNORM_SHORT_1555:
1604 const Vec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1609 case TextureFormat::UNSIGNED_SHORT_5551:
1611 const UVec4 swizzled = swizzleGe(color.cast<deUint32>(), TextureFormat::RGBA, m_format.order);
1616 case TextureFormat::UNORM_INT_1010102_REV:
1618 const Vec4 u = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1623 case TextureFormat::SNORM_INT_1010102_REV:
1625 const Vec4 u = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1630 case TextureFormat::UNSIGNED_INT_1010102_REV:
1631 case TextureFormat::USCALED_INT_1010102_REV:
1633 const UVec4 u = swizzleGe(color.cast<deUint32>(), TextureFormat::RGBA, m_format.order);
1638 case TextureFormat::SIGNED_INT_1010102_REV:
1639 case TextureFormat::SSCALED_INT_1010102_REV:
1641 const IVec4 u = swizzleGe(color.cast<deInt32>(), TextureFormat::RGBA, m_format.order);
1646 case TextureFormat::UNSIGNED_INT_11F_11F_10F_REV:
1650 case TextureFormat::UNSIGNED_INT_999_E5_REV:
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)
1706 case TextureFormat::UNSIGNED_BYTE_44: // Fall-through
1707 case TextureFormat::UNORM_BYTE_44: *((deUint8 *)pixelPtr) = (deUint8 )(PU(color[0], 4, 4) | PU(color[1], 0, 4)); break;
1708 case TextureFormat::UNORM_INT_101010: *((deUint32*)pixelPtr) = PU(color[0], 22, 10) | PU(color[1], 12, 10) | PU(color[2], 2, 10); break;
1710 case TextureFormat::UNORM_SHORT_565:
1711 case TextureFormat::UNSIGNED_SHORT_565:
1713 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1718 case TextureFormat::UNORM_SHORT_555:
1720 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGB, m_format.order);
1725 case TextureFormat::UNORM_SHORT_4444:
1726 case TextureFormat::UNSIGNED_SHORT_4444:
1728 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1733 case TextureFormat::UNORM_SHORT_5551:
1734 case TextureFormat::UNSIGNED_SHORT_5551:
1736 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1741 case TextureFormat::UNORM_SHORT_1555:
1743 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1748 case TextureFormat::UNORM_INT_1010102_REV:
1749 case TextureFormat::UNSIGNED_INT_1010102_REV:
1750 case TextureFormat::USCALED_INT_1010102_REV:
1752 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1757 case TextureFormat::SNORM_INT_1010102_REV:
1758 case TextureFormat::SIGNED_INT_1010102_REV:
1759 case TextureFormat::SSCALED_INT_1010102_REV:
1761 const IVec4 swizzled = swizzleGe(color, TextureFormat::RGBA, m_format.order);
1796 case TextureFormat::UNSIGNED_INT_16_8_8:
1797 DE_ASSERT(m_format.order == TextureFormat::DS);
1801 case TextureFormat::UNSIGNED_INT_24_8:
1802 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1806 case TextureFormat::UNSIGNED_INT_24_8_REV:
1807 DE_ASSERT(m_format.order == TextureFormat::D || m_format.order == TextureFormat::DS);
1811 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
1812 DE_ASSERT(m_format.order == TextureFormat::DS);
1817 DE_ASSERT(m_format.order == TextureFormat::D); // no other combined depth stencil types
1833 case TextureFormat::UNSIGNED_INT_16_8_8:
1834 case TextureFormat::UNSIGNED_INT_24_8:
1835 DE_ASSERT(m_format.order == TextureFormat::DS);
1839 case TextureFormat::UNSIGNED_INT_24_8_REV:
1840 DE_ASSERT(m_format.order == TextureFormat::DS);
1844 case TextureFormat::FLOAT_UNSIGNED_INT_24_8_REV:
1845 DE_ASSERT(m_format.order == TextureFormat::DS);
1850 DE_ASSERT(m_format.order == TextureFormat::S); // no other combined depth stencil types
1939 static bool isFixedPointDepthTextureFormat (const tcu::TextureFormat& format)
1941 DE_ASSERT(format.order == TextureFormat::D || format.order == TextureFormat::R);
1958 const TextureFormat& format = access.getFormat();
1962 if (format.type == TextureFormat::UNORM_INT8 && format.order == TextureFormat::sRGB)
1964 else if (format.type == TextureFormat::UNORM_INT8 && format.order == TextureFormat::sRGBA)
1976 static inline Vec4 lookupBorder (const tcu::TextureFormat& format, const tcu::Sampler& sampler)
2571 TextureLevel::TextureLevel (const TextureFormat& format)
2577 TextureLevel::TextureLevel (const TextureFormat& format, int width, int height, int depth)
2588 void TextureLevel::setStorage (const TextureFormat& format, int width, int height, int depth)
2952 DE_ASSERT(src.getFormat().order == TextureFormat::D || src.getFormat().order == TextureFormat::DS);
3697 TextureLevelPyramid::TextureLevelPyramid (const TextureFormat& format, int numLevels)
3770 Texture1D::Texture1D (const TextureFormat& format, int width)
3812 Texture2D::Texture2D (const TextureFormat& format, int width, int height, bool es2)
3821 Texture2D::Texture2D (const TextureFormat& format, int width, int height, int mipmaps)
3945 DE_ASSERT(m_levels[0][0].getFormat().order == TextureFormat::D || m_levels[0][0].getFormat().order == TextureFormat::DS);
3962 TextureCube::TextureCube (const TextureFormat& format, int size, bool es2)
4148 Texture1DArray::Texture1DArray (const TextureFormat& format, int width, int numLayers)
4193 Texture2DArray::Texture2DArray (const TextureFormat& format, int width, int height, int numLayers)
4252 Texture3D::Texture3D (const TextureFormat& format, int width, int height, int depth)
4346 TextureCubeArray::TextureCubeArray (const TextureFormat& format, int size, int depth)
4393 std::ostream& operator<< (std::ostream& str, TextureFormat::ChannelOrder order)
4423 return str << de::getSizedArrayElement<TextureFormat::CHANNELORDER_LAST>(orderStrings, order);
4426 std::ostream& operator<< (std::ostream& str, TextureFormat::ChannelType type)
4428 DE_STATIC_ASSERT(TextureFormat::CHANNELTYPE_LAST == 48);
4482 return str << de::getSizedArrayElement<TextureFormat::CHANNELTYPE_LAST>(typeStrings, type);
4500 std::ostream& operator<< (std::ostream& str, TextureFormat format)