Home
last modified time | relevance | path

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

12

/external/mesa3d/src/gallium/tests/unit/
Du_format_test.c56 print_packed(const struct util_format_description *format_desc, in print_packed() argument
65 for (i = 0; i < format_desc->block.bits/8; ++i) { in print_packed()
75 print_unpacked_rgba_doubl(const struct util_format_description *format_desc, in print_unpacked_rgba_doubl() argument
84 for (i = 0; i < format_desc->block.height; ++i) { in print_unpacked_rgba_doubl()
85 for (j = 0; j < format_desc->block.width; ++j) { in print_unpacked_rgba_doubl()
97 print_unpacked_rgba_float(const struct util_format_description *format_desc, in print_unpacked_rgba_float() argument
106 for (i = 0; i < format_desc->block.height; ++i) { in print_unpacked_rgba_float()
107 for (j = 0; j < format_desc->block.width; ++j) { in print_unpacked_rgba_float()
119 print_unpacked_rgba_8unorm(const struct util_format_description *format_desc, in print_unpacked_rgba_8unorm() argument
128 for (i = 0; i < format_desc->block.height; ++i) { in print_unpacked_rgba_8unorm()
[all …]
/external/mesa3d/src/gallium/auxiliary/gallivm/
Dlp_bld_format_soa.c80 lp_build_format_swizzle_soa(const struct util_format_description *format_desc, in lp_build_format_swizzle_soa() argument
85 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) { in lp_build_format_swizzle_soa()
89 if (util_format_has_stencil(format_desc) && in lp_build_format_swizzle_soa()
90 !util_format_has_depth(format_desc)) { in lp_build_format_swizzle_soa()
92 swizzle = format_desc->swizzle[1]; in lp_build_format_swizzle_soa()
96 swizzle = format_desc->swizzle[0]; in lp_build_format_swizzle_soa()
110 enum pipe_swizzle swizzle = format_desc->swizzle[chan]; in lp_build_format_swizzle_soa()
302 const struct util_format_description *format_desc, in lp_build_unpack_rgba_soa() argument
311 assert(format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN); in lp_build_unpack_rgba_soa()
312 assert(format_desc->block.width == 1); in lp_build_unpack_rgba_soa()
[all …]
Dlp_bld_format_aos.c471 const struct util_format_description *format_desc, in lp_build_fetch_rgba_aos() argument
496 if (format_matches_type(format_desc, type) && in lp_build_fetch_rgba_aos()
497 format_desc->block.bits <= type.width * 4 && in lp_build_fetch_rgba_aos()
499 util_is_power_of_two(format_desc->block.bits)) { in lp_build_fetch_rgba_aos()
512 format_desc->block.bits, fetch_type, in lp_build_fetch_rgba_aos()
515 assert(format_desc->block.bits <= vec_len); in lp_build_fetch_rgba_aos()
519 return lp_build_format_swizzle_aos(format_desc, &bld, packed); in lp_build_fetch_rgba_aos()
530 if (format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN && in lp_build_fetch_rgba_aos()
531 format_desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB && in lp_build_fetch_rgba_aos()
532 util_format_fits_8unorm(format_desc) && in lp_build_fetch_rgba_aos()
[all …]
Dlp_bld_format.h102 const struct util_format_description *format_desc,
113 const struct util_format_description *format_desc,
124 lp_build_format_swizzle_soa(const struct util_format_description *format_desc,
131 const struct util_format_description *format_desc,
144 const struct util_format_description *format_desc,
160 const struct util_format_description *format_desc,
170 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()
112 res = lp_build_format_swizzle_aos(format_desc, &bld, res); in lp_build_fetch_rgba_aos_array()
Dlp_bld_format_cached.c144 const struct util_format_description *format_desc, in update_cached_block() argument
176 assert(format_desc->fetch_rgba_8unorm); in update_cached_block()
188 func_to_pointer((func_pointer) format_desc->fetch_rgba_8unorm)); in update_cached_block()
245 const struct util_format_description *format_desc, in lp_build_fetch_cached_texels() argument
267 assert(format_desc->block.width == 4); in lp_build_fetch_cached_texels()
268 assert(format_desc->block.height == 4); in lp_build_fetch_cached_texels()
284 low_bit = util_logbase2(format_desc->block.bits / 8); in lp_build_fetch_cached_texels()
332 update_cached_block(gallivm, format_desc, ptr_addrx, hash_indexx, cache); in lp_build_fetch_cached_texels()
358 update_cached_block(gallivm, format_desc, tmp, hash_index, cache); in lp_build_fetch_cached_texels()
Dlp_bld_sample_soa.c141 bld->format_desc, in lp_build_sample_texel_soa()
161 bld->format_desc, in lp_build_sample_texel_soa()
185 const struct util_format_description *format_desc = bld->format_desc; in lp_build_sample_texel_soa() local
198 if (chan_s == format_desc->swizzle[chan]) { in lp_build_sample_texel_soa()
2105 const struct util_format_description *format_desc = bld->format_desc; in lp_build_sample_common() local
2108 chan_type = format_desc->swizzle[0] <= PIPE_SWIZZLE_W ? in lp_build_sample_common()
2109 format_desc->channel[format_desc->swizzle[0]].type : in lp_build_sample_common()
2209 const struct util_format_description *format_desc = bld->format_desc; in lp_build_clamp_border_color() local
2247 if (format_desc->layout == UTIL_FORMAT_LAYOUT_PLAIN) { in lp_build_clamp_border_color()
2250 if (util_format_is_depth_and_stencil(format_desc->format)) { in lp_build_clamp_border_color()
[all …]
Dlp_bld_sample_aos.c588 if (util_format_is_rgba8_variant(bld->format_desc)) { in lp_build_sample_fetch_image_nearest()
595 bld->format_desc->block.bits, in lp_build_sample_fetch_image_nearest()
604 bld->format_desc, in lp_build_sample_fetch_image_nearest()
690 bld->format_desc->block.bits/8); in lp_build_sample_image_nearest()
694 bld->format_desc->block.width, in lp_build_sample_image_nearest()
704 bld->format_desc->block.height, in lp_build_sample_image_nearest()
813 bld->format_desc, in lp_build_sample_image_nearest_afloat()
929 if (util_format_is_rgba8_variant(bld->format_desc)) { in lp_build_sample_fetch_image_linear()
938 bld->format_desc->block.bits, in lp_build_sample_fetch_image_linear()
947 bld->format_desc, in lp_build_sample_fetch_image_linear()
[all …]
Dlp_bld_format_yuv.c485 const struct util_format_description *format_desc, in lp_build_fetch_subsampled_rgba_aos() argument
496 assert(format_desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED); in lp_build_fetch_subsampled_rgba_aos()
497 assert(format_desc->block.bits == 32); in lp_build_fetch_subsampled_rgba_aos()
498 assert(format_desc->block.width == 2); in lp_build_fetch_subsampled_rgba_aos()
499 assert(format_desc->block.height == 1); in lp_build_fetch_subsampled_rgba_aos()
506 switch (format_desc->format) { in lp_build_fetch_subsampled_rgba_aos()
/external/mesa3d/src/gallium/auxiliary/util/
Du_format.c303 const struct util_format_description *format_desc; in util_format_read_4f() local
307 format_desc = util_format_description(format); in util_format_read_4f()
309 assert(x % format_desc->block.width == 0); in util_format_read_4f()
310 assert(y % format_desc->block.height == 0); in util_format_read_4f()
312 src_row = (const uint8_t *)src + y*src_stride + x*(format_desc->block.bits/8); in util_format_read_4f()
315 format_desc->unpack_rgba_float(dst_row, dst_stride, src_row, src_stride, w, h); in util_format_read_4f()
325 const struct util_format_description *format_desc; in util_format_write_4f() local
329 format_desc = util_format_description(format); in util_format_write_4f()
331 assert(x % format_desc->block.width == 0); in util_format_write_4f()
332 assert(y % format_desc->block.height == 0); in util_format_write_4f()
[all …]
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()
/external/mesa3d/src/gallium/drivers/llvmpipe/
Dlp_bld_depth.c298 lp_depth_type(const struct util_format_description *format_desc, in lp_depth_type() argument
304 assert(format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS); in lp_depth_type()
305 assert(format_desc->block.width == 1); in lp_depth_type()
306 assert(format_desc->block.height == 1); in lp_depth_type()
309 type.width = format_desc->block.bits; in lp_depth_type()
311 z_swizzle = format_desc->swizzle[0]; in lp_depth_type()
313 if (format_desc->channel[z_swizzle].type == UTIL_FORMAT_TYPE_FLOAT) { in lp_depth_type()
316 assert(format_desc->channel[z_swizzle].size == 32); in lp_depth_type()
318 else if(format_desc->channel[z_swizzle].type == UTIL_FORMAT_TYPE_UNSIGNED) { in lp_depth_type()
319 assert(format_desc->block.bits <= 32); in lp_depth_type()
[all …]
Dlp_screen.c448 const struct util_format_description *format_desc; in llvmpipe_is_format_supported() local
450 format_desc = util_format_description(format); in llvmpipe_is_format_supported()
451 if (!format_desc) in llvmpipe_is_format_supported()
468 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { in llvmpipe_is_format_supported()
470 if (format_desc->nr_channels < 3) in llvmpipe_is_format_supported()
473 else if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB) in llvmpipe_is_format_supported()
476 if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN && in llvmpipe_is_format_supported()
480 assert(format_desc->block.width == 1); in llvmpipe_is_format_supported()
481 assert(format_desc->block.height == 1); in llvmpipe_is_format_supported()
483 if (format_desc->is_mixed) in llvmpipe_is_format_supported()
[all …]
Dlp_test_format.c338 const struct util_format_description *format_desc) in test_one() argument
342 if (!test_format_float(verbose, fp, format_desc)) { in test_one()
346 if (!test_format_unorm8(verbose, fp, format_desc)) { in test_one()
365 const struct util_format_description *format_desc; in test_all() local
367 format_desc = util_format_description(format); in test_all()
368 if (!format_desc) { in test_all()
377 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) { in test_all()
385 if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && in test_all()
391 if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC || in test_all()
392 format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) { in test_all()
[all …]
Dlp_bld_depth.h53 lp_depth_type(const struct util_format_description *format_desc,
62 const struct util_format_description *format_desc,
76 const struct util_format_description *format_desc,
87 const struct util_format_description *format_desc,
Dlp_state_fs.c976 is_arithmetic_format(const struct util_format_description *format_desc) in is_arithmetic_format() argument
981 for (i = 0; i < format_desc->nr_channels; ++i) { in is_arithmetic_format()
982 arith |= format_desc->channel[i].size != format_desc->channel[0].size; in is_arithmetic_format()
983 arith |= (format_desc->channel[i].size % 8) != 0; in is_arithmetic_format()
996 format_expands_to_float_soa(const struct util_format_description *format_desc) in format_expands_to_float_soa() argument
998 if (format_desc->format == PIPE_FORMAT_R11G11B10_FLOAT || in format_expands_to_float_soa()
999 format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { in format_expands_to_float_soa()
1012 lp_mem_type_from_format_desc(const struct util_format_description *format_desc, in lp_mem_type_from_format_desc() argument
1018 if (format_expands_to_float_soa(format_desc)) { in lp_mem_type_from_format_desc()
1024 type->width = format_desc->block.bits; in lp_mem_type_from_format_desc()
[all …]
/external/mesa3d/src/gallium/drivers/virgl/
Dvirgl_screen.c381 const struct util_format_description *format_desc; in virgl_is_vertex_format_supported() local
384 format_desc = util_format_description(format); in virgl_is_vertex_format_supported()
385 if (!format_desc) in virgl_is_vertex_format_supported()
399 if (format_desc->channel[i].type != UTIL_FORMAT_TYPE_VOID) { in virgl_is_vertex_format_supported()
407 if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) in virgl_is_vertex_format_supported()
410 if (format_desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED) in virgl_is_vertex_format_supported()
428 const struct util_format_description *format_desc; in virgl_is_format_supported() local
441 format_desc = util_format_description(format); in virgl_is_format_supported()
442 if (!format_desc) in virgl_is_format_supported()
460 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) in virgl_is_format_supported()
[all …]
/external/virglrenderer/src/gallium/auxiliary/util/
Du_format.c325 util_format_fits_8unorm(const struct util_format_description *format_desc) in util_format_fits_8unorm() argument
333 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) { in util_format_fits_8unorm()
337 switch (format_desc->layout) { in util_format_fits_8unorm()
345 if (format_desc->format == PIPE_FORMAT_RGTC1_SNORM || in util_format_fits_8unorm()
346 format_desc->format == PIPE_FORMAT_RGTC2_SNORM || in util_format_fits_8unorm()
347 format_desc->format == PIPE_FORMAT_LATC1_SNORM || in util_format_fits_8unorm()
348 format_desc->format == PIPE_FORMAT_LATC2_SNORM) in util_format_fits_8unorm()
352 if (format_desc->format == PIPE_FORMAT_BPTC_RGBA_UNORM) in util_format_fits_8unorm()
361 for (chan = 0; chan < format_desc->nr_channels; ++chan) { in util_format_fits_8unorm()
362 switch (format_desc->channel[chan].type) { in util_format_fits_8unorm()
[all …]
/external/mesa3d/src/gallium/drivers/softpipe/
Dsp_screen.c386 const struct util_format_description *format_desc; in softpipe_is_format_supported() local
398 format_desc = util_format_description(format); in softpipe_is_format_supported()
399 if (!format_desc) in softpipe_is_format_supported()
413 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) in softpipe_is_format_supported()
421 if (format_desc->block.width != 1 || in softpipe_is_format_supported()
422 format_desc->block.height != 1) in softpipe_is_format_supported()
427 if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) in softpipe_is_format_supported()
431 if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC || in softpipe_is_format_supported()
432 format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) { in softpipe_is_format_supported()
455 if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && in softpipe_is_format_supported()
Dsp_buffer.c60 … const struct util_format_description *format_desc = util_format_description(PIPE_FORMAT_R32_UINT); in sp_tgsi_load() local
92 format_desc->fetch_rgba_uint(sdata, data_ptr, 0, 0); in sp_tgsi_load()
118 … const struct util_format_description *format_desc = util_format_description(PIPE_FORMAT_R32_UINT); in sp_tgsi_store() local
148 format_desc->pack_rgba_uint(dptr, 0, temp, 0, 1, 1); in sp_tgsi_store()
168 … const struct util_format_description *format_desc = util_format_description(PIPE_FORMAT_R32_UINT); in handle_op_uint() local
174 format_desc->fetch_rgba_uint(temp, dptr, 0, 0); in handle_op_uint()
273 format_desc->pack_rgba_uint(dptr, 0, temp, 0, 1, 1); in handle_op_uint()
/external/autotest/client/site_tests/camera_V4L2/src/
Dmedia_v4l2_device.cc660 v4l2_fmtdesc format_desc; in EnumFormat() local
661 memset(&format_desc, 0, sizeof(format_desc)); in EnumFormat()
662 format_desc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; in EnumFormat()
663 format_desc.index = i; in EnumFormat()
664 if (-1 == DoIoctl(VIDIOC_ENUM_FMT, &format_desc)) { in EnumFormat()
674 i+1, format_desc.description, in EnumFormat()
675 (format_desc.pixelformat >> 0) & 0xff, in EnumFormat()
676 (format_desc.pixelformat >> 8) & 0xff, in EnumFormat()
677 (format_desc.pixelformat >> 16) & 0xff, in EnumFormat()
678 (format_desc.pixelformat >> 24) & 0xff); in EnumFormat()
[all …]
/external/mesa3d/src/gallium/auxiliary/translate/
Dtranslate_generic.c800 const struct util_format_description *format_desc = in translate_generic_create() local
803 assert(format_desc); in translate_generic_create()
807 if (format_desc->channel[0].pure_integer) { in translate_generic_create()
811 if (!is_legal_int_format_combo(format_desc, out_format_desc)) { in translate_generic_create()
816 if (format_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) { in translate_generic_create()
817 assert(format_desc->fetch_rgba_sint); in translate_generic_create()
818 tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_sint; in translate_generic_create()
820 assert(format_desc->fetch_rgba_uint); in translate_generic_create()
821 tg->attrib[i].fetch = (fetch_func)format_desc->fetch_rgba_uint; in translate_generic_create()
824 assert(format_desc->fetch_rgba_float); in translate_generic_create()
[all …]
/external/mesa3d/src/gallium/drivers/swr/
Dswr_screen.cpp92 const struct util_format_description *format_desc; in swr_is_format_supported() local
103 format_desc = util_format_description(format); in swr_is_format_supported()
104 if (!format_desc) in swr_is_format_supported()
117 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) in swr_is_format_supported()
128 if (format_desc->block.width != 1 || format_desc->block.height != 1) in swr_is_format_supported()
133 if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) in swr_is_format_supported()
140 if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC || in swr_is_format_supported()
141 format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) { in swr_is_format_supported()
145 if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && in swr_is_format_supported()
/external/mesa3d/src/gallium/auxiliary/draw/
Ddraw_llvm.c663 const struct util_format_description *format_desc, in fetch_instanced() argument
698 format_desc, in fetch_instanced()
721 const struct util_format_description *format_desc, in fetch_vector() argument
761 if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB && in fetch_vector()
762 format_desc->channel[0].pure_integer) { in fetch_vector()
763 if (format_desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) { in fetch_vector()
766 else if (format_desc->channel[0].type == UTIL_FORMAT_TYPE_UNSIGNED) { in fetch_vector()
771 lp_build_fetch_rgba_soa(gallivm, format_desc, in fetch_vector()
1861 const struct util_format_description *format_desc = in draw_llvm_generate() local
1864 if (format_desc->format == PIPE_FORMAT_NONE) { in draw_llvm_generate()
[all …]

12