svga: only destroy render target view from a context that created it
authorCharmaine Lee <charmainel@vmware.com>
Thu, 3 Nov 2016 17:35:55 +0000 (10:35 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 7 Apr 2017 19:46:43 +0000 (13:46 -0600)
commita421d45e61c56c48bcc0fed19b15b5081c8f32d3
tree15b75e85fa486c4731fbb1515afbbf443ad9988b
parentb4c4ee076244d0518af98e0beca1c12942c4bc36
svga: only destroy render target view from a context that created it

A texture can be destroyed from a different context from which it is
created, but destroying the render target view from a different context
will cause svga device errors. Similar to shader resource view,
this patch skips destroying render target view or depth stencil view
from a non-parent context.

Fixes driver errors running NobelClinician Viewer application.

Tested with NobelClinician Viewer, MTT piglit, glretrace.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/svga_surface.c