r600g: Manage fences per screen rather than per context.
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 30 Dec 2011 09:45:31 +0000 (10:45 +0100)
committerMichel Dänzer <michel@daenzer.net>
Fri, 30 Dec 2011 09:45:31 +0000 (10:45 +0100)
commit7dd2d29a560a53d42d15f9ac06ba2ee7cd312ed9
tree65693c4eb962ab47b73d03429b386c9a7e545252
parent0e57b66fa1d7f4317f20571f19fd2ceb3593f04f
r600g: Manage fences per screen rather than per context.

A fence is a screen object and can outlive the context it was created from.
The previous code would access freed memory in that case, resulting in
various problems.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44151
       https://bugs.freedesktop.org/show_bug.cgi?id=44007

Probably fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43993

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/gallium/drivers/r600/r600_pipe.c
src/gallium/drivers/r600/r600_pipe.h