diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2015-07-07 23:05:45 -0400 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-07-08 16:09:26 +0100 |
commit | 4c3a4ac6da7820226ecad5fd654899ae727e11e0 (patch) | |
tree | 200199fee436d20441857e4ec2b28c1dc70d0dc4 | |
parent | 2ca2f3701b9928374911c603178cf92da1e5167b (diff) |
nvc0: turn sample counts off during blit
Fixes the following piglits:
occlusion_query_meta_fragments
occlusion_query_meta_no_fragments
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 38c2ec5ff0bf626578db7b84387279342aa48844)
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c index a820de7259a..ac4dd25bcfa 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c @@ -1376,6 +1376,7 @@ static void nvc0_blit(struct pipe_context *pipe, const struct pipe_blit_info *info) { struct nvc0_context *nvc0 = nvc0_context(pipe); + struct nouveau_pushbuf *push = nvc0->base.pushbuf; boolean eng3d = FALSE; if (util_format_is_depth_or_stencil(info->dst.resource->format)) { @@ -1439,11 +1440,17 @@ nvc0_blit(struct pipe_context *pipe, const struct pipe_blit_info *info) info->src.box.height != -info->dst.box.height)) eng3d = TRUE; + if (nvc0->screen->num_occlusion_queries_active) + IMMED_NVC0(push, NVC0_3D(SAMPLECNT_ENABLE), 0); + if (!eng3d) nvc0_blit_eng2d(nvc0, info); else nvc0_blit_3d(nvc0, info); + if (nvc0->screen->num_occlusion_queries_active) + IMMED_NVC0(push, NVC0_3D(SAMPLECNT_ENABLE), 1); + NOUVEAU_DRV_STAT(&nvc0->screen->base, tex_blit_count, 1); } |