mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
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:
parent
8d5c67c937
commit
d975d23cd8
1 changed files with 2 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue