diff options
author | Ilia Mirkin <[email protected]> | 2016-04-03 15:11:39 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-04-09 14:55:43 -0400 |
commit | f9480d7918a2da19b8ac85a8326049488feef92b (patch) | |
tree | c60e9cce43b2984784e053f2f6539d7c9e58a13f /src/gallium/drivers/nouveau/nv50/nv50_resource.c | |
parent | 30b818d5eb67c7427fbefb456c7bc2d876bf9eac (diff) |
nv50,nvc0: add invalidate_resource support for buffer resources
Provide a callback to reallocate the underlying storage of a resource so
that it is not bound to any existing fences.
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_resource.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv50/nv50_resource.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_resource.c b/src/gallium/drivers/nouveau/nv50/nv50_resource.c index ad5f3b814db..b090a30aed6 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_resource.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_resource.c @@ -85,6 +85,13 @@ nv50_surface_destroy(struct pipe_context *pipe, struct pipe_surface *ps) } void +nv50_invalidate_resource(struct pipe_context *pipe, struct pipe_resource *res) +{ + if (res->target == PIPE_BUFFER) + nouveau_buffer_invalidate(pipe, res); +} + +void nv50_init_resource_functions(struct pipe_context *pcontext) { pcontext->transfer_map = u_transfer_map_vtbl; @@ -93,6 +100,7 @@ nv50_init_resource_functions(struct pipe_context *pcontext) pcontext->transfer_inline_write = u_transfer_inline_write_vtbl; pcontext->create_surface = nv50_surface_create; pcontext->surface_destroy = nv50_surface_destroy; + pcontext->invalidate_resource = nv50_invalidate_resource; } void |