[Mesa-dev] [PATCH 2/2] nv50: turn samples counts off during blit

Ilia Mirkin imirkin at alum.mit.edu
Mon Jul 13 09:54:33 PDT 2015


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Mon, Jul 13, 2015 at 4:49 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Fixes the following piglit test:
>   occlusion_query_meta_no_fragments
>
> Signed-off-by: Samuel Pitoiset <sameul.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nv50/nv50_surface.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_surface.c b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
> index dc9852d..66eccc2 100644
> --- a/src/gallium/drivers/nouveau/nv50/nv50_surface.c
> +++ b/src/gallium/drivers/nouveau/nv50/nv50_surface.c
> @@ -1432,6 +1432,7 @@ static void
>  nv50_blit(struct pipe_context *pipe, const struct pipe_blit_info *info)
>  {
>     struct nv50_context *nv50 = nv50_context(pipe);
> +   struct nouveau_pushbuf *push = nv50->base.pushbuf;
>     boolean eng3d = FALSE;
>
>     if (util_format_is_depth_or_stencil(info->dst.resource->format)) {
> @@ -1493,10 +1494,20 @@ nv50_blit(struct pipe_context *pipe, const struct pipe_blit_info *info)
>          info->src.box.height != -info->dst.box.height))
>        eng3d = TRUE;
>
> +   if (nv50->screen->num_occlusion_queries_active) {
> +      BEGIN_NV04(push, NV50_3D(SAMPLECNT_ENABLE), 1);
> +      PUSH_DATA (push, 0);
> +   }
> +
>     if (!eng3d)
>        nv50_blit_eng2d(nv50, info);
>     else
>        nv50_blit_3d(nv50, info);
> +
> +   if (nv50->screen->num_occlusion_queries_active) {
> +      BEGIN_NV04(push, NV50_3D(SAMPLECNT_ENABLE), 1);
> +      PUSH_DATA (push, 1);
> +   }
>  }
>
>  static void
> --
> 2.4.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list