diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-10-21 12:09:38 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-01 12:45:43 +0000 |
commit | 89cefe6325b2534c4e35ac0a4b85155a3be57936 (patch) | |
tree | c821f52f4dfe06eddd4a5561559ac9f15b6f00da /src/compiler/glsl | |
parent | 75258017dda55a32dcf3114113f8fccde47a490d (diff) | |
download | external_mesa3d-89cefe6325b2534c4e35ac0a4b85155a3be57936.zip external_mesa3d-89cefe6325b2534c4e35ac0a4b85155a3be57936.tar.gz external_mesa3d-89cefe6325b2534c4e35ac0a4b85155a3be57936.tar.bz2 |
intel/blorp: Rework our usage of ralloc when compiling shaders
Previously, we were creating the shader with a NULL ralloc context and then
trusting in blorp_compile_fs to clean it up. The only problem was that
blorp_compile_fs didn't clean up its context properly so we were leaking.
When I went to fix that, I realized that it couldn't because it has to
return the shader binary which is allocated off of that context and used by
the caller. The solution is to make blorp_compile_fs take a ralloc
context, allocate the nir_shaders directly off that context, and clean it
all up in whatever function creates the shader and calls blorp_compile_fs.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "12.0, 13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 43dadb6edd5e3e3e10b1198184a9f75556edad49)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/blorp/blorp_clear.c
Diffstat (limited to 'src/compiler/glsl')
0 files changed, 0 insertions, 0 deletions