Home
last modified time | relevance | path

Searched refs:format_desc (Results 1 – 25 of 43) sorted by relevance

12

/third_party/mesa3d/src/util/tests/format/
Du_format_test.c57 print_packed(const struct util_format_description *format_desc, in print_packed() argument
66 for (i = 0; i < format_desc->block.bits/8; ++i) { in print_packed()
76 print_unpacked_rgba_doubl(const struct util_format_description *format_desc, in print_unpacked_rgba_doubl() argument
85 for (i = 0; i < format_desc->block.height; ++i) { in print_unpacked_rgba_doubl()
86 for (j = 0; j < format_desc->block.width; ++j) { in print_unpacked_rgba_doubl()
98 print_unpacked_rgba_float(const struct util_format_description *format_desc, in print_unpacked_rgba_float() argument
107 for (i = 0; i < format_desc->block.height; ++i) { in print_unpacked_rgba_float()
108 for (j = 0; j < format_desc->block.width; ++j) { in print_unpacked_rgba_float()
120 print_unpacked_rgba_8unorm(const struct util_format_description *format_desc, in print_unpacked_rgba_8unorm() argument
129 for (i = 0; i < format_desc->block.height; ++i) { in print_unpacked_rgba_8unorm()
[all …]
/third_party/mesa3d/src/gallium/auxiliary/gallivm/
Dlp_bld_format_soa.c82 lp_build_format_swizzle_soa(const struct util_format_description *format_desc, in lp_build_format_swizzle_soa() argument
87 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) { in lp_build_format_swizzle_soa()
91 if (util_format_has_stencil(format_desc) && in lp_build_format_swizzle_soa()
92 !util_format_has_depth(format_desc)) { in lp_build_format_swizzle_soa()
94 swizzle = format_desc->swizzle[1]; in lp_build_format_swizzle_soa()
98 swizzle = format_desc->swizzle[0]; in lp_build_format_swizzle_soa()
112 enum pipe_swizzle swizzle = format_desc->swizzle[chan]; in lp_build_format_swizzle_soa()
304 const struct util_format_description *format_desc, in lp_build_unpack_rgba_soa() argument
313 assert(format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN); in lp_build_unpack_rgba_soa()
314 assert(format_desc->block.width == 1); in lp_build_unpack_rgba_soa()
[all …]
Dlp_bld_format_aos.c472 const struct util_format_description *format_desc, in lp_build_fetch_rgba_aos() argument
482 util_format_unpack_description(format_desc->format); in lp_build_fetch_rgba_aos()
499 if (format_matches_type(format_desc, type) && in lp_build_fetch_rgba_aos()
500 format_desc->block.bits <= type.width * 4 && in lp_build_fetch_rgba_aos()
502 util_is_power_of_two_or_zero(format_desc->block.bits)) { in lp_build_fetch_rgba_aos()
515 format_desc->block.bits, fetch_type, in lp_build_fetch_rgba_aos()
518 assert(format_desc->block.bits <= vec_len); in lp_build_fetch_rgba_aos()
522 return lp_build_format_swizzle_aos(format_desc, &bld, packed); in lp_build_fetch_rgba_aos()
533 if (format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN && in lp_build_fetch_rgba_aos()
534 format_desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB && in lp_build_fetch_rgba_aos()
[all …]
Dlp_bld_format.h107 const struct util_format_description *format_desc,
118 const struct util_format_description *format_desc,
129 lp_build_format_swizzle_soa(const struct util_format_description *format_desc,
136 const struct util_format_description *format_desc,
149 const struct util_format_description *format_desc,
161 const struct util_format_description *format_desc,
175 const struct util_format_description *format_desc,
189 const struct util_format_description *format_desc,
203 const struct util_format_description *format_desc,
Dlp_bld_type.h181 lp_type_from_format_desc(struct lp_type* type, const struct util_format_description *format_desc) in lp_type_from_format_desc() argument
183 assert(format_desc->is_array); in lp_type_from_format_desc()
184 assert(!format_desc->is_mixed); in lp_type_from_format_desc()
187 type->floating = format_desc->channel[0].type == UTIL_FORMAT_TYPE_FLOAT; in lp_type_from_format_desc()
188 type->fixed = format_desc->channel[0].type == UTIL_FORMAT_TYPE_FIXED; in lp_type_from_format_desc()
189 type->sign = format_desc->channel[0].type != UTIL_FORMAT_TYPE_UNSIGNED; in lp_type_from_format_desc()
190 type->norm = format_desc->channel[0].normalized; in lp_type_from_format_desc()
191 type->width = format_desc->channel[0].size; in lp_type_from_format_desc()
192 type->length = format_desc->nr_channels; in lp_type_from_format_desc()
Dlp_bld_format_aos_array.c54 const struct util_format_description *format_desc, in lp_build_fetch_rgba_aos_array() argument
64 boolean pure_integer = format_desc->channel[0].pure_integer; in lp_build_fetch_rgba_aos_array()
67 lp_type_from_format_desc(&src_type, format_desc); in lp_build_fetch_rgba_aos_array()
113 res = lp_build_format_swizzle_aos(format_desc, &bld, res); in lp_build_fetch_rgba_aos_array()
Dlp_bld_format_s3tc.c221 const struct util_format_description *format_desc, in lp_build_gather_s3tc() argument
230 unsigned block_bits = format_desc->block.bits; in lp_build_gather_s3tc()
1091 const struct util_format_description *format_desc, in lp_build_gather_s3tc_simple_scalar() argument
1096 unsigned block_bits = format_desc->block.bits; in lp_build_gather_s3tc_simple_scalar()
1918 const struct util_format_description *format_desc) in generate_update_cache_one_block() argument
1945 lp_build_gather_s3tc_simple_scalar(gallivm, format_desc, &dxt_block, in generate_update_cache_one_block()
1948 switch (format_desc->format) { in generate_update_cache_one_block()
1953 s3tc_decode_block_dxt1(gallivm, format_desc->format, dxt_block, col); in generate_update_cache_one_block()
1957 s3tc_decode_block_dxt3(gallivm, format_desc->format, dxt_block, col); in generate_update_cache_one_block()
1961 s3tc_decode_block_dxt5(gallivm, format_desc->format, dxt_block, col); in generate_update_cache_one_block()
[all …]
Dlp_bld_sample_soa.c143 bld->format_desc, in lp_build_sample_texel_soa()
163 bld->format_desc, in lp_build_sample_texel_soa()
187 const struct util_format_description *format_desc = bld->format_desc; in lp_build_sample_texel_soa() local
199 if (util_format_has_stencil(format_desc)) { in lp_build_sample_texel_soa()
207 if (chan_s == format_desc->swizzle[chan]) { in lp_build_sample_texel_soa()
2591 const struct util_format_description *format_desc = bld->format_desc; in lp_build_sample_common() local
2594 chan_type = format_desc->swizzle[0] <= PIPE_SWIZZLE_W ? in lp_build_sample_common()
2595 format_desc->channel[format_desc->swizzle[0]].type : in lp_build_sample_common()
2709 const struct util_format_description *format_desc = bld->format_desc; in lp_build_clamp_border_color() local
2747 if (format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) { in lp_build_clamp_border_color()
[all …]
Dlp_bld_sample_aos.c403 if (util_format_is_rgba8_variant(bld->format_desc)) { in lp_build_sample_fetch_image_nearest()
410 bld->format_desc->block.bits, in lp_build_sample_fetch_image_nearest()
419 bld->format_desc, in lp_build_sample_fetch_image_nearest()
505 bld->format_desc->block.bits/8); in lp_build_sample_image_nearest()
509 bld->format_desc->block.width, in lp_build_sample_image_nearest()
519 bld->format_desc->block.height, in lp_build_sample_image_nearest()
654 if (util_format_is_rgba8_variant(bld->format_desc)) { in lp_build_sample_fetch_image_linear()
663 bld->format_desc->block.bits, in lp_build_sample_fetch_image_linear()
672 bld->format_desc, in lp_build_sample_fetch_image_linear()
851 bld->format_desc->block.bits/8); in lp_build_sample_image_linear()
[all …]
Dlp_bld_format_yuv.c484 const struct util_format_description *format_desc, in lp_build_fetch_subsampled_rgba_aos() argument
495 assert(format_desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED); in lp_build_fetch_subsampled_rgba_aos()
496 assert(format_desc->block.bits == 32); in lp_build_fetch_subsampled_rgba_aos()
497 assert(format_desc->block.width == 2); in lp_build_fetch_subsampled_rgba_aos()
498 assert(format_desc->block.height == 1); in lp_build_fetch_subsampled_rgba_aos()
505 switch (format_desc->format) { in lp_build_fetch_subsampled_rgba_aos()
/third_party/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_bld_depth.c304 lp_depth_type(const struct util_format_description *format_desc, in lp_depth_type() argument
310 assert(format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS); in lp_depth_type()
311 assert(format_desc->block.width == 1); in lp_depth_type()
312 assert(format_desc->block.height == 1); in lp_depth_type()
315 type.width = format_desc->block.bits; in lp_depth_type()
317 z_swizzle = format_desc->swizzle[0]; in lp_depth_type()
319 if (format_desc->channel[z_swizzle].type == UTIL_FORMAT_TYPE_FLOAT) { in lp_depth_type()
322 assert(format_desc->channel[z_swizzle].size == 32); in lp_depth_type()
324 else if (format_desc->channel[z_swizzle].type == UTIL_FORMAT_TYPE_UNSIGNED) { in lp_depth_type()
325 assert(format_desc->block.bits <= 32); in lp_depth_type()
[all …]
Dlp_screen.c670 const struct util_format_description *format_desc; in llvmpipe_is_format_supported() local
672 format_desc = util_format_description(format); in llvmpipe_is_format_supported()
688 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { in llvmpipe_is_format_supported()
690 if (format_desc->nr_channels < 3) in llvmpipe_is_format_supported()
693 else if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB) in llvmpipe_is_format_supported()
696 if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN && in llvmpipe_is_format_supported()
700 assert(format_desc->block.width == 1); in llvmpipe_is_format_supported()
701 assert(format_desc->block.height == 1); in llvmpipe_is_format_supported()
703 if (format_desc->is_mixed) in llvmpipe_is_format_supported()
706 if (!format_desc->is_array && !format_desc->is_bitmask && in llvmpipe_is_format_supported()
[all …]
Dlp_bld_depth.h52 lp_depth_type(const struct util_format_description *format_desc,
61 const struct util_format_description *format_desc,
77 const struct util_format_description *format_desc,
88 const struct util_format_description *format_desc,
Dlp_test_format.c347 const struct util_format_description *format_desc, in test_one() argument
352 if (!test_format_float(verbose, fp, format_desc, use_cache)) { in test_one()
356 if (!test_format_unorm8(verbose, fp, format_desc, use_cache)) { in test_one()
375 const struct util_format_description *format_desc; in test_all() local
377 format_desc = util_format_description(format); in test_all()
383 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) { in test_all()
400 if (format_desc->layout != UTIL_FORMAT_LAYOUT_S3TC && use_cache) { in test_all()
404 if (!test_one(verbose, fp, format_desc, use_cache)) { in test_all()
Dlp_state_fs.c134 is_arithmetic_format(const struct util_format_description *format_desc) in is_arithmetic_format() argument
138 for (unsigned i = 0; i < format_desc->nr_channels; ++i) { in is_arithmetic_format()
139 arith |= format_desc->channel[i].size != format_desc->channel[0].size; in is_arithmetic_format()
140 arith |= (format_desc->channel[i].size % 8) != 0; in is_arithmetic_format()
153 format_expands_to_float_soa(const struct util_format_description *format_desc) in format_expands_to_float_soa() argument
155 if (format_desc->format == PIPE_FORMAT_R11G11B10_FLOAT || in format_expands_to_float_soa()
156 format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { in format_expands_to_float_soa()
169 lp_mem_type_from_format_desc(const struct util_format_description *format_desc, in lp_mem_type_from_format_desc() argument
175 if (format_expands_to_float_soa(format_desc)) { in lp_mem_type_from_format_desc()
181 type->width = format_desc->block.bits; in lp_mem_type_from_format_desc()
[all …]
/third_party/mesa3d/src/util/format/
Du_format.c412 const struct util_format_description *format_desc; in util_format_read_4() local
415 format_desc = util_format_description(format); in util_format_read_4()
417 assert(x % format_desc->block.width == 0); in util_format_read_4()
418 assert(y % format_desc->block.height == 0); in util_format_read_4()
420 src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8); in util_format_read_4()
432 const struct util_format_description *format_desc; in util_format_write_4() local
437 format_desc = util_format_description(format); in util_format_write_4()
439 assert(x % format_desc->block.width == 0); in util_format_write_4()
440 assert(y % format_desc->block.height == 0); in util_format_write_4()
442 dst_row = (uint8_t *)dst + y*dst_stride + x*(format_desc->block.bits/8); in util_format_write_4()
[all …]
/third_party/mesa3d/src/gallium/drivers/softpipe/
Dsp_screen.c401 const struct util_format_description *format_desc; in softpipe_is_format_supported() local
416 format_desc = util_format_description(format); in softpipe_is_format_supported()
429 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) in softpipe_is_format_supported()
437 if (format_desc->block.width != 1 || in softpipe_is_format_supported()
438 format_desc->block.height != 1) in softpipe_is_format_supported()
443 if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) in softpipe_is_format_supported()
447 if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC || in softpipe_is_format_supported()
448 format_desc->layout == UTIL_FORMAT_LAYOUT_ATC) { in softpipe_is_format_supported()
471 if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && in softpipe_is_format_supported()
/third_party/mesa3d/src/gallium/drivers/virgl/
Dvirgl_screen.c577 const struct util_format_description *format_desc; in virgl_is_vertex_format_supported() local
580 format_desc = util_format_description(format); in virgl_is_vertex_format_supported()
593 if (format_desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) { in virgl_is_vertex_format_supported()
601 if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) in virgl_is_vertex_format_supported()
604 if (format_desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED) in virgl_is_vertex_format_supported()
663 const struct util_format_description *format_desc; in virgl_is_format_supported() local
687 format_desc = util_format_description(format); in virgl_is_format_supported()
724 if ((format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC || in virgl_is_format_supported()
725 format_desc->layout == UTIL_FORMAT_LAYOUT_ETC || in virgl_is_format_supported()
726 format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) && in virgl_is_format_supported()
[all …]
/third_party/mesa3d/src/gallium/auxiliary/util/
Du_draw.c62 const struct util_format_description *format_desc; in util_draw_max_index() local
73 format_desc = util_format_description(element->src_format); in util_draw_max_index()
74 assert(format_desc->block.width == 1); in util_draw_max_index()
75 assert(format_desc->block.height == 1); in util_draw_max_index()
76 assert(format_desc->block.bits % 8 == 0); in util_draw_max_index()
77 format_size = format_desc->block.bits/8; in util_draw_max_index()
Du_inlines.h838 const struct util_format_description *format_desc = util_format_description(info->dst.format); in util_blit_covers_whole_resource() local
840 if (util_format_has_depth(format_desc)) in util_blit_covers_whole_resource()
842 if (util_format_has_stencil(format_desc)) in util_blit_covers_whole_resource()
/third_party/mesa3d/src/gallium/auxiliary/translate/
Dtranslate_generic.c798 const struct util_format_description *format_desc = in translate_generic_create() local
805 if (format_desc->channel[0].pure_integer) { in translate_generic_create()
809 if (!is_legal_int_format_combo(format_desc, out_format_desc)) { in translate_generic_create()
829 && format_desc->block.width == 1 in translate_generic_create()
830 && format_desc->block.height == 1 in translate_generic_create()
831 && !(format_desc->block.bits & 7)) in translate_generic_create()
832 tg->attrib[i].copy_size = format_desc->block.bits >> 3; in translate_generic_create()
/third_party/mesa3d/src/gallium/drivers/d3d12/
Dd3d12_format.c337 *format_desc = util_format_description(pformat); in d3d12_get_format_info() local
358 } else if (util_format_has_depth(format_desc)) { in d3d12_get_format_info()
360 } else if (util_format_has_stencil(format_desc)) { in d3d12_get_format_info()
/third_party/mesa3d/src/intel/vulkan/
DgenX_state.c1020 const struct anv_format *format_desc = in genX() local
1027 if (format_desc && format_desc->n_planes == 1 && in genX()
1028 !isl_swizzle_is_identity(format_desc->planes[0].swizzle)) { in genX()
1029 const struct anv_format_plane *fmt_plane = &format_desc->planes[0]; in genX()
/third_party/mesa3d/src/gallium/drivers/panfrost/
Dpan_screen.c534 const struct util_format_description *format_desc; in panfrost_is_format_supported() local
546 format_desc = util_format_description(format); in panfrost_is_format_supported()
585 bool is_rgtc = format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC; in panfrost_is_format_supported()
/third_party/mesa3d/src/freedreno/fdl/
Dfd6_view.c349 const struct util_format_description *format_desc = in fdl6_view_init() local
351 if (util_format_has_depth(format_desc)) { in fdl6_view_init()

12