Lines Matching refs:desc
158 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_blocksizebits() local
160 assert(desc); in vk_format_get_blocksizebits()
161 if (!desc) { in vk_format_get_blocksizebits()
165 return desc->block.bits; in vk_format_get_blocksizebits()
189 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_blockwidth() local
191 assert(desc); in vk_format_get_blockwidth()
192 if (!desc) { in vk_format_get_blockwidth()
196 return desc->block.width; in vk_format_get_blockwidth()
202 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_blockheight() local
204 assert(desc); in vk_format_get_blockheight()
205 if (!desc) { in vk_format_get_blockheight()
209 return desc->block.height; in vk_format_get_blockheight()
219 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_first_non_void_channel() local
223 if (desc->channel[i].type != VK_FORMAT_TYPE_VOID) in vk_format_get_first_non_void_channel()
318 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_compressed() local
320 assert(desc); in vk_format_is_compressed()
321 if (!desc) { in vk_format_is_compressed()
325 switch (desc->layout) { in vk_format_is_compressed()
341 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_subsampled() local
343 assert(desc); in vk_format_is_subsampled()
344 if (!desc) { in vk_format_is_subsampled()
348 return desc->layout == VK_FORMAT_LAYOUT_SUBSAMPLED; in vk_format_is_subsampled()
352 vk_format_has_depth(const struct vk_format_description *desc) in vk_format_has_depth() argument
354 return desc->colorspace == VK_FORMAT_COLORSPACE_ZS && in vk_format_has_depth()
355 desc->swizzle[0] != VK_SWIZZLE_NONE; in vk_format_has_depth()
359 vk_format_has_stencil(const struct vk_format_description *desc) in vk_format_has_stencil() argument
361 return desc->colorspace == VK_FORMAT_COLORSPACE_ZS && in vk_format_has_stencil()
362 desc->swizzle[1] != VK_SWIZZLE_NONE; in vk_format_has_stencil()
368 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_depth_or_stencil() local
370 assert(desc); in vk_format_is_depth_or_stencil()
371 if (!desc) { in vk_format_is_depth_or_stencil()
375 return vk_format_has_depth(desc) || in vk_format_is_depth_or_stencil()
376 vk_format_has_stencil(desc); in vk_format_is_depth_or_stencil()
382 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_depth() local
384 assert(desc); in vk_format_is_depth()
385 if (!desc) { in vk_format_is_depth()
389 return vk_format_has_depth(desc); in vk_format_is_depth()
395 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_stencil() local
397 assert(desc); in vk_format_is_stencil()
398 if (!desc) { in vk_format_is_stencil()
402 return vk_format_has_stencil(desc); in vk_format_is_stencil()
429 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_int() local
432 return channel >= 0 && desc->channel[channel].pure_integer; in vk_format_is_int()
438 const struct vk_format_description *desc = vk_format_description(format); in vk_format_is_srgb() local
439 return desc->colorspace == VK_FORMAT_COLORSPACE_SRGB; in vk_format_is_srgb()
493 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_component_bits() local
507 if (desc->colorspace == VK_FORMAT_COLORSPACE_SRGB) { in vk_format_get_component_bits()
510 desc_colorspace = desc->colorspace; in vk_format_get_component_bits()
517 switch (desc->swizzle[component]) { in vk_format_get_component_bits()
519 return desc->channel[0].size; in vk_format_get_component_bits()
521 return desc->channel[1].size; in vk_format_get_component_bits()
523 return desc->channel[2].size; in vk_format_get_component_bits()
525 return desc->channel[3].size; in vk_format_get_component_bits()
557 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_nr_components() local
558 return desc->nr_channels; in vk_format_get_nr_components()
564 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_plane_count() local
566 return desc->plane_count; in vk_format_get_plane_count()
572 const struct vk_format_description *desc = vk_format_description(format); in vk_format_get_plane_format() local
574 if (desc->layout != VK_FORMAT_LAYOUT_MULTIPLANE) { in vk_format_get_plane_format()
579 assert(plane_id < desc->plane_count); in vk_format_get_plane_format()
581 return desc->plane_formats[plane_id]; in vk_format_get_plane_format()