Module: Mesa
Branch: master
Commit: d03f04bfb57cb7b5537cb31f1dc798a6ba500f36
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d03f04bfb57cb7b5537cb31f1dc798a6ba500f36

Author: Francisco Jerez <curroje...@riseup.net>
Date:   Wed Jul 28 22:32:49 2010 +0200

dri/nv20: Fix some PGRAPH_ERRORs seen with DATA_CHECK enabled.

---

 src/mesa/drivers/dri/nouveau/nv20_state_fb.c  |    5 ++++-
 src/mesa/drivers/dri/nouveau/nv20_state_tex.c |    3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c 
b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
index 21da4f7..95691ca 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_fb.c
@@ -72,7 +72,7 @@ nv20_emit_framebuffer(GLcontext *ctx, int emit)
                        fb->_ColorDrawBuffers[0])->surface;
 
                rt_format |= get_rt_format(s->format);
-               zeta_pitch = rt_pitch = s->pitch;
+               rt_pitch = s->pitch;
 
                nouveau_bo_markl(bctx, kelvin, NV20TCL_COLOR_OFFSET,
                                 s->bo, 0, bo_flags);
@@ -88,6 +88,9 @@ nv20_emit_framebuffer(GLcontext *ctx, int emit)
 
                nouveau_bo_markl(bctx, kelvin, NV20TCL_ZETA_OFFSET,
                                 s->bo, 0, bo_flags);
+       } else {
+               rt_format |= get_rt_format(MESA_FORMAT_Z24_S8);
+               zeta_pitch = rt_pitch;
        }
 
        BEGIN_RING(chan, kelvin, NV20TCL_RT_FORMAT, 2);
diff --git a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c 
b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
index e46118e..2d45513 100644
--- a/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
+++ b/src/mesa/drivers/dri/nouveau/nv20_state_tex.c
@@ -194,7 +194,8 @@ nv20_emit_tex_obj(GLcontext *ctx, int emit)
                | nvgl_wrap_mode(t->WrapS) << 0;
 
        tx_filter = nvgl_filter_mode(t->MagFilter) << 24
-               | nvgl_filter_mode(t->MinFilter) << 16;
+               | nvgl_filter_mode(t->MinFilter) << 16
+               | 2 << 12;
 
        tx_enable = NV20TCL_TX_ENABLE_ENABLE
                | log2i(t->MaxAnisotropy) << 4;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to