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 | 5 +++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c > b/src/mesa/drivers/dri/nouveau/nouveau_state.c > index db4915f..f58caa3 100644 > --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c > +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c > @@ -117,6 +117,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); > } > > 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 da414a0..d34cf91 100644 > --- a/src/mesa/drivers/dri/nouveau/nv10_state_raster.c > +++ b/src/mesa/drivers/dri/nouveau/nv10_state_raster.c > @@ -97,11 +97,12 @@ void > nv10_emit_depth(struct gl_context *ctx, int emit) > { > struct nouveau_pushbuf *push = context_push(ctx); > + struct gl_framebuffer *fb = ctx->DrawBuffer; > > BEGIN_NV04(push, NV10_3D(DEPTH_TEST_ENABLE), 1); > - PUSH_DATAb(push, ctx->Depth.Test); > + PUSH_DATAb(push, ctx->Depth.Test && fb->Visual.depthBits > 0); > BEGIN_NV04(push, NV10_3D(DEPTH_WRITE_ENABLE), 1); > - PUSH_DATAb(push, ctx->Depth.Mask); > + PUSH_DATAb(push, ctx->Depth.Mask && fb->Visual.depthBits > 0); > BEGIN_NV04(push, NV10_3D(DEPTH_FUNC), 1); > PUSH_DATA (push, nvgl_comparison_op(ctx->Depth.Func)); > } > -- > 1.8.5.5
Looks OK to me, Reviewed-by: Francisco Jerez <[email protected]>
pgptTqrRcO3Bs.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
