diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2019-03-14 14:27:03 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2019-03-15 14:31:32 +0000 |
commit | 60fb5f4b8677ad316feb1d949617b119392b1a2e (patch) | |
tree | 8d94253f4d59e74bb7d99bd8e2bbfd3a676ec738 | |
parent | bdd5f24c1b1bd94b8725263cf287c5987fe7229a (diff) | |
download | mesa-60fb5f4b8677ad316feb1d949617b119392b1a2e.tar.gz |
radv: always initialize HTILE when the src layout is UNDEFINED
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@lists.freedesktop.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107563
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 3a2e93147f7fa4a6fd17313353113a33291c5ce0)
-rw-r--r-- | src/amd/vulkan/radv_cmd_buffer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 75c9f0807c8..584ae9fd678 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -4245,8 +4245,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) && |