mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
broadcom/cle: parse once the XML spec
Instead of loading and parsing the XML spec everytime a CLIF is created, do it once and cache for further calls. This also avoids leaking the spec loading. Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40747>
This commit is contained in:
parent
d4646cd444
commit
1be54acdee
1 changed files with 4 additions and 1 deletions
|
|
@ -629,7 +629,10 @@ static uint32_t zlib_inflate(const void *compressed_data,
|
|||
struct v3d_spec *
|
||||
v3d_spec_load(const struct v3d_device_info *devinfo)
|
||||
{
|
||||
struct v3d_spec *spec = calloc(1, sizeof(struct v3d_spec));
|
||||
static struct v3d_spec *spec = NULL;
|
||||
if (spec)
|
||||
return spec;
|
||||
spec = calloc(1, sizeof(struct v3d_spec));
|
||||
if (!spec)
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue