summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-05-22 20:27:23 +0200
committerSamuel Pitoiset <[email protected]>2016-05-23 20:56:29 +0200
commitc3c43702991d1590c98039aab18e202d33ca07c0 (patch)
tree37f0639ce2c5b632eb395a68be4295e11807cf00 /src/gallium
parent5245d845b6f77361f01a7f577e1471345df132de (diff)
nvc0: do not invalidate compute constbufs on Kepler
Constbufs are only aliased on Fermi and this will reduce the number of flushes when we switch between 3d and compute. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
index 7a9abe58754..a77486db54c 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c
@@ -486,10 +486,12 @@ nvc0_constbufs_validate(struct nvc0_context *nvc0)
}
}
- /* Invalidate all COMPUTE constbufs because they are aliased with 3D. */
- nvc0->dirty_cp |= NVC0_NEW_CP_CONSTBUF;
- nvc0->constbuf_dirty[5] |= nvc0->constbuf_valid[5];
- nvc0->state.uniform_buffer_bound[5] = 0;
+ if (nvc0->screen->base.class_3d < NVE4_3D_CLASS) {
+ /* Invalidate all COMPUTE constbufs because they are aliased with 3D. */
+ nvc0->dirty_cp |= NVC0_NEW_CP_CONSTBUF;
+ nvc0->constbuf_dirty[5] |= nvc0->constbuf_valid[5];
+ nvc0->state.uniform_buffer_bound[5] = 0;
+ }
}
static void