Lines Matching defs:desc
1661 const struct util_format_description *desc = util_format_description(format);
1664 (desc->channel[0].size == (x) && desc->channel[1].size == (y) && \
1665 desc->channel[2].size == (z) && desc->channel[3].size == (w))
1674 if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
1679 if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
1686 (desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED ||
1687 desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_SIGNED) &&
1688 !desc->channel[first_non_void].normalized &&
1689 !desc->channel[first_non_void].pure_integer)
1692 switch (desc->nr_channels) {
1694 switch (desc->channel[0].size) {
1704 if (desc->channel[0].size == desc->channel[1].size) {
1705 switch (desc->channel[0].size) {
1727 if (desc->channel[0].size == desc->channel[1].size &&
1728 desc->channel[0].size == desc->channel[2].size &&
1729 desc->channel[0].size == desc->channel[3].size) {
1730 switch (desc->channel[0].size) {
1820 const struct util_format_description *desc,
1830 switch (desc->colorspace) {
1871 if (desc->nr_channels != 4 && desc->nr_channels != 1)
1879 if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
1896 if (desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
1921 if (desc->layout == UTIL_FORMAT_LAYOUT_BPTC) {
1934 if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
1947 if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
1972 if (desc->layout == UTIL_FORMAT_LAYOUT_OTHER)
1977 if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
1984 if ((desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED ||
1985 desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_SIGNED) &&
1986 !desc->channel[first_non_void].normalized &&
1987 !desc->channel[first_non_void].pure_integer)
1991 if (desc->channel[first_non_void].size == 32 &&
1992 (desc->channel[first_non_void].normalized ||
1993 desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_FIXED))
2001 for (i = 1; i < desc->nr_channels; i++) {
2002 uniform = uniform && desc->channel[0].size == desc->channel[i].size;
2007 switch (desc->nr_channels) {
2009 if (desc->channel[0].size == 5 && desc->channel[1].size == 6 &&
2010 desc->channel[2].size == 5) {
2016 if (desc->channel[1].size == 5 &&
2017 desc->channel[2].size == 5 &&
2018 desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED &&
2019 desc->channel[first_non_void].pure_integer)
2022 if (desc->channel[0].size == 5 && desc->channel[1].size == 5 &&
2023 desc->channel[2].size == 5 && desc->channel[3].size == 1) {
2026 if (desc->channel[0].size == 1 && desc->channel[1].size == 5 &&
2027 desc->channel[2].size == 5 && desc->channel[3].size == 5) {
2030 if (desc->channel[0].size == 10 && desc->channel[1].size == 10 &&
2031 desc->channel[2].size == 10 && desc->channel[3].size == 2) {
2040 switch (desc->channel[first_non_void].size) {
2042 switch (desc->nr_channels) {
2045 if (desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED &&
2046 desc->channel[first_non_void].pure_integer)
2053 switch (desc->nr_channels) {
2063 switch (desc->nr_channels) {
2073 switch (desc->nr_channels) {
2211 const struct util_format_description *desc = util_format_description(format);
2214 if (desc->layout == UTIL_FORMAT_LAYOUT_PLAIN &&
2215 desc->channel[0].size == 64)
2225 return si_translate_texformat(screen, format, desc,
2230 const struct util_format_description *desc,
2237 if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT)
2242 if (desc->nr_channels == 4 && desc->channel[0].size == 10 && desc->channel[1].size == 10 &&
2243 desc->channel[2].size == 10 && desc->channel[3].size == 2)
2247 for (i = 0; i < desc->nr_channels; i++) {
2248 if (desc->channel[first_non_void].size != desc->channel[i].size)
2252 switch (desc->channel[first_non_void].size) {
2254 switch (desc->nr_channels) {
2265 switch (desc->nr_channels) {
2276 switch (desc->nr_channels) {
2289 switch (desc->nr_channels) {
2306 const struct util_format_description *desc,
2311 if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT)
2316 switch (desc->channel[first_non_void].type) {
2319 if (desc->channel[first_non_void].size >= 32 || desc->channel[first_non_void].pure_integer)
2321 else if (desc->channel[first_non_void].normalized)
2327 if (desc->channel[first_non_void].size >= 32 || desc->channel[first_non_void].pure_integer)
2329 else if (desc->channel[first_non_void].normalized)
2344 const struct util_format_description *desc;
2351 desc = util_format_description(format);
2361 if (desc->block.bits == 3 * 8 || desc->block.bits == 3 * 16) {
2377 data_format = si_translate_buffer_dataformat(screen, desc, first_non_void);
2517 const struct util_format_description *desc;
2521 desc = util_format_description(surf->base.format);
2523 if (desc->channel[firstchan].type != UTIL_FORMAT_TYPE_VOID) {
2527 if (firstchan == 4 || desc->channel[firstchan].type == UTIL_FORMAT_TYPE_FLOAT) {
2531 if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
2533 else if (desc->channel[firstchan].type == UTIL_FORMAT_TYPE_SIGNED) {
2534 if (desc->channel[firstchan].pure_integer) {
2537 assert(desc->channel[firstchan].normalized);
2540 } else if (desc->channel[firstchan].type == UTIL_FORMAT_TYPE_UNSIGNED) {
2541 if (desc->channel[firstchan].pure_integer) {
2544 assert(desc->channel[firstchan].normalized);
2597 S_028C74_FORCE_DST_ALPHA_1_GFX11(desc->swizzle[3] == PIPE_SWIZZLE_1 || util_format_is_intensity(surf->base.format)):
2598 S_028C74_FORCE_DST_ALPHA_1_GFX6(desc->swizzle[3] == PIPE_SWIZZLE_1 || util_format_is_intensity(surf->base.format));
3904 const struct util_format_description *desc;
3908 desc = util_format_description(format);
3909 stride = desc->block.bits / 8;
3943 state[7] = S_008F0C_DST_SEL_X(si_map_swizzle(desc->swizzle[0])) |
3944 S_008F0C_DST_SEL_Y(si_map_swizzle(desc->swizzle[1])) |
3945 S_008F0C_DST_SEL_Z(si_map_swizzle(desc->swizzle[2])) |
3946 S_008F0C_DST_SEL_W(si_map_swizzle(desc->swizzle[3]));
3966 num_format = si_translate_buffer_numformat(&screen->b, desc, first_non_void);
3967 data_format = si_translate_buffer_dataformat(&screen->b, desc, first_non_void);
4012 const struct util_format_description *desc;
4018 desc = util_format_description(pipe_format);
4021 if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) {
4058 util_format_compose_swizzles(desc->swizzle, state_swizzle, swizzle);
4091 S_00A00C_BC_SWIZZLE(gfx9_border_color_swizzle(desc->swizzle)) | S_00A00C_TYPE(type);
4198 const struct util_format_description *desc;
4204 desc = util_format_description(pipe_format);
4206 num_samples = desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS ? MAX2(1, res->nr_samples)
4209 if (desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) {
4235 util_format_compose_swizzles(desc->swizzle, state_swizzle, swizzle);
4273 } else if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
4278 } else if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
4283 switch (desc->channel[first_non_void].type) {
4288 if (desc->channel[first_non_void].normalized)
4290 else if (desc->channel[first_non_void].pure_integer)
4296 if (desc->channel[first_non_void].normalized)
4298 else if (desc->channel[first_non_void].pure_integer)
4306 data_format = si_translate_texformat(&screen->b, pipe_format, desc, first_non_void);
4354 unsigned bc_swizzle = gfx9_border_color_swizzle(desc->swizzle);
4897 const struct util_format_description *desc;
4922 desc = util_format_description(elements[i].src_format);
4924 channel = first_non_void >= 0 ? &desc->channel[first_non_void] : NULL;
4926 v->format_size[i] = desc->block.bits / 8;
4935 log_hw_load_size = MIN2(2, util_logbase2(desc->block.bits) - 3);
4976 if (desc->channel[0].size == 10) {
4992 fix_fetch.u.num_channels_m1 = desc->nr_channels - 1;
5004 if (desc->nr_channels == 3 && fix_fetch.u.log_size <= 1) {
5010 if (desc->swizzle[0] != PIPE_SWIZZLE_X) {
5011 assert(desc->swizzle[0] == PIPE_SWIZZLE_Z &&
5012 (desc->swizzle[2] == PIPE_SWIZZLE_X || desc->swizzle[2] == PIPE_SWIZZLE_0));
5051 v->rsrc_word3[i] = S_008F0C_DST_SEL_X(si_map_swizzle(desc->swizzle[0])) |
5052 S_008F0C_DST_SEL_Y(si_map_swizzle(desc->swizzle[1])) |
5053 S_008F0C_DST_SEL_Z(si_map_swizzle(desc->swizzle[2])) |
5054 S_008F0C_DST_SEL_W(si_map_swizzle(desc->swizzle[3]));
5063 data_format = si_translate_buffer_dataformat(ctx->screen, desc, first_non_void);
5064 num_format = si_translate_buffer_numformat(ctx->screen, desc, first_non_void);