Lines Matching defs:desc

42 radv_translate_buffer_dataformat(const struct util_format_description *desc, int first_non_void)
47 assert(util_format_get_num_planes(desc->format) == 1);
49 if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT)
54 type = desc->channel[first_non_void].type;
58 if (desc->nr_channels == 4 && desc->channel[0].size == 10 && desc->channel[1].size == 10 &&
59 desc->channel[2].size == 10 && desc->channel[3].size == 2)
63 for (i = 0; i < desc->nr_channels; i++) {
64 if (desc->channel[first_non_void].size != desc->channel[i].size)
68 switch (desc->channel[first_non_void].size) {
70 switch (desc->nr_channels) {
80 switch (desc->nr_channels) {
94 if (type != UTIL_FORMAT_TYPE_FLOAT && !desc->channel[first_non_void].pure_integer)
97 switch (desc->nr_channels) {
109 if (type != UTIL_FORMAT_TYPE_FLOAT && desc->nr_channels == 1)
117 radv_translate_buffer_numformat(const struct util_format_description *desc, int first_non_void)
119 assert(util_format_get_num_planes(desc->format) == 1);
121 if (desc->format == PIPE_FORMAT_R11G11B10_FLOAT)
127 switch (desc->channel[first_non_void].type) {
129 if (desc->channel[first_non_void].normalized)
131 else if (desc->channel[first_non_void].pure_integer)
137 if (desc->channel[first_non_void].normalized)
139 else if (desc->channel[first_non_void].pure_integer)
152 const struct util_format_description *desc, unsigned *dfmt,
156 assert(desc->channel[0].type != UTIL_FORMAT_TYPE_VOID);
157 *nfmt = radv_translate_buffer_numformat(desc, 0);
158 *dfmt = radv_translate_buffer_dataformat(desc, 0);
203 radv_translate_tex_dataformat(VkFormat format, const struct util_format_description *desc,
212 switch (desc->colorspace) {
238 if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
250 if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
263 if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
281 if (desc->layout == UTIL_FORMAT_LAYOUT_BPTC) {
294 if (desc->layout == UTIL_FORMAT_LAYOUT_ETC) {
326 if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
330 for (i = 1; i < desc->nr_channels; i++) {
331 uniform = uniform && desc->channel[0].size == desc->channel[i].size;
336 switch (desc->nr_channels) {
338 if (desc->channel[0].size == 5 && desc->channel[1].size == 6 &&
339 desc->channel[2].size == 5) {
344 if (desc->channel[0].size == 5 && desc->channel[1].size == 5 &&
345 desc->channel[2].size == 5 && desc->channel[3].size == 1) {
348 if (desc->channel[0].size == 1 && desc->channel[1].size == 5 &&
349 desc->channel[2].size == 5 && desc->channel[3].size == 5) {
352 if (desc->channel[0].size == 10 && desc->channel[1].size == 10 &&
353 desc->channel[2].size == 10 && desc->channel[3].size == 2) {
355 if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED && desc->channel[0].normalized)
368 switch (desc->channel[first_non_void].size) {
370 switch (desc->nr_channels) {
380 switch (desc->nr_channels) {
390 switch (desc->nr_channels) {
400 switch (desc->nr_channels) {
412 if (desc->channel[0].type != UTIL_FORMAT_TYPE_FLOAT && desc->nr_channels == 1)
423 radv_translate_tex_numformat(VkFormat format, const struct util_format_description *desc,
453 } else if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
458 } else if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
461 switch (desc->channel[first_non_void].type) {
465 if (desc->channel[first_non_void].normalized)
467 else if (desc->channel[first_non_void].pure_integer)
472 if (desc->channel[first_non_void].normalized)
474 else if (desc->channel[first_non_void].pure_integer)
486 radv_translate_color_numformat(VkFormat format, const struct util_format_description *desc,
493 if (first_non_void == -1 || desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_FLOAT)
497 if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
499 else if (desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_SIGNED) {
500 if (desc->channel[first_non_void].pure_integer) {
502 } else if (desc->channel[first_non_void].normalized) {
506 } else if (desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED) {
507 if (desc->channel[first_non_void].pure_integer) {
509 } else if (desc->channel[first_non_void].normalized) {
521 const struct util_format_description *desc = vk_format_description(format);
527 radv_translate_tex_numformat(format, desc, vk_format_get_first_non_void_channel(format));
554 const struct util_format_description *desc = vk_format_description(format);
560 radv_translate_tex_dataformat(format, desc, vk_format_get_first_non_void_channel(format));
562 radv_translate_tex_numformat(format, desc, vk_format_get_first_non_void_channel(format));
609 const struct util_format_description *desc = vk_format_description(format);
615 radv_translate_buffer_dataformat(desc, vk_format_get_first_non_void_channel(format));
616 num_format = radv_translate_buffer_numformat(desc, vk_format_get_first_non_void_channel(format));
628 const struct util_format_description *desc = vk_format_description(format);
632 radv_translate_color_numformat(format, desc, vk_format_get_first_non_void_channel(format));
697 const struct util_format_description *desc = vk_format_description(format);
701 if (desc->format == PIPE_FORMAT_NONE || desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
708 if (desc->layout == UTIL_FORMAT_LAYOUT_ETC && !radv_device_supports_etc(physical_device) &&
717 if (multiplanar || desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
725 if (desc->layout != UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
734 desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED ? 0 : tiling;
895 const struct util_format_description *desc = vk_format_description(format);
898 (desc->channel[0].size == (x) && desc->channel[1].size == (y) && \
899 desc->channel[2].size == (z) && desc->channel[3].size == (w))
907 if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
912 if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS)
915 switch (desc->nr_channels) {
917 switch (desc->channel[0].size) {
927 if (desc->channel[0].size == desc->channel[1].size) {
928 switch (desc->channel[0].size) {
950 if (desc->channel[0].size == desc->channel[1].size &&
951 desc->channel[0].size == desc->channel[2].size &&
952 desc->channel[0].size == desc->channel[3].size) {
953 switch (desc->channel[0].size) {
1036 const struct util_format_description *desc = vk_format_description(format);
1038 #define HAS_SWIZZLE(chan, swz) (desc->swizzle[chan] == PIPE_SWIZZLE_##swz)
1046 if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN)
1049 switch (desc->nr_channels) {
1086 if (desc->is_array)
1099 const struct util_format_description *desc = vk_format_description(format);
1111 if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
1116 if (!util_is_power_of_two_or_zero(desc->block.bits)) {
1121 if (desc->block.bits > 64) {
1128 if (desc->channel[0].type == UTIL_FORMAT_TYPE_FLOAT) {
1142 if (desc->swizzle[c] >= 4)
1145 const struct util_format_channel_description *channel = &desc->channel[desc->swizzle[c]];
1152 if (channel->type == UTIL_FORMAT_TYPE_UNSIGNED && desc->swizzle[c] < 3 &&
1153 desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB) {
1358 const struct util_format_description *desc = vk_format_description(format);
1364 if (desc->layout == UTIL_FORMAT_LAYOUT_ETC && dev->emulate_etc2)
1478 const struct util_format_description *desc = vk_format_description(format);
1535 if (desc->layout == UTIL_FORMAT_LAYOUT_SUBSAMPLED) {
1642 (desc->layout == UTIL_FORMAT_LAYOUT_ETC && physical_device->emulate_etc2)) {
1688 const struct util_format_description *desc = vk_format_description(pImageFormatInfo->format);
1690 if (desc->layout == UTIL_FORMAT_LAYOUT_ETC && physical_device->emulate_etc2)
2057 radv_get_dcc_channel_type(const struct util_format_description *desc, enum dcc_channel_type *type,
2063 for (i = 0; i < desc->nr_channels; i++)
2064 if (desc->channel[i].type != UTIL_FORMAT_TYPE_VOID)
2066 if (i == desc->nr_channels) {
2071 switch (desc->channel[i].size) {
2076 *size = desc->channel[i].size;
2077 if (desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT)
2079 else if (desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED)