unreachable("unhandled image type");
}
- if (is_depth)
+ if (is_depth) {
surface->flags |= RADEON_SURF_ZBUFFER;
+ if (radv_use_tc_compat_htile_for_image(device, pCreateInfo, image_format))
+ surface->flags |= RADEON_SURF_TC_COMPATIBLE_HTILE;
+ }
if (is_stencil)
surface->flags |= RADEON_SURF_SBUFFER;
vk_format_is_compressed(image_format))
surface->flags |= RADEON_SURF_NO_RENDER_TARGET;
- surface->flags |= RADEON_SURF_OPTIMIZE_FOR_SPACE;
-
if (!radv_use_dcc_for_image(device, image, pCreateInfo, image_format))
surface->flags |= RADEON_SURF_DISABLE_DCC;
S_008F0C_DST_SEL_W(radv_map_swizzle(desc->swizzle[3]));
if (device->physical_device->rad_info.chip_class >= GFX10) {
- const struct gfx10_format *fmt = &gfx10_format_table[vk_format];
+ const struct gfx10_format *fmt = gfx10_format_description(vk_format);
/* OOB_SELECT chooses the out-of-bounds check:
* - 0: (index >= NUM_RECORDS) || (offset >= STRIDE)
unsigned type;
desc = vk_format_description(vk_format);
- img_format = gfx10_format_table[vk_format].img_format;
+ img_format = gfx10_format_description(vk_format)->img_format;
if (desc->colorspace == VK_FORMAT_COLORSPACE_ZS) {
const unsigned char swizzle_xxxx[4] = {0, 0, 0, 0};
{
for (unsigned i = 0; i < image->plane_count; ++i)
image->planes[i].surface.htile_size = 0;
-
- image->tc_compatible_htile = false;
}
VkResult
/* Otherwise, try to enable HTILE for depth surfaces. */
if (radv_image_can_enable_htile(image) &&
!(device->instance->debug_flags & RADV_DEBUG_NO_HIZ)) {
- if (!image->planes[0].surface.tc_compatible_htile_allowed)
- image->tc_compatible_htile = false;
+ image->tc_compatible_htile = image->planes[0].surface.flags & RADEON_SURF_TC_COMPATIBLE_HTILE;
radv_image_alloc_htile(device, image);
} else {
radv_image_disable_htile(image);
image->info.surf_index = &device->image_mrt_offset_counter;
}
- image->tc_compatible_htile =
- radv_use_tc_compat_htile_for_image(device, create_info->vk_info,
- image->vk_format);
-
for (unsigned plane = 0; plane < image->plane_count; ++plane) {
radv_init_surface(device, image, &image->planes[plane].surface, plane, pCreateInfo, format);
}