This seems like a nice solution to me. I just have a small comment
below.

> -static struct gl_shader_program_data *
> -create_shader_program_data()
> +struct gl_shader_program_data *
> +_mesa_create_shader_program_data()
>  {
>     struct gl_shader_program_data *data;
>     data = rzalloc(NULL, struct gl_shader_program_data);
>     if (data)
>        data->RefCount = 1;
>  
> +   data->InfoLog = ralloc_strdup(data, "");
> +

The addition of this line makes the “if (data)” above look odd because
if the rzalloc fails it’s now going to just crash immediately anyway.
I’m not sure what the policy is supposed to be but a quick grep finds
other places in the compiler that seem to assume that ralloc can not
fail, so it might be nice to just remove the if.

Reviewed-by: Neil Roberts <nrobe...@igalia.com>

Regards,
- Neil

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to