diff options
author | Marek Olšák <[email protected]> | 2020-05-02 16:01:44 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-02 20:12:38 +0000 |
commit | f1a40a26a90d65c8cb2881b9a2679ed089bf2ead (patch) | |
tree | c186fe22661fe7d5de7bca646579ac655ea5e30a /src/amd/vulkan | |
parent | ee8f60da19d8e495483e5aa7a84717a8e941dd6f (diff) |
Revert "ac/surface: remove RADEON_SURF_TC_COMPATIBLE_HTILE and assume it's always set"
This reverts commit f6d87ec8a908250af5e805c8042524ac360094a2.
It breaks RADV.
Fixes: f6d87ec8a908250af5e805c8042524ac360094a2 "ac/surface: remove RADEON_SURF_TC_COMPATIBLE_HTILE and assume it's always set"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4864>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_image.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 84eae33f433..f7818c691c8 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -437,8 +437,11 @@ radv_init_surface(struct radv_device *device, 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; @@ -1348,8 +1351,6 @@ static void radv_image_disable_htile(struct radv_image *image) { for (unsigned i = 0; i < image->plane_count; ++i) image->planes[i].surface.htile_size = 0; - - image->tc_compatible_htile = false; } VkResult @@ -1421,8 +1422,7 @@ radv_image_create_layout(struct radv_device *device, /* 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); @@ -1500,10 +1500,6 @@ radv_image_create(VkDevice _device, 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); } |