summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-06-05 18:53:26 +0200
committerSamuel Pitoiset <[email protected]>2016-06-05 19:02:59 +0200
commitbe365f34f04112572550337f387b61ed1ba69acd (patch)
treeadf3fc5032efcb7dcd96028d8fc7e2b3a01c2147 /src/gallium
parent43d3ecfb338d79d9f0ccae22b316653af461032a (diff)
nvc0: do not clear surfaces bins in the validate function
We should not call nouveau_bufctx_reset() inside a validate function. This only affects Fermi where images are aliased between 3D and CP. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_compute.c1
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_tex.c6
2 files changed, 2 insertions, 5 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
index 21c8b2e4aae..59bbe1efe10 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
@@ -324,6 +324,7 @@ nvc0_compute_validate_surfaces(struct nvc0_context *nvc0)
nvc0_validate_suf(nvc0, 5);
/* Invalidate all FRAGMENT images because they are aliased with COMPUTE. */
+ nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_SUF);
nvc0->dirty_3d |= NVC0_NEW_3D_SURFACES;
nvc0->images_dirty[4] |= nvc0->images_valid[4];
}
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
index b54de0ffe0b..1a5d8ecbf16 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
@@ -994,11 +994,6 @@ nvc0_validate_suf(struct nvc0_context *nvc0, int s)
struct nouveau_pushbuf *push = nvc0->base.pushbuf;
struct nvc0_screen *screen = nvc0->screen;
- if (s == 5)
- nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_SUF);
- else
- nouveau_bufctx_reset(nvc0->bufctx_3d, NVC0_BIND_3D_SUF);
-
for (int i = 0; i < NVC0_MAX_IMAGES; ++i) {
struct pipe_image_view *view = &nvc0->images[s][i];
int width, height, depth;
@@ -1099,6 +1094,7 @@ nvc0_update_surface_bindings(struct nvc0_context *nvc0)
nvc0_validate_suf(nvc0, 4);
/* Invalidate all COMPUTE images because they are aliased with FRAGMENT. */
+ nouveau_bufctx_reset(nvc0->bufctx_cp, NVC0_BIND_CP_SUF);
nvc0->dirty_cp |= NVC0_NEW_CP_SURFACES;
nvc0->images_dirty[5] |= nvc0->images_valid[5];
}