Lines Matching refs:info
76 * Info about each format.
1539 const struct gl_format_info *info = &format_info[format];
1540 assert(info->Name == format);
1541 return info;
1549 const struct gl_format_info *info = _mesa_get_format_info(format);
1550 return info->StrName;
1565 const struct gl_format_info *info = _mesa_get_format_info(format);
1566 ASSERT(info->BytesPerBlock);
1567 ASSERT(info->BytesPerBlock <= MAX_PIXEL_BYTES ||
1569 return info->BytesPerBlock;
1581 const struct gl_format_info *info = _mesa_get_format_info(format);
1588 return info->RedBits;
1593 return info->GreenBits;
1598 return info->BlueBits;
1603 return info->AlphaBits;
1605 return info->IntensityBits;
1607 return info->LuminanceBits;
1609 return info->IndexBits;
1614 return info->DepthBits;
1619 return info->StencilBits;
1630 const struct gl_format_info *info = _mesa_get_format_info(format);
1631 GLuint max = MAX2(info->RedBits, info->GreenBits);
1632 max = MAX2(max, info->BlueBits);
1633 max = MAX2(max, info->AlphaBits);
1634 max = MAX2(max, info->LuminanceBits);
1635 max = MAX2(max, info->IntensityBits);
1636 max = MAX2(max, info->DepthBits);
1637 max = MAX2(max, info->StencilBits);
1655 const struct gl_format_info *info = _mesa_get_format_info(format);
1656 return info->DataType;
1668 const struct gl_format_info *info = _mesa_get_format_info(format);
1669 return info->BaseFormat;
1683 const struct gl_format_info *info = _mesa_get_format_info(format);
1684 *bw = info->BlockWidth;
1685 *bh = info->BlockHeight;
1693 const struct gl_format_info *info = _mesa_get_format_info(format);
1694 return info->BlockWidth > 1 || info->BlockHeight > 1;
1704 const struct gl_format_info *info = _mesa_get_format_info(format);
1706 return info->BaseFormat == GL_DEPTH_STENCIL;
1716 const struct gl_format_info *info = _mesa_get_format_info(format);
1717 return (info->DataType == GL_INT || info->DataType == GL_UNSIGNED_INT) &&
1718 info->BaseFormat != GL_DEPTH_COMPONENT &&
1719 info->BaseFormat != GL_DEPTH_STENCIL &&
1720 info->BaseFormat != GL_STENCIL_INDEX;
1730 const struct gl_format_info *info = _mesa_get_format_info(format);
1731 return _mesa_is_type_unsigned(info->DataType);
1742 /* XXX this info should be encoded in gl_format_info */
1856 const struct gl_format_info *info = _mesa_get_format_info(format);
1857 return ((info->RedBits > 0) +
1858 (info->GreenBits > 0) +
1859 (info->BlueBits > 0) +
1860 (info->AlphaBits > 0) +
1861 (info->LuminanceBits > 0) +
1862 (info->IntensityBits > 0) +
1863 (info->DepthBits > 0) +
1864 (info->StencilBits > 0));
1876 const struct gl_format_info *info = _mesa_get_format_info(format);
1878 if (info->BlockWidth > 1 || info->BlockHeight > 1) {
1880 const GLuint bw = info->BlockWidth, bh = info->BlockHeight;
1883 const GLuint sz = wblocks * hblocks * info->BytesPerBlock;
1888 const GLuint sz = width * height * depth * info->BytesPerBlock;
1902 const struct gl_format_info *info = _mesa_get_format_info(format);
1904 if (info->BlockWidth > 1 || info->BlockHeight > 1) {
1906 const uint64_t bw = info->BlockWidth, bh = info->BlockHeight;
1909 const uint64_t sz = wblocks * hblocks * info->BytesPerBlock;
1917 info->BytesPerBlock);
1927 const struct gl_format_info *info = _mesa_get_format_info(format);
1929 if (info->BlockWidth > 1 || info->BlockHeight > 1) {
1931 const GLuint bw = info->BlockWidth;
1933 const GLint stride = wblocks * info->BytesPerBlock;
1937 const GLint stride = width * info->BytesPerBlock;
1966 * Do sanity checking of the format info table.
1976 const struct gl_format_info *info = _mesa_get_format_info(i);
1977 assert(info);
1979 assert(info->Name == i);
1981 if (info->Name == MESA_FORMAT_NONE)
1984 if (info->BlockWidth == 1 && info->BlockHeight == 1) {
1985 if (info->RedBits > 0) {
1986 GLuint t = info->RedBits + info->GreenBits
1987 + info->BlueBits + info->AlphaBits;
1988 assert(t / 8 <= info->BytesPerBlock);
1993 assert(info->DataType == GL_UNSIGNED_NORMALIZED ||
1994 info->DataType == GL_SIGNED_NORMALIZED ||
1995 info->DataType == GL_UNSIGNED_INT ||
1996 info->DataType == GL_INT ||
1997 info->DataType == GL_FLOAT ||
1999 info->DataType == GL_NONE);
2001 if (info->BaseFormat == GL_RGB) {
2002 assert(info->RedBits > 0);
2003 assert(info->GreenBits > 0);
2004 assert(info->BlueBits > 0);
2005 assert(info->AlphaBits == 0);
2006 assert(info->LuminanceBits == 0);
2007 assert(info->IntensityBits == 0);
2009 else if (info->BaseFormat == GL_RGBA) {
2010 assert(info->RedBits > 0);
2011 assert(info->GreenBits > 0);
2012 assert(info->BlueBits > 0);
2013 assert(info->AlphaBits > 0);
2014 assert(info->LuminanceBits == 0);
2015 assert(info->IntensityBits == 0);
2017 else if (info->BaseFormat == GL_RG) {
2018 assert(info->RedBits > 0);
2019 assert(info->GreenBits > 0);
2020 assert(info->BlueBits == 0);
2021 assert(info->AlphaBits == 0);
2022 assert(info->LuminanceBits == 0);
2023 assert(info->IntensityBits == 0);
2025 else if (info->BaseFormat == GL_RED) {
2026 assert(info->RedBits > 0);
2027 assert(info->GreenBits == 0);
2028 assert(info->BlueBits == 0);
2029 assert(info->AlphaBits == 0);
2030 assert(info->LuminanceBits == 0);
2031 assert(info->IntensityBits == 0);
2033 else if (info->BaseFormat == GL_LUMINANCE) {
2034 assert(info->RedBits == 0);
2035 assert(info->GreenBits == 0);
2036 assert(info->BlueBits == 0);
2037 assert(info->AlphaBits == 0);
2038 assert(info->LuminanceBits > 0);
2039 assert(info->IntensityBits == 0);
2041 else if (info->BaseFormat == GL_INTENSITY) {
2042 assert(info->RedBits == 0);
2043 assert(info->GreenBits == 0);
2044 assert(info->BlueBits == 0);
2045 assert(info->AlphaBits == 0);
2046 assert(info->LuminanceBits == 0);
2047 assert(info->IntensityBits > 0);