radv: Only initialize DGC state when DGC is enabled.

This function causes a crash with RADV_DEBUG=llvm and this commit
works around that crash.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17580>
This commit is contained in:
Timur Kristóf
2022-07-17 18:01:34 +02:00
committed by Marge Bot
parent 7ea7d0687b
commit b732285312
+5 -3
View File
@@ -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;