[Mesa-stable] [Mesa-dev] [PATCH] radv: always initialize HTILE when the src layout is UNDEFINED
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Mar 14 13:58:44 UTC 2019
r-b
On Thu, Mar 14, 2019 at 2:24 PM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> HTILE should always be initialized when transitioning from
> VK_IMAGE_LAYOUT_UNDEFINED to other image layouts. Otherwise,
> if an app does a transition from UNDEFINED to GENERAL, the
> driver doesn't initialize HTILE and it tries to decompress
> the depth surface. For some reasons, this results in VM faults.
>
> Cc: mesa-stable at lists.freedesktop.org
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107563
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_cmd_buffer.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index 06806ed6fce..ae8f50d0348 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -4477,8 +4477,7 @@ static void radv_handle_depth_image_transition(struct radv_cmd_buffer *cmd_buffe
> if (!radv_image_has_htile(image))
> return;
>
> - if (src_layout == VK_IMAGE_LAYOUT_UNDEFINED &&
> - radv_layout_has_htile(image, dst_layout, dst_queue_mask)) {
> + if (src_layout == VK_IMAGE_LAYOUT_UNDEFINED) {
> /* TODO: merge with the clear if applicable */
> radv_initialize_htile(cmd_buffer, image, range, 0);
> } else if (!radv_layout_is_htile_compressed(image, src_layout, src_queue_mask) &&
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list