diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2017-06-21 23:13:20 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2018-01-07 11:15:23 -0500 |
commit | 8eb1214755366fc34ed15a7e3dec48d4f0d65f10 (patch) | |
tree | eebd0abf02ed67a87e7ba67fbfec8dba5c3cea3c /src/gallium/drivers/nouveau/nvc0/nvc0_context.c | |
parent | 70613336534fa0319a87292f40b30294b359e33a (diff) |
nvc0: add support for bindless textures on kepler+
This keeps a list of resident textures (per context), and dumps that
list into the active buffer list when submitting. We also treat bindless
texture fetches slightly differently, wrt the meaning of indirect, and
not requiring the SAMPLER file to be used.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_context.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c index d5ef5851daa..2e4490b8d97 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c @@ -206,6 +206,16 @@ nvc0_destroy(struct pipe_context *pipe) nvc0_context_unreference_resources(nvc0); nvc0_blitctx_destroy(nvc0); + list_for_each_entry_safe(struct nvc0_resident, pos, &nvc0->tex_head, list) { + list_del(&pos->list); + free(pos); + } + + list_for_each_entry_safe(struct nvc0_resident, pos, &nvc0->img_head, list) { + list_del(&pos->list); + free(pos); + } + nouveau_context_destroy(&nvc0->base); } @@ -401,6 +411,11 @@ nvc0_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags) nvc0_init_state_functions(nvc0); nvc0_init_transfer_functions(nvc0); nvc0_init_resource_functions(pipe); + if (nvc0->screen->base.class_3d >= NVE4_3D_CLASS) + nvc0_init_bindless_functions(pipe); + + list_inithead(&nvc0->tex_head); + list_inithead(&nvc0->img_head); nvc0->base.invalidate_resource_storage = nvc0_invalidate_resource_storage; |