Lines Matching defs:format

46 fdl6_format_swiz(enum pipe_format format, bool has_z24uint_s8uint,
58 * driver as part of implementing the API format. There are a few
61 switch (format) {
70 * If the image has a multi-planar format and
89 /* same hardware format is used for BC1_RGB / BC1_RGBA */
116 if (util_format_is_alpha(format)) {
121 } else if (util_format_is_luminance(format)) {
126 } else if (util_format_is_intensity(format)) {
131 } else if (util_format_is_luminance_alpha(format)) {
136 } else if (!util_format_has_alpha(format)) {
148 fdl6_format_swiz(args->format, has_z24uint_s8uint, format_swiz);
169 /* If reinterpreting a compressed format as a size-compatible uncompressed
170 * format, we need width/height in blocks, and vice-versa. In vulkan this
171 * includes single-plane 422 formats which util/format doesn't consider
174 if (util_format_get_blockwidth(layout->format) > 1 &&
175 util_format_get_blockwidth(args->format) == 1) {
176 width = util_format_get_nblocksx(layout->format, width);
177 } else if (util_format_get_blockwidth(layout->format) == 1 &&
178 util_format_get_blockwidth(args->format) > 1) {
179 width *= util_format_get_blockwidth(args->format);
182 if (util_format_get_blockheight(layout->format) > 1 &&
183 util_format_get_blockheight(args->format) == 1) {
184 height = util_format_get_nblocksy(layout->format, height);
185 } else if (util_format_get_blockheight(layout->format) == 1 &&
186 util_format_get_blockheight(args->format) > 1) {
187 height *= util_format_get_blockheight(args->format);
213 fd6_texture_format(args->format, layout->tile_mode);
215 fd6_texture_swap(args->format, layout->tile_mode);
220 bool is_d24s8 = (args->format == PIPE_FORMAT_Z24_UNORM_S8_UINT ||
221 args->format == PIPE_FORMAT_Z24X8_UNORM ||
222 args->format == PIPE_FORMAT_X24S8_UINT);
224 if (args->format == PIPE_FORMAT_X24S8_UINT && has_z24uint_s8uint) {
240 view->format = args->format;
246 COND(util_format_is_srgb(args->format), A6XX_TEX_CONST_0_SRGB) |
265 if (args->format == PIPE_FORMAT_R8_G8B8_420_UNORM ||
266 args->format == PIPE_FORMAT_G8_B8R8_420_UNORM ||
267 args->format == PIPE_FORMAT_G8_B8_R8_420_UNORM) {
325 !util_format_is_pure_integer(args->format) &&
326 !util_format_is_depth_or_stencil(args->format);
333 COND(util_format_is_srgb(args->format), A6XX_SP_PS_2D_SRC_INFO_SRGB) |
350 util_format_description(args->format);
364 fd6_color_format(args->format, layout->tile_mode);
373 fd6_color_swap(args->format, layout->tile_mode);
412 COND(util_format_is_pure_sint(args->format), A6XX_SP_FS_MRT_REG_COLOR_SINT) |
413 COND(util_format_is_pure_uint(args->format), A6XX_SP_FS_MRT_REG_COLOR_UINT);
420 COND(util_format_is_srgb(args->format), A6XX_RB_2D_DST_INFO_SRGB);
431 fdl6_buffer_view_init(uint32_t *descriptor, enum pipe_format format,
434 unsigned elements = size / util_format_get_blocksize(format);
437 .format = format,
445 A6XX_TEX_CONST_0_SWAP(fd6_texture_swap(format, TILE6_LINEAR)) |
446 A6XX_TEX_CONST_0_FMT(fd6_texture_format(format, TILE6_LINEAR)) |
448 COND(util_format_is_srgb(format), A6XX_TEX_CONST_0_SRGB);