summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2017-06-21 23:13:20 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2018-01-07 11:15:23 -0500
commit8eb1214755366fc34ed15a7e3dec48d4f0d65f10 (patch)
treeeebd0abf02ed67a87e7ba67fbfec8dba5c3cea3c /src/gallium/drivers/nouveau/nvc0/nve4_compute.c
parent70613336534fa0319a87292f40b30294b359e33a (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/nve4_compute.c')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nve4_compute.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
index bc5d9e04401..db501afb9d1 100644
--- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
@@ -681,6 +681,11 @@ nve4_launch_grid(struct pipe_context *pipe, const struct pipe_grid_info *info)
BCTX_REFN_bo(nvc0->bufctx_cp, CP_DESC, NOUVEAU_BO_GART | NOUVEAU_BO_RD,
desc_bo);
+ list_for_each_entry(struct nvc0_resident, resident, &nvc0->tex_head, list) {
+ nvc0_add_resident(nvc0->bufctx_cp, NVC0_BIND_CP_BINDLESS, resident->buf,
+ resident->flags);
+ }
+
ret = !nve4_state_validate_cp(nvc0, ~0);
if (ret)
goto out;
@@ -742,6 +747,7 @@ out:
NOUVEAU_ERR("Failed to launch grid !\n");
nouveau_scratch_done(&nvc0->base);
nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_DESC);
+ nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_BINDLESS);
}