Lines Matching full:format

47     * Base format is one of GL_RED, GL_RG, GL_RGB, GL_RGBA, GL_ALPHA,
83 _mesa_get_format_info(mesa_format format) in _mesa_get_format_info() argument
85 const struct gl_format_info *info = &format_info[format]; in _mesa_get_format_info()
87 assert(info->Name == format); in _mesa_get_format_info()
92 /** Return string name of format (for debugging) */
94 _mesa_get_format_name(mesa_format format) in _mesa_get_format_name() argument
96 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_name()
103 * Return bytes needed to store a block of pixels in the given format.
110 _mesa_get_format_bytes(mesa_format format) in _mesa_get_format_bytes() argument
112 if (_mesa_format_is_mesa_array_format(format)) { in _mesa_get_format_bytes()
113 return _mesa_array_format_get_type_size(format) * in _mesa_get_format_bytes()
114 _mesa_array_format_get_num_channels(format); in _mesa_get_format_bytes()
117 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_bytes()
120 _mesa_is_format_compressed(format)); in _mesa_get_format_bytes()
126 * Return bits per component for the given format.
127 * \param format one of MESA_FORMAT_x
131 _mesa_get_format_bits(mesa_format format, GLenum pname) in _mesa_get_format_bits() argument
133 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_bits()
186 _mesa_get_format_max_bits(mesa_format format) in _mesa_get_format_max_bits() argument
188 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_max_bits()
201 * Return the layout type of the given format.
204 _mesa_get_format_layout(mesa_format format) in _mesa_get_format_layout() argument
206 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_layout()
213 * for the given format.
222 _mesa_get_format_datatype(mesa_format format) in _mesa_get_format_datatype() argument
224 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_datatype()
229 get_base_format_for_array_format(mesa_array_format format) in get_base_format_for_array_format() argument
234 _mesa_array_format_get_swizzle(format, swizzle); in get_base_format_for_array_format()
235 num_channels = _mesa_array_format_get_num_channels(format); in get_base_format_for_array_format()
239 /* FIXME: RGBX formats have 4 channels, but their base format is GL_RGB. in get_base_format_for_array_format()
241 * formats from GL format/type combinations, and these cannot specify in get_base_format_for_array_format()
291 unreachable("Unsupported format"); in get_base_format_for_array_format()
295 * Return the basic format for the given type. The result will be one of
301 _mesa_get_format_base_format(uint32_t format) in _mesa_get_format_base_format() argument
303 if (!_mesa_format_is_mesa_array_format(format)) { in _mesa_get_format_base_format()
304 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_base_format()
307 return get_base_format_for_array_format(format); in _mesa_get_format_base_format()
313 * Return the block size (in pixels) for the given format. Normally
320 _mesa_get_format_block_size(mesa_format format, GLuint *bw, GLuint *bh) in _mesa_get_format_block_size() argument
322 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_block_size()
332 * Return the block size (in pixels) for the given format. Normally
340 _mesa_get_format_block_size_3d(mesa_format format, in _mesa_get_format_block_size_3d() argument
345 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_block_size_3d()
354 * from the RGBA or SZ colorspace to the given format. For array formats,
364 * // data does not contain a channel of this format
372 _mesa_get_format_swizzle(mesa_format format, uint8_t swizzle_out[4]) in _mesa_get_format_swizzle() argument
374 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_swizzle()
379 _mesa_array_format_flip_channels(mesa_array_format format) in _mesa_array_format_flip_channels() argument
384 num_channels = _mesa_array_format_get_num_channels(format); in _mesa_array_format_flip_channels()
385 _mesa_array_format_get_swizzle(format, swizzle); in _mesa_array_format_flip_channels()
388 return format; in _mesa_array_format_flip_channels()
396 _mesa_array_format_set_swizzle(&format, in _mesa_array_format_flip_channels()
399 return format; in _mesa_array_format_flip_channels()
404 _mesa_array_format_set_swizzle(&format, in _mesa_array_format_flip_channels()
407 return format; in _mesa_array_format_flip_channels()
410 unreachable("Invalid array format"); in _mesa_array_format_flip_channels()
414 _mesa_format_to_array_format(mesa_format format) in _mesa_format_to_array_format() argument
416 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_format_to_array_format()
498 /** Is the given format a compressed format? */
500 _mesa_is_format_compressed(mesa_format format) in _mesa_is_format_compressed() argument
502 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_compressed()
508 * Determine if the given format represents a packed depth/stencil buffer.
511 _mesa_is_format_packed_depth_stencil(mesa_format format) in _mesa_is_format_packed_depth_stencil() argument
513 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_packed_depth_stencil()
520 * Is the given format a signed/unsigned integer color format?
523 _mesa_is_format_integer_color(mesa_format format) in _mesa_is_format_integer_color() argument
525 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_integer_color()
534 * Is the given format an unsigned integer format?
537 _mesa_is_format_unsigned(mesa_format format) in _mesa_is_format_unsigned() argument
539 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_unsigned()
545 * Does the given format store signed values?
548 _mesa_is_format_signed(mesa_format format) in _mesa_is_format_signed() argument
550 if (format == MESA_FORMAT_R11G11B10_FLOAT || in _mesa_is_format_signed()
551 format == MESA_FORMAT_R9G9B9E5_FLOAT) { in _mesa_is_format_signed()
556 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_signed()
564 * Is the given format an integer format?
567 _mesa_is_format_integer(mesa_format format) in _mesa_is_format_integer() argument
569 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_integer()
575 * Return true if the given format is a color format.
578 _mesa_is_format_color_format(mesa_format format) in _mesa_is_format_color_format() argument
580 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_is_format_color_format()
593 * Return color encoding for given format.
597 _mesa_get_format_color_encoding(mesa_format format) in _mesa_get_format_color_encoding() argument
599 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_get_format_color_encoding()
605 * Return TRUE if format is an ETC2 compressed format specified
609 _mesa_is_format_etc2(mesa_format format) in _mesa_is_format_etc2() argument
611 switch (format) { in _mesa_is_format_etc2()
630 * If the given format is a compressed format, return a corresponding
631 * uncompressed format.
634 _mesa_get_uncompressed_format(mesa_format format) in _mesa_get_uncompressed_format() argument
636 switch (format) { in _mesa_get_uncompressed_format()
692 assert(!_mesa_is_format_compressed(format)); in _mesa_get_uncompressed_format()
694 return format; in _mesa_get_uncompressed_format()
700 _mesa_format_num_components(mesa_format format) in _mesa_format_num_components() argument
702 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_format_num_components()
715 * Returns true if a color format has data stored in the R/G/B/A channels,
719 _mesa_format_has_color_component(mesa_format format, int component) in _mesa_format_has_color_component() argument
721 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_format_has_color_component()
745 * in the given format.
748 _mesa_format_image_size(mesa_format format, GLsizei width, in _mesa_format_image_size() argument
751 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_format_image_size()
755 /* compressed format (2D only for now) */ in _mesa_format_image_size()
776 _mesa_format_image_size64(mesa_format format, GLsizei width, in _mesa_format_image_size64() argument
779 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_format_image_size64()
783 /* compressed format (2D only for now) */ in _mesa_format_image_size64()
802 _mesa_format_row_stride(mesa_format format, GLsizei width) in _mesa_format_row_stride() argument
804 const struct gl_format_info *info = _mesa_get_format_info(format); in _mesa_format_row_stride()
807 /* compressed format */ in _mesa_format_row_stride()
826 _mesa_uncompressed_format_to_type_and_comps(mesa_format format, in _mesa_uncompressed_format_to_type_and_comps() argument
829 switch (format) { in _mesa_uncompressed_format_to_type_and_comps()
1376 _mesa_problem(NULL, "bad format %s in _mesa_uncompressed_format_to_type_and_comps", in _mesa_uncompressed_format_to_type_and_comps()
1377 _mesa_get_format_name(format)); in _mesa_uncompressed_format_to_type_and_comps()
1378 assert(format == MESA_FORMAT_NONE || in _mesa_uncompressed_format_to_type_and_comps()
1379 _mesa_is_format_compressed(format)); in _mesa_uncompressed_format_to_type_and_comps()
1386 * Check if a mesa_format exactly matches a GL format/type combination
1389 * \param format the user-specified image format
1392 * \param[out] error GL_NO_ERROR if format is an expected input.
1393 * GL_INVALID_ENUM if format is an unexpected input.
1398 GLenum format, GLenum type, in _mesa_format_matches_format_and_type() argument
1405 /* Note: When reading a GL format/type combination, the format lists channel in _mesa_format_matches_format_and_type()
1424 if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes) in _mesa_format_matches_format_and_type()
1427 if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8_REV && swapBytes) in _mesa_format_matches_format_and_type()
1430 if (format == GL_RGBA && type == GL_UNSIGNED_BYTE && !littleEndian) in _mesa_format_matches_format_and_type()
1433 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_INT_8_8_8_8_REV in _mesa_format_matches_format_and_type()
1437 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_INT_8_8_8_8 in _mesa_format_matches_format_and_type()
1441 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_BYTE && littleEndian) in _mesa_format_matches_format_and_type()
1448 if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1452 if (format == GL_RGBA && type == GL_UNSIGNED_INT_8_8_8_8 && swapBytes) in _mesa_format_matches_format_and_type()
1455 if (format == GL_RGBA && type == GL_UNSIGNED_BYTE && littleEndian) in _mesa_format_matches_format_and_type()
1458 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_INT_8_8_8_8 && in _mesa_format_matches_format_and_type()
1462 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1466 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_BYTE && !littleEndian) in _mesa_format_matches_format_and_type()
1473 if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1477 if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8 && swapBytes) in _mesa_format_matches_format_and_type()
1480 if (format == GL_BGRA && type == GL_UNSIGNED_BYTE && littleEndian) in _mesa_format_matches_format_and_type()
1487 if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes) in _mesa_format_matches_format_and_type()
1490 if (format == GL_BGRA && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1494 if (format == GL_BGRA && type == GL_UNSIGNED_BYTE && !littleEndian) in _mesa_format_matches_format_and_type()
1509 return format == GL_BGR && type == GL_UNSIGNED_BYTE && littleEndian; in _mesa_format_matches_format_and_type()
1512 return format == GL_RGB && type == GL_UNSIGNED_BYTE && littleEndian; in _mesa_format_matches_format_and_type()
1515 return ((format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5) || in _mesa_format_matches_format_and_type()
1516 (format == GL_BGR && type == GL_UNSIGNED_SHORT_5_6_5_REV)) && in _mesa_format_matches_format_and_type()
1520 return ((format == GL_BGR && type == GL_UNSIGNED_SHORT_5_6_5) || in _mesa_format_matches_format_and_type()
1521 (format == GL_RGB && type == GL_UNSIGNED_SHORT_5_6_5_REV)) && in _mesa_format_matches_format_and_type()
1525 return format == GL_BGRA && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && in _mesa_format_matches_format_and_type()
1532 return format == GL_RGBA && type == GL_UNSIGNED_SHORT_5_5_5_1 && in _mesa_format_matches_format_and_type()
1536 return format == GL_RGB && type == GL_UNSIGNED_SHORT_5_5_5_1 && in _mesa_format_matches_format_and_type()
1540 return format == GL_BGRA && type == GL_UNSIGNED_SHORT_1_5_5_5_REV && in _mesa_format_matches_format_and_type()
1544 return format == GL_BGRA && type == GL_UNSIGNED_SHORT_5_5_5_1 && in _mesa_format_matches_format_and_type()
1551 return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE && littleEndian; in _mesa_format_matches_format_and_type()
1557 … return format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_SHORT && littleEndian && !swapBytes; in _mesa_format_matches_format_and_type()
1562 return format == GL_RGB && type == GL_UNSIGNED_BYTE_3_3_2; in _mesa_format_matches_format_and_type()
1565 return format == GL_RGB && type == GL_UNSIGNED_BYTE_2_3_3_REV; in _mesa_format_matches_format_and_type()
1568 if (format == GL_RGBA && type == GL_UNSIGNED_SHORT_4_4_4_4 && !swapBytes) in _mesa_format_matches_format_and_type()
1571 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && !swapBytes) in _mesa_format_matches_format_and_type()
1577 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_SHORT_4_4_4_4 && !swapBytes) in _mesa_format_matches_format_and_type()
1580 if (format == GL_ABGR_EXT && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && swapBytes) in _mesa_format_matches_format_and_type()
1583 if (format == GL_RGBA && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && !swapBytes) in _mesa_format_matches_format_and_type()
1586 if (format == GL_RGBA && type == GL_UNSIGNED_SHORT_4_4_4_4 && swapBytes) in _mesa_format_matches_format_and_type()
1592 return format == GL_RGBA && type == GL_UNSIGNED_SHORT_1_5_5_5_REV; in _mesa_format_matches_format_and_type()
1595 return format == GL_RGBA && type == GL_UNSIGNED_INT_10_10_10_2; in _mesa_format_matches_format_and_type()
1598 return format == GL_RGBA_INTEGER_EXT && type == GL_UNSIGNED_INT_10_10_10_2; in _mesa_format_matches_format_and_type()
1601 return format == GL_BGRA && type == GL_UNSIGNED_INT_10_10_10_2; in _mesa_format_matches_format_and_type()
1604 return format == GL_BGRA_INTEGER_EXT && type == GL_UNSIGNED_INT_10_10_10_2; in _mesa_format_matches_format_and_type()
1607 return format == GL_ALPHA && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1609 return format == GL_ALPHA && type == GL_UNSIGNED_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1612 return format == GL_LUMINANCE && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1614 return format == GL_LUMINANCE && type == GL_UNSIGNED_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1616 return format == GL_RED && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1618 return format == GL_RED && type == GL_UNSIGNED_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1621 return format == GL_YCBCR_MESA && in _mesa_format_matches_format_and_type()
1625 return format == GL_YCBCR_MESA && in _mesa_format_matches_format_and_type()
1630 return format == GL_RED && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1632 return format == GL_RG && type == GL_UNSIGNED_BYTE && littleEndian; in _mesa_format_matches_format_and_type()
1637 return format == GL_RED && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1640 return format == GL_RG && type == GL_UNSIGNED_SHORT && littleEndian && in _mesa_format_matches_format_and_type()
1646 return format == GL_BGRA && type == GL_UNSIGNED_INT_2_10_10_10_REV && in _mesa_format_matches_format_and_type()
1650 return format == GL_DEPTH_STENCIL && type == GL_UNSIGNED_INT_24_8 && in _mesa_format_matches_format_and_type()
1657 return format == GL_DEPTH_COMPONENT && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1664 return format == GL_DEPTH_COMPONENT && type == GL_UNSIGNED_INT && in _mesa_format_matches_format_and_type()
1668 return format == GL_STENCIL_INDEX && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1671 return format == GL_RGBA && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1673 return format == GL_RGBA && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1676 return format == GL_RGB && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1678 return format == GL_RGB && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1681 return format == GL_ALPHA && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1683 return format == GL_ALPHA && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1686 return format == GL_LUMINANCE && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1688 return format == GL_LUMINANCE && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1691 return format == GL_LUMINANCE_ALPHA && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1693 return format == GL_LUMINANCE_ALPHA && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1696 return format == GL_RED && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1698 return format == GL_RED && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1701 return format == GL_RED && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1703 return format == GL_RED && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1706 return format == GL_RG && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1708 return format == GL_RG && type == GL_HALF_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
1711 return format == GL_ALPHA_INTEGER && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1713 return format == GL_ALPHA_INTEGER && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1716 return format == GL_ALPHA_INTEGER && type == GL_UNSIGNED_INT && in _mesa_format_matches_format_and_type()
1719 return format == GL_ALPHA_INTEGER && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1721 return format == GL_ALPHA_INTEGER && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1723 return format == GL_ALPHA_INTEGER && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1726 return format == GL_RED_INTEGER && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1728 return format == GL_RED_INTEGER && type == GL_UNSIGNED_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1730 return format == GL_RED_INTEGER && type == GL_UNSIGNED_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1732 return format == GL_RED_INTEGER && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1734 return format == GL_RED_INTEGER && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1736 return format == GL_RED_INTEGER && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1739 return format == GL_LUMINANCE_INTEGER_EXT && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1741 return format == GL_LUMINANCE_INTEGER_EXT && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1744 return format == GL_LUMINANCE_INTEGER_EXT && type == GL_UNSIGNED_INT && in _mesa_format_matches_format_and_type()
1747 return format == GL_LUMINANCE_INTEGER_EXT && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1749 return format == GL_LUMINANCE_INTEGER_EXT && type == GL_SHORT && in _mesa_format_matches_format_and_type()
1752 return format == GL_LUMINANCE_INTEGER_EXT && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1755 return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && in _mesa_format_matches_format_and_type()
1758 return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && in _mesa_format_matches_format_and_type()
1761 return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && in _mesa_format_matches_format_and_type()
1764 return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && type == GL_BYTE && in _mesa_format_matches_format_and_type()
1767 return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && type == GL_SHORT && in _mesa_format_matches_format_and_type()
1770 return format == GL_LUMINANCE_ALPHA_INTEGER_EXT && type == GL_INT && in _mesa_format_matches_format_and_type()
1774 return format == GL_RED_INTEGER && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1776 return format == GL_RG_INTEGER && type == GL_BYTE && !swapBytes; in _mesa_format_matches_format_and_type()
1778 return format == GL_RGB_INTEGER && type == GL_BYTE && !swapBytes; in _mesa_format_matches_format_and_type()
1780 return format == GL_RGBA_INTEGER && type == GL_BYTE && !swapBytes; in _mesa_format_matches_format_and_type()
1782 return format == GL_RED_INTEGER && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1784 return format == GL_RG_INTEGER && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1786 return format == GL_RGB_INTEGER && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1788 return format == GL_RGBA_INTEGER && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1790 return format == GL_RED_INTEGER && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1792 return format == GL_RG_INTEGER && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1794 return format == GL_RGB_INTEGER && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1796 return format == GL_RGBA_INTEGER && type == GL_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1799 return format == GL_RED_INTEGER && type == GL_UNSIGNED_BYTE; in _mesa_format_matches_format_and_type()
1801 return format == GL_RG_INTEGER && type == GL_UNSIGNED_BYTE && !swapBytes; in _mesa_format_matches_format_and_type()
1803 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_BYTE && !swapBytes; in _mesa_format_matches_format_and_type()
1805 return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_BYTE && in _mesa_format_matches_format_and_type()
1808 return format == GL_RED_INTEGER && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1811 return format == GL_RG_INTEGER && type == GL_UNSIGNED_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1813 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1816 return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1819 return format == GL_RED_INTEGER && type == GL_UNSIGNED_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1821 return format == GL_RG_INTEGER && type == GL_UNSIGNED_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1823 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1825 return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT && !swapBytes; in _mesa_format_matches_format_and_type()
1828 return format == GL_RED && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1830 return format == GL_RG && type == GL_BYTE && littleEndian && in _mesa_format_matches_format_and_type()
1836 if (format == GL_RGBA && type == GL_BYTE && !littleEndian) in _mesa_format_matches_format_and_type()
1839 if (format == GL_ABGR_EXT && type == GL_BYTE && littleEndian) in _mesa_format_matches_format_and_type()
1845 if (format == GL_RGBA && type == GL_BYTE && littleEndian) in _mesa_format_matches_format_and_type()
1848 if (format == GL_ABGR_EXT && type == GL_BYTE && !littleEndian) in _mesa_format_matches_format_and_type()
1854 return format == GL_RED && type == GL_SHORT && in _mesa_format_matches_format_and_type()
1857 return format == GL_RG && type == GL_SHORT && littleEndian && !swapBytes; in _mesa_format_matches_format_and_type()
1859 return format == GL_RGB && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1861 return format == GL_RGBA && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1863 return format == GL_RGBA && type == GL_UNSIGNED_SHORT && in _mesa_format_matches_format_and_type()
1867 return format == GL_ALPHA && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1869 return format == GL_LUMINANCE && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1871 return format == GL_LUMINANCE_ALPHA && type == GL_BYTE && in _mesa_format_matches_format_and_type()
1874 return format == GL_LUMINANCE_ALPHA && type == GL_BYTE && in _mesa_format_matches_format_and_type()
1877 return format == GL_RED && type == GL_BYTE; in _mesa_format_matches_format_and_type()
1879 return format == GL_ALPHA && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1881 return format == GL_LUMINANCE && type == GL_SHORT && !swapBytes; in _mesa_format_matches_format_and_type()
1883 return format == GL_LUMINANCE_ALPHA && type == GL_SHORT && in _mesa_format_matches_format_and_type()
1886 return format == GL_RED && type == GL_SHORT && littleEndian && in _mesa_format_matches_format_and_type()
1890 return (format == GL_BGRA_INTEGER_EXT && in _mesa_format_matches_format_and_type()
1895 return (format == GL_RGBA_INTEGER_EXT && in _mesa_format_matches_format_and_type()
1900 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_SHORT_5_6_5; in _mesa_format_matches_format_and_type()
1903 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_SHORT_5_6_5_REV; in _mesa_format_matches_format_and_type()
1906 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_BYTE_3_3_2; in _mesa_format_matches_format_and_type()
1909 return format == GL_RGB_INTEGER && type == GL_UNSIGNED_BYTE_2_3_3_REV; in _mesa_format_matches_format_and_type()
1912 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4 && !swapBytes) in _mesa_format_matches_format_and_type()
1915 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && swapBytes) in _mesa_format_matches_format_and_type()
1920 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && !swapBytes) in _mesa_format_matches_format_and_type()
1923 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4 && swapBytes) in _mesa_format_matches_format_and_type()
1929 return format == GL_BGRA_INTEGER && type == GL_UNSIGNED_SHORT_4_4_4_4_REV && in _mesa_format_matches_format_and_type()
1936 return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_5_5_5_1 && in _mesa_format_matches_format_and_type()
1940 return format == GL_BGRA_INTEGER && type == GL_UNSIGNED_SHORT_1_5_5_5_REV && in _mesa_format_matches_format_and_type()
1944 return format == GL_BGRA_INTEGER && type == GL_UNSIGNED_SHORT_5_5_5_1 && in _mesa_format_matches_format_and_type()
1948 return format == GL_RGBA_INTEGER && type == GL_UNSIGNED_SHORT_1_5_5_5_REV; in _mesa_format_matches_format_and_type()
1951 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && !swapBytes) in _mesa_format_matches_format_and_type()
1954 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV && swapBytes) in _mesa_format_matches_format_and_type()
1959 if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && in _mesa_format_matches_format_and_type()
1963 if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1970 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1974 if (format == GL_RGBA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && swapBytes) in _mesa_format_matches_format_and_type()
1980 if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8_REV && in _mesa_format_matches_format_and_type()
1984 if (format == GL_BGRA_INTEGER && type == GL_UNSIGNED_INT_8_8_8_8 && swapBytes) in _mesa_format_matches_format_and_type()
1990 return format == GL_RGB && type == GL_UNSIGNED_INT_5_9_9_9_REV && in _mesa_format_matches_format_and_type()
1994 return format == GL_RGB && type == GL_UNSIGNED_INT_10F_11F_11F_REV && in _mesa_format_matches_format_and_type()
1998 return format == GL_DEPTH_COMPONENT && type == GL_FLOAT && !swapBytes; in _mesa_format_matches_format_and_type()
2001 return format == GL_DEPTH_STENCIL && in _mesa_format_matches_format_and_type()
2023 return format == GL_RGB && type == GL_UNSIGNED_INT_2_10_10_10_REV && in _mesa_format_matches_format_and_type()
2026 return format == GL_RGBA && type == GL_UNSIGNED_INT_2_10_10_10_REV && in _mesa_format_matches_format_and_type()
2030 return format == GL_RG && type == GL_BYTE && !littleEndian && in _mesa_format_matches_format_and_type()
2034 return format == GL_RG && type == GL_SHORT && !littleEndian && in _mesa_format_matches_format_and_type()