mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 00:49:04 +02:00
freedreno: Fix data races with allocating/freeing struct ir3.
There is a single ir3_compiler in the screen, and each context may be compiling ir3 shaders, which call ir3_create. ralloc doesn't do any locking on its own, so eventually you can end up racing to break ralloc's linked lists. We really don't want struct ir3 to live as long as the compiler (maybe struct ir3_shader's lifetime, if anything), so you'd better be freeing it anyway. Fixes:8fe2076243("freedreno/ir3: convert over to ralloc") Reviewed-by: Rob Clark <robdclark@gmail.com> (cherry picked from commit6e3b220ad3)
This commit is contained in:
parent
8fbadb152c
commit
3ec136d583
1 changed files with 1 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ void * ir3_alloc(struct ir3 *shader, int sz)
|
|||
struct ir3 * ir3_create(struct ir3_compiler *compiler,
|
||||
gl_shader_stage type, unsigned nin, unsigned nout)
|
||||
{
|
||||
struct ir3 *shader = rzalloc(compiler, struct ir3);
|
||||
struct ir3 *shader = rzalloc(NULL, struct ir3);
|
||||
|
||||
shader->compiler = compiler;
|
||||
shader->type = type;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue