Module: Mesa
Branch: master
Commit: b3f1b765e964f2d4b6be38e7fbbe78b817aec100
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3f1b765e964f2d4b6be38e7fbbe78b817aec100

Author: Jordan Justen <jordan.l.jus...@intel.com>
Date:   Fri Nov  3 16:45:46 2017 -0700

i965: Free serialized nir after deserializing

Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com>

---

 src/mesa/drivers/dri/i965/brw_program.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_program.c 
b/src/mesa/drivers/dri/i965/brw_program.c
index 2a647cdd73..30cc14e88a 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -800,4 +800,10 @@ brw_program_deserialize_nir(struct gl_context *ctx, struct 
gl_program *prog,
                        prog->driver_cache_blob_size);
       prog->nir = nir_deserialize(NULL, options, &reader);
    }
+
+   if (prog->driver_cache_blob) {
+      ralloc_free(prog->driver_cache_blob);
+      prog->driver_cache_blob = NULL;
+      prog->driver_cache_blob_size = 0;
+   }
 }

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

Reply via email to