• Home
  • Raw
  • Download

Lines Matching refs:desc

37 uint32_t radv_translate_buffer_dataformat(const struct vk_format_description *desc,  in radv_translate_buffer_dataformat()  argument
43 assert(desc->layout != VK_FORMAT_LAYOUT_MULTIPLANE); in radv_translate_buffer_dataformat()
45 if (desc->format == VK_FORMAT_B10G11R11_UFLOAT_PACK32) in radv_translate_buffer_dataformat()
50 type = desc->channel[first_non_void].type; in radv_translate_buffer_dataformat()
54 if (desc->nr_channels == 4 && in radv_translate_buffer_dataformat()
55 desc->channel[0].size == 10 && in radv_translate_buffer_dataformat()
56 desc->channel[1].size == 10 && in radv_translate_buffer_dataformat()
57 desc->channel[2].size == 10 && in radv_translate_buffer_dataformat()
58 desc->channel[3].size == 2) in radv_translate_buffer_dataformat()
62 for (i = 0; i < desc->nr_channels; i++) { in radv_translate_buffer_dataformat()
63 if (desc->channel[first_non_void].size != desc->channel[i].size) in radv_translate_buffer_dataformat()
67 switch (desc->channel[first_non_void].size) { in radv_translate_buffer_dataformat()
69 switch (desc->nr_channels) { in radv_translate_buffer_dataformat()
79 switch (desc->nr_channels) { in radv_translate_buffer_dataformat()
94 !desc->channel[first_non_void].pure_integer) in radv_translate_buffer_dataformat()
97 switch (desc->nr_channels) { in radv_translate_buffer_dataformat()
109 if (desc->nr_channels == 1) in radv_translate_buffer_dataformat()
116 uint32_t radv_translate_buffer_numformat(const struct vk_format_description *desc, in radv_translate_buffer_numformat() argument
119 assert(desc->layout != VK_FORMAT_LAYOUT_MULTIPLANE); in radv_translate_buffer_numformat()
121 if (desc->format == VK_FORMAT_B10G11R11_UFLOAT_PACK32) in radv_translate_buffer_numformat()
127 switch (desc->channel[first_non_void].type) { in radv_translate_buffer_numformat()
129 if (desc->channel[first_non_void].normalized) in radv_translate_buffer_numformat()
131 else if (desc->channel[first_non_void].pure_integer) in radv_translate_buffer_numformat()
137 if (desc->channel[first_non_void].normalized) in radv_translate_buffer_numformat()
139 else if (desc->channel[first_non_void].pure_integer) in radv_translate_buffer_numformat()
151 const struct vk_format_description *desc, in radv_translate_tex_dataformat() argument
159 if (!desc) in radv_translate_tex_dataformat()
162 switch (desc->colorspace) { in radv_translate_tex_dataformat()
185 if (desc->nr_channels != 4 && desc->nr_channels != 1) in radv_translate_tex_dataformat()
193 if (desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_translate_tex_dataformat()
205 if (desc->layout == VK_FORMAT_LAYOUT_RGTC) { in radv_translate_tex_dataformat()
218 if (desc->layout == VK_FORMAT_LAYOUT_S3TC) { in radv_translate_tex_dataformat()
236 if (desc->layout == VK_FORMAT_LAYOUT_BPTC) { in radv_translate_tex_dataformat()
249 if (desc->layout == VK_FORMAT_LAYOUT_ETC) { in radv_translate_tex_dataformat()
281 if (desc->is_mixed && desc->colorspace != VK_FORMAT_COLORSPACE_ZS) in radv_translate_tex_dataformat()
285 for (i = 1; i < desc->nr_channels; i++) { in radv_translate_tex_dataformat()
286 uniform = uniform && desc->channel[0].size == desc->channel[i].size; in radv_translate_tex_dataformat()
291 switch(desc->nr_channels) { in radv_translate_tex_dataformat()
293 if (desc->channel[0].size == 5 && in radv_translate_tex_dataformat()
294 desc->channel[1].size == 6 && in radv_translate_tex_dataformat()
295 desc->channel[2].size == 5) { in radv_translate_tex_dataformat()
300 if (desc->channel[0].size == 5 && in radv_translate_tex_dataformat()
301 desc->channel[1].size == 5 && in radv_translate_tex_dataformat()
302 desc->channel[2].size == 5 && in radv_translate_tex_dataformat()
303 desc->channel[3].size == 1) { in radv_translate_tex_dataformat()
306 if (desc->channel[0].size == 1 && in radv_translate_tex_dataformat()
307 desc->channel[1].size == 5 && in radv_translate_tex_dataformat()
308 desc->channel[2].size == 5 && in radv_translate_tex_dataformat()
309 desc->channel[3].size == 5) { in radv_translate_tex_dataformat()
312 if (desc->channel[0].size == 10 && in radv_translate_tex_dataformat()
313 desc->channel[1].size == 10 && in radv_translate_tex_dataformat()
314 desc->channel[2].size == 10 && in radv_translate_tex_dataformat()
315 desc->channel[3].size == 2) { in radv_translate_tex_dataformat()
317 if (desc->channel[0].type == VK_FORMAT_TYPE_SIGNED && in radv_translate_tex_dataformat()
318 desc->channel[0].normalized) in radv_translate_tex_dataformat()
331 switch (desc->channel[first_non_void].size) { in radv_translate_tex_dataformat()
333 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
343 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
353 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
363 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
375 if (desc->nr_channels == 1) in radv_translate_tex_dataformat()
386 const struct vk_format_description *desc, in radv_translate_tex_numformat() argument
416 } else if (desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_translate_tex_numformat()
421 } else if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) { in radv_translate_tex_numformat()
424 switch (desc->channel[first_non_void].type) { in radv_translate_tex_numformat()
428 if (desc->channel[first_non_void].normalized) in radv_translate_tex_numformat()
430 else if (desc->channel[first_non_void].pure_integer) in radv_translate_tex_numformat()
435 if (desc->channel[first_non_void].normalized) in radv_translate_tex_numformat()
437 else if (desc->channel[first_non_void].pure_integer) in radv_translate_tex_numformat()
449 const struct vk_format_description *desc, in radv_translate_color_numformat() argument
456 if (first_non_void == -1 || desc->channel[first_non_void].type == VK_FORMAT_TYPE_FLOAT) in radv_translate_color_numformat()
460 if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) in radv_translate_color_numformat()
462 else if (desc->channel[first_non_void].type == VK_FORMAT_TYPE_SIGNED) { in radv_translate_color_numformat()
463 if (desc->channel[first_non_void].pure_integer) { in radv_translate_color_numformat()
465 } else if (desc->channel[first_non_void].normalized) { in radv_translate_color_numformat()
469 } else if (desc->channel[first_non_void].type == VK_FORMAT_TYPE_UNSIGNED) { in radv_translate_color_numformat()
470 if (desc->channel[first_non_void].pure_integer) { in radv_translate_color_numformat()
472 } else if (desc->channel[first_non_void].normalized) { in radv_translate_color_numformat()
483 const struct vk_format_description *desc = vk_format_description(format); in radv_is_sampler_format_supported() local
485 if (!desc || format == VK_FORMAT_UNDEFINED || in radv_is_sampler_format_supported()
488 num_format = radv_translate_tex_numformat(format, desc, in radv_is_sampler_format_supported()
510 const struct vk_format_description *desc = vk_format_description(format); in radv_is_storage_image_format_supported() local
512 if (!desc || format == VK_FORMAT_UNDEFINED) in radv_is_storage_image_format_supported()
515 data_format = radv_translate_tex_dataformat(format, desc, in radv_is_storage_image_format_supported()
517 num_format = radv_translate_tex_numformat(format, desc, in radv_is_storage_image_format_supported()
562 const struct vk_format_description *desc = vk_format_description(format); in radv_is_buffer_format_supported() local
564 if (!desc || format == VK_FORMAT_UNDEFINED) in radv_is_buffer_format_supported()
567 data_format = radv_translate_buffer_dataformat(desc, in radv_is_buffer_format_supported()
569 num_format = radv_translate_buffer_numformat(desc, in radv_is_buffer_format_supported()
581 const struct vk_format_description *desc = vk_format_description(format); in radv_is_colorbuffer_format_supported() local
585 desc, in radv_is_colorbuffer_format_supported()
652 const struct vk_format_description *desc = vk_format_description(format); in radv_physical_device_get_format_properties() local
656 if (!desc || desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_physical_device_get_format_properties()
663 if (desc->layout == VK_FORMAT_LAYOUT_ETC && in radv_physical_device_get_format_properties()
671 if (desc->layout == VK_FORMAT_LAYOUT_MULTIPLANE || in radv_physical_device_get_format_properties()
672 desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_physical_device_get_format_properties()
680 if (desc->layout != VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_physical_device_get_format_properties()
685 out_properties->linearTilingFeatures = desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED ? 0 : tiling; in radv_physical_device_get_format_properties()
810 const struct vk_format_description *desc = vk_format_description(format); in radv_translate_colorformat() local
813 (desc->channel[0].size == (x) && desc->channel[1].size == (y) && \ in radv_translate_colorformat()
814 desc->channel[2].size == (z) && desc->channel[3].size == (w)) in radv_translate_colorformat()
822 if (desc->layout != VK_FORMAT_LAYOUT_PLAIN) in radv_translate_colorformat()
827 if (desc->is_mixed && desc->colorspace != VK_FORMAT_COLORSPACE_ZS) in radv_translate_colorformat()
830 switch (desc->nr_channels) { in radv_translate_colorformat()
832 switch (desc->channel[0].size) { in radv_translate_colorformat()
842 if (desc->channel[0].size == desc->channel[1].size) { in radv_translate_colorformat()
843 switch (desc->channel[0].size) { in radv_translate_colorformat()
865 if (desc->channel[0].size == desc->channel[1].size && in radv_translate_colorformat()
866 desc->channel[0].size == desc->channel[2].size && in radv_translate_colorformat()
867 desc->channel[0].size == desc->channel[3].size) { in radv_translate_colorformat()
868 switch (desc->channel[0].size) { in radv_translate_colorformat()
948 const struct vk_format_description *desc = vk_format_description(format); in radv_translate_colorswap() local
950 #define HAS_SWIZZLE(chan,swz) (desc->swizzle[chan] == VK_SWIZZLE_##swz) in radv_translate_colorswap()
958 if (desc->layout != VK_FORMAT_LAYOUT_PLAIN) in radv_translate_colorswap()
961 switch (desc->nr_channels) { in radv_translate_colorswap()
999 if (desc->is_array) in radv_translate_colorswap()
1013 const struct vk_format_description *desc = vk_format_description(format); in radv_format_pack_clear_color() local
1025 if (desc->layout != VK_FORMAT_LAYOUT_PLAIN) { in radv_format_pack_clear_color()
1030 if (!util_is_power_of_two_or_zero(desc->block.bits)) { in radv_format_pack_clear_color()
1035 if (desc->block.bits > 64) { in radv_format_pack_clear_color()
1042 if (desc->channel[0].type == VK_FORMAT_TYPE_FLOAT) { in radv_format_pack_clear_color()
1058 if (desc->swizzle[c] >= 4) in radv_format_pack_clear_color()
1061 const struct vk_format_channel_description *channel = &desc->channel[desc->swizzle[c]]; in radv_format_pack_clear_color()
1069 desc->swizzle[c] < 3 && in radv_format_pack_clear_color()
1070 desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) { in radv_format_pack_clear_color()
1149 const struct vk_format_description *desc = vk_format_description(format); in radv_get_image_format_properties() local
1200 if (desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_get_image_format_properties()
1285 if (desc->plane_count > 1) in radv_get_image_format_properties()
1589 radv_get_dcc_channel_type(const struct vk_format_description *desc) in radv_get_dcc_channel_type() argument
1594 for (i = 0; i < desc->nr_channels; i++) in radv_get_dcc_channel_type()
1595 if (desc->channel[i].type != VK_FORMAT_TYPE_VOID) in radv_get_dcc_channel_type()
1597 if (i == desc->nr_channels) in radv_get_dcc_channel_type()
1600 switch (desc->channel[i].size) { in radv_get_dcc_channel_type()
1602 if (desc->channel[i].type == VK_FORMAT_TYPE_FLOAT) in radv_get_dcc_channel_type()
1604 if (desc->channel[i].type == VK_FORMAT_TYPE_UNSIGNED) in radv_get_dcc_channel_type()
1608 if (desc->channel[i].type == VK_FORMAT_TYPE_FLOAT) in radv_get_dcc_channel_type()
1610 if (desc->channel[i].type == VK_FORMAT_TYPE_UNSIGNED) in radv_get_dcc_channel_type()
1616 if (desc->channel[i].type == VK_FORMAT_TYPE_UNSIGNED) in radv_get_dcc_channel_type()