Lines Matching refs:format

43                    VkFormat format)
54 if (!vk_format_is_compressed(format) && !vk_format_is_depth_or_stencil(format) &&
70 VkFormat format)
93 if (pCreateInfo->samples >= 2 && format == VK_FORMAT_D32_SFLOAT_S8_UINT)
101 if (format != VK_FORMAT_D32_SFLOAT_S8_UINT && format != VK_FORMAT_D32_SFLOAT &&
102 format != VK_FORMAT_D16_UNORM)
159 VkFormat format, VkImageCreateFlags flags, bool *sign_reinterpret)
163 if (!radv_is_colorbuffer_format_supported(pdev, format, &blendable))
177 * one format with everything else. */
182 if (!radv_dcc_formats_compatible(pdev->rad_info.gfx_level, format,
195 radv_format_is_atomic_allowed(struct radv_device *device, VkFormat format)
197 if (format == VK_FORMAT_R32_SFLOAT && !device->image_float32_atomics)
200 return radv_is_atomic_format_supported(format);
204 radv_formats_is_atomic_allowed(struct radv_device *device, const void *pNext, VkFormat format,
207 if (radv_format_is_atomic_allowed(device, format))
229 const VkImageCreateInfo *pCreateInfo, VkFormat format,
251 radv_formats_is_atomic_allowed(device, pCreateInfo->pNext, format, pCreateInfo->flags)))
261 if (vk_format_is_subsampled(format) || vk_format_get_plane_count(format) > 1)
283 return radv_are_formats_dcc_compatible(device->physical_device, pCreateInfo->pNext, format,
354 image->vk.format == VK_FORMAT_D32_SFLOAT_S8_UINT && image->info.levels > 1)
543 etc2_emulation_format(VkFormat format)
545 switch (format) {
563 unreachable("Unhandled ETC format");
572 vk_format_description(image->vk.format)->layout == UTIL_FORMAT_LAYOUT_ETC) {
574 return image->vk.format;
575 return etc2_emulation_format(image->vk.format);
577 return vk_format_get_plane_format(image->vk.format, plane);
586 VkFormat format = radv_image_get_plane_format(device->physical_device, image, plane_id);
587 const struct util_format_description *desc = vk_format_description(format);
685 if (desc->format == PIPE_FORMAT_R64_UINT || desc->format == PIPE_FORMAT_R64_SINT) {
941 vi_alpha_is_on_msb(struct radv_device *device, VkFormat format)
943 const struct util_format_description *desc = vk_format_description(format);
948 return radv_translate_colorswap(format, false) <= 1;
969 /* For emulated ETC2 without alpha we need to override the format to a 3-componenent format, so
970 * that border colors work correctly (alpha forced to 1). Since Vulkan has no such format,
972 if (image->vk.format == VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK &&
975 } else if (image->vk.format == VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK &&
1061 uint32_t format;
1070 format = V_008F0C_GFX10_FORMAT_FMASK8_S2_F2;
1073 format = V_008F0C_GFX10_FORMAT_FMASK8_S4_F4;
1076 format = V_008F0C_GFX10_FORMAT_FMASK32_S8_F8;
1083 fmask_state[1] = S_00A004_BASE_ADDRESS_HI(va >> 40) | S_00A004_FORMAT(format) |
1129 /* For emulated ETC2 without alpha we need to override the format to a 3-componenent format, so
1130 * that border colors work correctly (alpha forced to 1). Since Vulkan has no such format,
1132 if (image->vk.format == VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK &&
1135 } else if (image->vk.format == VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK &&
1154 /* S8 with either Z16 or Z32 HTILE need a special format. */
1157 if (image->vk.format == VK_FORMAT_D32_SFLOAT_S8_UINT)
1159 else if (image->vk.format == VK_FORMAT_D16_UNORM_S8_UINT)
1356 image->vk.format, &fixedmapping, 0, image->info.levels - 1, 0,
1485 if (vk_format_has_depth(image->vk.format) && image->info.array_size >= 8) {
1495 if (vk_format_has_depth(image->vk.format)) {
1527 !vk_format_has_stencil(image->vk.format)) {
1548 if (vk_format_is_color(image->vk.format)) {
1586 unsigned bytes_per_pixel = vk_format_get_blocksize(image->vk.format);
1611 unsigned plane_count = radv_get_internal_plane_count(pdev, image->vk.format);
1613 VkFormat format = radv_image_get_plane_format(pdev, image, i);
1614 if (vk_format_has_depth(format))
1615 format = vk_format_depth_only(format);
1623 image->planes[i].surface.blk_w = vk_format_get_blockwidth(format);
1624 image->planes[i].surface.blk_h = vk_format_get_blockheight(format);
1625 image->planes[i].surface.bpe = vk_format_get_blocksize(format);
1652 unsigned plane_count = radv_get_internal_plane_count(device->physical_device, image->vk.format);
1658 info.width = vk_format_get_plane_width(image->vk.format, plane, info.width);
1659 info.height = vk_format_get_plane_height(image->vk.format, plane, info.height);
1719 image->planes[plane].format =
1767 const struct util_format_description *desc = vk_format_description(plane->format);
1778 radv_select_modifier(const struct radv_device *dev, VkFormat format,
1793 ac_get_supported_modifiers(&pdev->rad_info, &modifier_options, vk_format_to_pipe_format(format),
1802 ac_get_supported_modifiers(&pdev->rad_info, &modifier_options, vk_format_to_pipe_format(format),
1824 VkFormat format = radv_select_android_external_format(pCreateInfo->pNext, pCreateInfo->format);
1831 unsigned plane_count = radv_get_internal_plane_count(device->physical_device, format);
1856 image->info.num_channels = vk_format_get_nr_components(format);
1858 image->plane_count = vk_format_get_plane_count(format);
1876 if (!vk_format_is_depth_or_stencil(format) && !image->shareable &&
1883 modifier = radv_select_modifier(device, format, mod_list);
1889 radv_get_surface_flags(device, image, plane, pCreateInfo, format);
1955 assert(plane->surface.blk_w % vk_format_get_blockwidth(plane->format) == 0);
1956 blk_w = plane->surface.blk_w / vk_format_get_blockwidth(plane->format) *
1965 vk_format_get_plane_width(image->vk.format, plane_id, iview->extent.width),
1966 vk_format_get_plane_height(image->vk.format, plane_id, iview->extent.height),
2010 return image->planes[0].format;
2012 return image->planes[1].format;
2014 return image->planes[2].format;
2016 return vk_format_stencil_only(image->vk.format);
2018 return vk_format_depth_only(image->vk.format);
2020 return vk_format_depth_only(image->vk.format);
2022 return image->vk.format;
2090 /* If the image has an Android external format, pCreateInfo->format will be
2092 if (iview->vk.format == VK_FORMAT_UNDEFINED) {
2093 iview->vk.format = image->vk.format;
2094 iview->vk.view_format = image->vk.format;
2098 * use an equivalent color format for the aspect so we first have to check
2108 if (vk_format_get_plane_count(image->vk.format) > 1 &&
2110 plane_count = vk_format_get_plane_count(iview->vk.format);
2114 vk_format_description(image->vk.format)->layout == UTIL_FORMAT_LAYOUT_ETC) {
2115 const struct util_format_description *desc = vk_format_description(iview->vk.format);
2118 iview->vk.format = etc2_emulation_format(iview->vk.format);
2119 iview->vk.view_format = etc2_emulation_format(iview->vk.format);
2135 if (iview->vk.format != image->planes[iview->plane_id].format) {
2136 unsigned view_bw = vk_format_get_blockwidth(iview->vk.format);
2137 unsigned view_bh = vk_format_get_blockheight(iview->vk.format);
2138 unsigned img_bw = vk_format_get_blockwidth(image->planes[iview->plane_id].format);
2139 unsigned img_bh = vk_format_get_blockheight(image->planes[iview->plane_id].format);
2167 * block compatible format and the compressed format, so even if we take
2171 vk_format_is_compressed(image->vk.format) && !vk_format_is_compressed(iview->vk.format)) {
2202 VkFormat format = vk_format_get_plane_format(iview->vk.view_format, i);
2203 radv_image_view_make_descriptor(iview, device, format, &pCreateInfo->components, min_lod, false,
2206 radv_image_view_make_descriptor(iview, device, format, &pCreateInfo->components, min_lod, true,
2407 if (vk_format_get_plane_count(image->vk.format) > 1)
2432 if (image->vk.format == VK_FORMAT_R32G32B32_UINT ||
2433 image->vk.format == VK_FORMAT_R32G32B32_SINT ||
2434 image->vk.format == VK_FORMAT_R32G32B32_SFLOAT) {
2519 view->vk_format = pCreateInfo->format;