Ilia Mirkin <[email protected]> writes:

> Signed-off-by: Ilia Mirkin <[email protected]>
> ---
>  src/mesa/drivers/dri/nouveau/nouveau_state.c     | 1 +
>  src/mesa/drivers/dri/nouveau/nv10_state_raster.c | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c 
> b/src/mesa/drivers/dri/nouveau/nouveau_state.c
> index f58caa3..2a77424 100644
> --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c
> +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c
> @@ -118,6 +118,7 @@ nouveau_draw_buffers(struct gl_context *ctx, GLsizei n, 
> const GLenum *buffers)
>       nouveau_validate_framebuffer(ctx);
>       context_dirty(ctx, FRAMEBUFFER);
>       context_dirty(ctx, DEPTH);
> +     context_dirty(ctx, STENCIL_FUNC);
>  }
>  
>  static void
> diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c 
> b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
> index d34cf91..23e2700 100644
> --- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
> +++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c
> @@ -143,9 +143,10 @@ void
>  nv10_emit_stencil_func(struct gl_context *ctx, int emit)
>  {
>       struct nouveau_pushbuf *push = context_push(ctx);
> +     struct gl_framebuffer *fb = ctx->DrawBuffer;
>  
>       BEGIN_NV04(push, NV10_3D(STENCIL_ENABLE), 1);
> -     PUSH_DATAb(push, ctx->Stencil.Enabled);
> +     PUSH_DATAb(push, ctx->Stencil.Enabled && fb->Visual.stencilBits > 0);

We should probably just use ctx->Stencil._Enabled here.  Otherwise looks
OK to me.

>  
>       BEGIN_NV04(push, NV10_3D(STENCIL_FUNC_FUNC), 3);
>       PUSH_DATA (push, nvgl_comparison_op(ctx->Stencil.Function[0]));
> -- 
> 1.8.5.5

Attachment: pgpBs8uM6AOnf.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to