From b732285312d06fb4bbfaf9d2c3dde3808796a668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Sun, 17 Jul 2022 18:01:34 +0200 Subject: [PATCH] radv: Only initialize DGC state when DGC is enabled. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function causes a crash with RADV_DEBUG=llvm and this commit works around that crash. Signed-off-by: Timur Kristóf Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_meta.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/amd/vulkan/radv_meta.c b/src/amd/vulkan/radv_meta.c index 35bf5ab5bba..bcfcd85f7c8 100644 --- a/src/amd/vulkan/radv_meta.c +++ b/src/amd/vulkan/radv_meta.c @@ -622,9 +622,11 @@ radv_device_init_meta(struct radv_device *device) if (result != VK_SUCCESS) goto fail_etc_decode; - result = radv_device_init_dgc_prepare_state(device); - if (result != VK_SUCCESS) - goto fail_dgc; + if (device->uses_device_generated_commands) { + result = radv_device_init_dgc_prepare_state(device); + if (result != VK_SUCCESS) + goto fail_dgc; + } device->app_shaders_internal = false;