radv/meta: Do not pass NULL to vk_texcompress_astc_finish

The pointer can be NULL if initialization fails.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11953
Fixes: f97b449 ("radv: integrate meta astc compute decoder to radv")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31505>
This commit is contained in:
Konstantin Seurer 2024-10-03 11:29:12 +02:00 committed by Marge Bot
parent 8d5c67c937
commit d975d23cd8

View file

@ -26,14 +26,11 @@ radv_device_init_meta_astc_decode_state(struct radv_device *device, bool on_dema
void
radv_device_finish_meta_astc_decode_state(struct radv_device *device)
{
const struct radv_physical_device *pdev = radv_device_physical(device);
struct radv_meta_state *state = &device->meta_state;
struct vk_texcompress_astc_state *astc = state->astc_decode;
if (!pdev->emulate_astc)
return;
vk_texcompress_astc_finish(&device->vk, &state->alloc, astc);
if (astc)
vk_texcompress_astc_finish(&device->vk, &state->alloc, astc);
}
static void