radv: Fix custom build id with C90 compilation.

Seems some build configurations have problems with VLAs still.

Fixes: 97641e5c94 ("radv: Add ability to override the build id for the cache.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19869>
This commit is contained in:
Bas Nieuwenhuizen
2022-11-19 03:28:56 +01:00
committed by Marge Bot
parent d34f3a1db5
commit 8d37ab6bfa

View File

@@ -117,9 +117,10 @@ radv_device_get_cache_uuid(struct radv_physical_device *pdevice, void *uuid)
#ifdef RADV_BUILD_ID_OVERRIDE
{
char data[strlen(RADV_BUILD_ID_OVERRIDE) / 2];
parse_hex(data, RADV_BUILD_ID_OVERRIDE, ARRAY_SIZE(data));
_mesa_sha1_update(&ctx, data, ARRAY_SIZE(data));
unsigned size = strlen(RADV_BUILD_ID_OVERRIDE) / 2;
char *data = alloca(size);
parse_hex(data, RADV_BUILD_ID_OVERRIDE, size);
_mesa_sha1_update(&ctx, data, size);
}
#else
if (!disk_cache_get_function_identifier(radv_device_get_cache_uuid, &ctx))