summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-05-12 20:54:41 +0200
committerSamuel Pitoiset <[email protected]>2016-05-12 21:37:08 +0200
commitb8f0b00a9a541868e40eed0a81dccc7ce59a8129 (patch)
tree2a9d740192c7f5fa3b4affd5e26b5249de493a76 /src/gallium/drivers/nouveau
parent2785f2f2d7b1397b265f1f1ef7158dc728ae42f5 (diff)
nvc0: invalidate texture buffers for compute
This is a pretty rare situation but this can happen though. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
-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 428b33d3318..d51e89d672f 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.c
@@ -263,13 +263,18 @@ nvc0_invalidate_resource_storage(struct nouveau_context *ctx,
return ref;
}
- for (s = 0; s < 5; ++s) {
+ for (s = 0; s < 6; ++s) {
for (i = 0; i < nvc0->num_textures[s]; ++i) {
if (nvc0->textures[s][i] &&
nvc0->textures[s][i]->texture == res) {
nvc0->textures_dirty[s] |= 1 << i;
- nvc0->dirty_3d |= NVC0_NEW_3D_TEXTURES;
- nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_TEX(s, i));
+ if (unlikely(s == 5)) {
+ nvc0->dirty_cp |= NVC0_NEW_CP_TEXTURES;
+ nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_TEX(i));
+ } else {
+ nvc0->dirty_3d |= NVC0_NEW_3D_TEXTURES;
+ nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_TEX(s, i));
+ }
if (!--ref)
return ref;
}