Lines Matching refs:format

31 #include "util/format/u_format.h"
61 blit.src.format = src->format;
65 blit.dst.format = dst->format;
73 blit.mask = util_format_get_mask(dst->format);
122 if (util_format_is_compressed(dst->format)) {
123 sbox.width = util_format_get_nblocksx(dst->format, sbox.width);
124 sbox.height = util_format_get_nblocksx(dst->format, sbox.height);
178 const struct util_format_description *desc = util_format_description(ptex->format);
187 if (!is_flushed_depth && ptex->format == PIPE_FORMAT_Z32_FLOAT_S8X24_UINT) {
190 bpe = util_format_get_blocksize(ptex->format);
205 * the format for transfers.
236 ptex->format == PIPE_FORMAT_R9G9B9E5_FLOAT)
544 sscreen->make_texture_descriptor(sscreen, tex, true, res->target, res->format, swizzle, 0,
847 util_format_short_name(tex->buffer.b.b.format));
943 tex->is_depth = util_format_has_depth(util_format_description(tex->buffer.b.b.format));
969 if (sscreen->info.gfx_level >= GFX9 && base->format == PIPE_FORMAT_Z16_UNORM)
970 tex->db_render_format = base->format;
973 tex->upgraded_depth = base->format != PIPE_FORMAT_Z32_FLOAT &&
974 base->format != PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
977 tex->db_render_format = base->format;
1155 base->nr_samples ? base->nr_samples : 1, util_format_short_name(base->format));
1179 const struct util_format_description *desc = util_format_description(templ->format);
1181 bool is_depth_stencil = util_format_is_depth_or_stencil(templ->format) &&
1201 if (!force_tiling && !is_depth_stencil && !util_format_is_compressed(templ->format)) {
1244 bool is_zs = util_format_is_depth_or_stencil(templ->format);
1285 unsigned num_planes = util_format_get_num_planes(templ->format);
1291 plane_templ[i].format = util_format_get_plane_format(templ->format, i);
1292 plane_templ[i].width0 = util_format_get_plane_width(templ->format, i, templ->width0);
1293 plane_templ[i].height0 = util_format_get_plane_height(templ->format, i, templ->height0);
1350 enum pipe_format format = res->b.b.format;
1351 unsigned blks = util_format_get_blocksize(format);
1390 enum pipe_format format,
1405 }, format, &ac_mod_count, max ? modifiers : NULL);
1408 external_only[i] = util_format_is_yuv(format);
1416 enum pipe_format format,
1420 si_query_dmabuf_modifiers(screen, format, 0, NULL, NULL, &allowed_mod_count);
1435 si_query_dmabuf_modifiers(screen, format, allowed_mod_count, allowed_modifiers,
1455 enum pipe_format format)
1457 unsigned planes = util_format_get_num_planes(format);
1494 si_query_dmabuf_modifiers(screen, templ->format, 0, NULL, NULL, &allowed_mod_count);
1502 si_query_dmabuf_modifiers(screen, templ->format, allowed_mod_count, allowed_modifiers, NULL, &allowed_mod_count);
1672 if (whandle->plane >= util_format_get_num_planes(whandle->format)) {
1695 enum pipe_format pipe_format = texture->format;
1729 resource.format = pipe_format;
1760 res->format = orig->format;
1768 if (flags & SI_RESOURCE_FLAG_FORCE_LINEAR && util_format_is_compressed(orig->format)) {
1772 unsigned blocksize = util_format_get_blocksize(orig->format);
1775 res->format = PIPE_FORMAT_R16G16B16A16_UINT;
1778 res->format = PIPE_FORMAT_R32G32B32A32_UINT;
1781 res->width0 = util_format_get_nblocksx(orig->format, box->width);
1782 res->height0 = util_format_get_nblocksy(orig->format, box->height);
1912 resource.format = util_blitter_get_color_format_for_zs(resource.format);
2004 /* Return if it's allowed to reinterpret one format as another with DCC enabled.
2015 /* No format change - exit early. */
2022 /* Check again after format adjustments. */
2070 !vi_dcc_formats_compatible((struct si_screen *)tex->screen, tex->format, view_format);
2094 if (tex->target != PIPE_BUFFER && templ->format != tex->format) {
2095 const struct util_format_description *tex_desc = util_format_description(tex->format);
2096 const struct util_format_description *templ_desc = util_format_description(templ->format);
2104 unsigned nblks_x = util_format_get_nblocksx(tex->format, width);
2105 unsigned nblks_y = util_format_get_nblocksy(tex->format, height);
2110 width0 = util_format_get_nblocksx(tex->format, width0);
2111 height0 = util_format_get_nblocksy(tex->format, height0);
2126 surface->base.format = templ->format;
2136 vi_dcc_formats_are_incompatible(tex, templ->u.tex.level, templ->format);
2146 unsigned si_translate_colorswap(enum amd_gfx_level gfx_level, enum pipe_format format,
2149 const struct util_format_description *desc = util_format_description(format);
2153 if (format == PIPE_FORMAT_R11G11B10_FLOAT) /* isn't plain */
2157 format == PIPE_FORMAT_R9G9B9E5_FLOAT) /* isn't plain */
2292 enum pipe_format format,
2349 if (util_format_is_depth_or_stencil(format) ||
2350 util_format_get_num_planes(format) > 1 ||
2351 util_format_is_compressed(format))
2354 int blk_size = util_format_get_blocksize(format);