Lines Matching refs:desc
36 uint32_t radv_translate_buffer_dataformat(const struct vk_format_description *desc, in radv_translate_buffer_dataformat() argument
42 if (desc->format == VK_FORMAT_B10G11R11_UFLOAT_PACK32) in radv_translate_buffer_dataformat()
47 type = desc->channel[first_non_void].type; in radv_translate_buffer_dataformat()
51 if (desc->nr_channels == 4 && in radv_translate_buffer_dataformat()
52 desc->channel[0].size == 10 && in radv_translate_buffer_dataformat()
53 desc->channel[1].size == 10 && in radv_translate_buffer_dataformat()
54 desc->channel[2].size == 10 && in radv_translate_buffer_dataformat()
55 desc->channel[3].size == 2) in radv_translate_buffer_dataformat()
59 for (i = 0; i < desc->nr_channels; i++) { in radv_translate_buffer_dataformat()
60 if (desc->channel[first_non_void].size != desc->channel[i].size) in radv_translate_buffer_dataformat()
64 switch (desc->channel[first_non_void].size) { in radv_translate_buffer_dataformat()
66 switch (desc->nr_channels) { in radv_translate_buffer_dataformat()
76 switch (desc->nr_channels) { in radv_translate_buffer_dataformat()
91 !desc->channel[first_non_void].pure_integer) in radv_translate_buffer_dataformat()
94 switch (desc->nr_channels) { in radv_translate_buffer_dataformat()
110 uint32_t radv_translate_buffer_numformat(const struct vk_format_description *desc, in radv_translate_buffer_numformat() argument
113 if (desc->format == VK_FORMAT_B10G11R11_UFLOAT_PACK32) in radv_translate_buffer_numformat()
119 switch (desc->channel[first_non_void].type) { in radv_translate_buffer_numformat()
121 if (desc->channel[first_non_void].normalized) in radv_translate_buffer_numformat()
123 else if (desc->channel[first_non_void].pure_integer) 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()
143 const struct vk_format_description *desc, in radv_translate_tex_dataformat() argument
149 if (!desc) in radv_translate_tex_dataformat()
152 switch (desc->colorspace) { in radv_translate_tex_dataformat()
175 if (desc->nr_channels != 4 && desc->nr_channels != 1) in radv_translate_tex_dataformat()
183 if (desc->layout == VK_FORMAT_LAYOUT_RGTC) { in radv_translate_tex_dataformat()
196 if (desc->layout == VK_FORMAT_LAYOUT_S3TC) { in radv_translate_tex_dataformat()
214 if (desc->layout == VK_FORMAT_LAYOUT_BPTC) { in radv_translate_tex_dataformat()
237 if (desc->is_mixed && desc->colorspace != VK_FORMAT_COLORSPACE_ZS) in radv_translate_tex_dataformat()
241 for (i = 1; i < desc->nr_channels; i++) { in radv_translate_tex_dataformat()
242 uniform = uniform && desc->channel[0].size == desc->channel[i].size; in radv_translate_tex_dataformat()
247 switch(desc->nr_channels) { in radv_translate_tex_dataformat()
249 if (desc->channel[0].size == 5 && in radv_translate_tex_dataformat()
250 desc->channel[1].size == 6 && in radv_translate_tex_dataformat()
251 desc->channel[2].size == 5) { in radv_translate_tex_dataformat()
256 if (desc->channel[0].size == 5 && in radv_translate_tex_dataformat()
257 desc->channel[1].size == 5 && in radv_translate_tex_dataformat()
258 desc->channel[2].size == 5 && in radv_translate_tex_dataformat()
259 desc->channel[3].size == 1) { in radv_translate_tex_dataformat()
262 if (desc->channel[0].size == 1 && in radv_translate_tex_dataformat()
263 desc->channel[1].size == 5 && in radv_translate_tex_dataformat()
264 desc->channel[2].size == 5 && in radv_translate_tex_dataformat()
265 desc->channel[3].size == 5) { in radv_translate_tex_dataformat()
268 if (desc->channel[0].size == 10 && in radv_translate_tex_dataformat()
269 desc->channel[1].size == 10 && in radv_translate_tex_dataformat()
270 desc->channel[2].size == 10 && in radv_translate_tex_dataformat()
271 desc->channel[3].size == 2) { in radv_translate_tex_dataformat()
273 if (desc->channel[0].type == VK_FORMAT_TYPE_SIGNED && in radv_translate_tex_dataformat()
274 desc->channel[0].normalized) in radv_translate_tex_dataformat()
287 switch (desc->channel[first_non_void].size) { in radv_translate_tex_dataformat()
289 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
299 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
309 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
319 switch (desc->nr_channels) { in radv_translate_tex_dataformat()
339 const struct vk_format_description *desc, in radv_translate_tex_numformat() argument
362 } else if (desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED) { in radv_translate_tex_numformat()
367 } else if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) { in radv_translate_tex_numformat()
370 switch (desc->channel[first_non_void].type) { in radv_translate_tex_numformat()
374 if (desc->channel[first_non_void].normalized) in radv_translate_tex_numformat()
376 else if (desc->channel[first_non_void].pure_integer) in radv_translate_tex_numformat()
381 if (desc->channel[first_non_void].normalized) in radv_translate_tex_numformat()
383 else if (desc->channel[first_non_void].pure_integer) in radv_translate_tex_numformat()
395 const struct vk_format_description *desc, in radv_translate_color_numformat() argument
399 if (first_non_void == -1 || desc->channel[first_non_void].type == VK_FORMAT_TYPE_FLOAT) in radv_translate_color_numformat()
403 if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) in radv_translate_color_numformat()
405 else if (desc->channel[first_non_void].type == VK_FORMAT_TYPE_SIGNED) { in radv_translate_color_numformat()
406 if (desc->channel[first_non_void].pure_integer) { in radv_translate_color_numformat()
408 } else if (desc->channel[first_non_void].normalized) { in radv_translate_color_numformat()
412 } else if (desc->channel[first_non_void].type == VK_FORMAT_TYPE_UNSIGNED) { in radv_translate_color_numformat()
413 if (desc->channel[first_non_void].pure_integer) { in radv_translate_color_numformat()
415 } else if (desc->channel[first_non_void].normalized) { in radv_translate_color_numformat()
426 const struct vk_format_description *desc = vk_format_description(format); in radv_is_sampler_format_supported() local
428 if (!desc || format == VK_FORMAT_UNDEFINED) in radv_is_sampler_format_supported()
430 num_format = radv_translate_tex_numformat(format, desc, in radv_is_sampler_format_supported()
452 const struct vk_format_description *desc = vk_format_description(format); in radv_is_storage_image_format_supported() local
454 if (!desc || format == VK_FORMAT_UNDEFINED) in radv_is_storage_image_format_supported()
457 data_format = radv_translate_tex_dataformat(format, desc, in radv_is_storage_image_format_supported()
459 num_format = radv_translate_tex_numformat(format, desc, in radv_is_storage_image_format_supported()
504 const struct vk_format_description *desc = vk_format_description(format); in radv_is_buffer_format_supported() local
506 if (!desc || format == VK_FORMAT_UNDEFINED) in radv_is_buffer_format_supported()
509 data_format = radv_translate_buffer_dataformat(desc, in radv_is_buffer_format_supported()
511 num_format = radv_translate_buffer_numformat(desc, in radv_is_buffer_format_supported()
521 const struct vk_format_description *desc = vk_format_description(format); in radv_is_colorbuffer_format_supported() local
525 desc, in radv_is_colorbuffer_format_supported()
550 const struct vk_format_description *desc = vk_format_description(format); in radv_physical_device_get_format_properties() local
553 if (!desc) { in radv_physical_device_get_format_properties()
629 const struct vk_format_description *desc = vk_format_description(format); in radv_translate_colorformat() local
632 (desc->channel[0].size == (x) && desc->channel[1].size == (y) && \ in radv_translate_colorformat()
633 desc->channel[2].size == (z) && desc->channel[3].size == (w)) in radv_translate_colorformat()
638 if (desc->layout != VK_FORMAT_LAYOUT_PLAIN) in radv_translate_colorformat()
643 if (desc->is_mixed && desc->colorspace != VK_FORMAT_COLORSPACE_ZS) in radv_translate_colorformat()
646 switch (desc->nr_channels) { in radv_translate_colorformat()
648 switch (desc->channel[0].size) { in radv_translate_colorformat()
658 if (desc->channel[0].size == desc->channel[1].size) { in radv_translate_colorformat()
659 switch (desc->channel[0].size) { in radv_translate_colorformat()
681 if (desc->channel[0].size == desc->channel[1].size && in radv_translate_colorformat()
682 desc->channel[0].size == desc->channel[2].size && in radv_translate_colorformat()
683 desc->channel[0].size == desc->channel[3].size) { in radv_translate_colorformat()
684 switch (desc->channel[0].size) { in radv_translate_colorformat()
764 const struct vk_format_description *desc = vk_format_description(format); in radv_translate_colorswap() local
766 #define HAS_SWIZZLE(chan,swz) (desc->swizzle[chan] == VK_SWIZZLE_##swz) in radv_translate_colorswap()
771 if (desc->layout != VK_FORMAT_LAYOUT_PLAIN) in radv_translate_colorswap()
774 switch (desc->nr_channels) { in radv_translate_colorswap()
812 if (desc->is_array) in radv_translate_colorswap()
827 const struct vk_format_description *desc = vk_format_description(format); in radv_format_pack_clear_color() local
830 if (desc->colorspace == VK_FORMAT_COLORSPACE_RGB) { in radv_format_pack_clear_color()
835 } else if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) { in radv_format_pack_clear_color()
1350 radv_get_dcc_channel_type(const struct vk_format_description *desc) in radv_get_dcc_channel_type() argument
1355 for (i = 0; i < desc->nr_channels; i++) in radv_get_dcc_channel_type()
1356 if (desc->channel[i].type != VK_FORMAT_TYPE_VOID) in radv_get_dcc_channel_type()
1358 if (i == desc->nr_channels) in radv_get_dcc_channel_type()
1361 switch (desc->channel[i].size) { in radv_get_dcc_channel_type()
1363 if (desc->channel[i].type == VK_FORMAT_TYPE_FLOAT) in radv_get_dcc_channel_type()
1365 if (desc->channel[i].type == VK_FORMAT_TYPE_UNSIGNED) in radv_get_dcc_channel_type()
1369 if (desc->channel[i].type == VK_FORMAT_TYPE_FLOAT) in radv_get_dcc_channel_type()
1371 if (desc->channel[i].type == VK_FORMAT_TYPE_UNSIGNED) in radv_get_dcc_channel_type()
1377 if (desc->channel[i].type == VK_FORMAT_TYPE_UNSIGNED) in radv_get_dcc_channel_type()