[Mesa-dev] [PATCH v2 13/32] main: Add nir serialization fields to gl_program

Jason Ekstrand jason at jlekstrand.net
Fri Oct 20 22:22:20 UTC 2017


On Wed, Oct 18, 2017 at 10:32 PM, Jordan Justen <jordan.l.justen at intel.com>
wrote:

> These fields can be used to optionally save off a nir serialized form
> of the program.
>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>  src/mesa/main/mtypes.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 2802a0e360..a5a1398698 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2078,6 +2078,8 @@ struct gl_program
>     GLboolean _Used;        /**< Ever used for drawing? Used for debugging
> */
>
>     struct nir_shader *nir;
> +   uint8_t *serialized_nir;
>

I think we're leaking this.  Probably best to free it in
_mesa_free_program_data.


> +   size_t serialized_nir_size;
>
>     bool is_arb_asm; /** Is this an ARB assembly-style program */
>
> --
> 2.15.0.rc0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171020/77f78e0b/attachment.html>


More information about the mesa-dev mailing list