diff options
author | Marek Olšák <maraeo@gmail.com> | 2011-03-07 22:35:49 +0100 |
---|---|---|
committer | Marek Olšák <maraeo@gmail.com> | 2011-03-11 21:39:30 +0100 |
commit | 25485f4b69447514ab8b595aced90c75606a99bd (patch) | |
tree | 51e9c5c6e295f6c79f2b1af9692bad9b04a8cc60 /src/gallium/drivers/i965/brw_resource_texture.c | |
parent | 2b64886c8122227ffa2d86abb9b4a5d79d1e2451 (diff) |
gallium: kill is_resource_referenced
Only st/xorg used it and even incorrectly with regards to pipelined transfers.
Diffstat (limited to 'src/gallium/drivers/i965/brw_resource_texture.c')
-rw-r--r-- | src/gallium/drivers/i965/brw_resource_texture.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/gallium/drivers/i965/brw_resource_texture.c b/src/gallium/drivers/i965/brw_resource_texture.c index 0cb895f35d..71a1829024 100644 --- a/src/gallium/drivers/i965/brw_resource_texture.c +++ b/src/gallium/drivers/i965/brw_resource_texture.c @@ -225,48 +225,6 @@ static void brw_texture_destroy(struct pipe_screen *screen, } - - -static unsigned brw_texture_is_referenced( struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned level, - int layer ) -{ - struct brw_context *brw = brw_context(pipe); - struct brw_screen *bscreen = brw_screen(pipe->screen); - struct brw_winsys_buffer *batch_bo = brw->batch->buf; - struct brw_texture *tex = brw_texture(texture); - struct brw_surface *surf; - int i; - - /* XXX: this is subject to false positives if the underlying - * texture BO is referenced, we can't tell whether the sub-region - * we care about participates in that. - */ - if (bscreen->sws->bo_references( batch_bo, tex->bo )) - return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; - - /* Find any view on this texture for this level/layer and see if it - * is referenced: - */ - for (i = 0; i < 2; i++) { - foreach (surf, &tex->views[i]) { - if (surf->bo == tex->bo) - continue; - - if (!(layer == -1 || surf->id.bits.layer == layer) || - surf->id.bits.level != level) - continue; - - if (bscreen->sws->bo_references( batch_bo, surf->bo)) - return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; - } - } - - return PIPE_UNREFERENCED; -} - - /* * Transfer functions */ @@ -347,7 +305,6 @@ struct u_resource_vtbl brw_texture_vtbl = { brw_texture_get_handle, /* get_handle */ brw_texture_destroy, /* resource_destroy */ - brw_texture_is_referenced, /* is_resource_referenced */ brw_texture_get_transfer, /* get_transfer */ u_default_transfer_destroy, /* transfer_destroy */ brw_texture_transfer_map, /* transfer_map */ |