summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-01-06 18:46:00 +0100
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-02-21 10:41:37 +0100
commit917a5ff6eac8e000e1ac7041929ae376bd476496 (patch)
treee4da5df82f333801d812a83ccafe3709f4cf4cc2 /src/gallium/drivers/nouveau/nvc0/nvc0_context.c
parenta9b70a86db9fe948ca7ce40aad4831408b1377ef (diff)
downloadexternal_mesa3d-917a5ff6eac8e000e1ac7041929ae376bd476496.zip
external_mesa3d-917a5ff6eac8e000e1ac7041929ae376bd476496.tar.gz
external_mesa3d-917a5ff6eac8e000e1ac7041929ae376bd476496.tar.bz2
nvc0: bind shader buffers for compute on Fermi
This is loosely based on 3D. Shader buffers are bound on c15 (the driver constbuf) at offset 0x200. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
index 3d2ed75..66e7f95 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
@@ -261,12 +261,17 @@ nvc0_invalidate_resource_storage(struct nouveau_context *ctx,
}
}
- for (s = 0; s < 5; ++s) {
+ for (s = 0; s < 6; ++s) {
for (i = 0; i < NVC0_MAX_BUFFERS; ++i) {
if (nvc0->buffers[s][i].buffer == res) {
nvc0->buffers_dirty[s] |= 1 << i;
- nvc0->dirty |= NVC0_NEW_BUFFERS;
- nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_BUF);
+ if (unlikely(s == 5)) {
+ nvc0->dirty_cp |= NVC0_NEW_CP_BUFFERS;
+ nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_BUF);
+ } else {
+ nvc0->dirty |= NVC0_NEW_BUFFERS;
+ nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_BUF);
+ }
if (!--ref)
return ref;
}