diff options
author | Brian Paul <[email protected]> | 2013-02-15 10:42:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-02-15 11:11:34 -0700 |
commit | 2ef530cf68f7b837db6750e7a4b1ba9e71aad062 (patch) | |
tree | ebb021cefd1833f4ddf632b20a49a8bece819cff /src/gallium/drivers/trace/tr_texture.c | |
parent | 82d62cf04f3c585ba324fcef16417fbee4a3d220 (diff) |
trace: add context pointer sanity checking
To help catch mixed up context pointer bugs in the future, add a
trace_context_check() function and some new assertions.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/trace/tr_texture.c')
-rw-r--r-- | src/gallium/drivers/trace/tr_texture.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/trace/tr_texture.c b/src/gallium/drivers/trace/tr_texture.c index aae13383865..f6bc386ea3e 100644 --- a/src/gallium/drivers/trace/tr_texture.c +++ b/src/gallium/drivers/trace/tr_texture.c @@ -108,6 +108,7 @@ error: void trace_surf_destroy(struct trace_surface *tr_surf) { + trace_context_check(tr_surf->base.context); pipe_resource_reference(&tr_surf->base.texture, NULL); pipe_surface_reference(&tr_surf->surface, NULL); FREE(tr_surf); |