Mesa (mesa_7_7_branch): r200: fix CS section size mismatch

Alex Deucher agd5f at kemper.freedesktop.org
Thu Jan 21 22:34:58 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 2cf8164065b8704e2f32d77af14cde9e7979435c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cf8164065b8704e2f32d77af14cde9e7979435c

Author: Roland Scheidegger <sroland at tungstengraphics.com>
Date:   Thu Jan 21 17:30:16 2010 -0500

r200: fix CS section size mismatch

Partial fix for fdo bug 25544

The tex handling will still need CS drm changes,
see bug 25544 for more.

---

 src/mesa/drivers/dri/r200/r200_state_init.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 6c5a0b7..80b08dc 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -698,7 +698,8 @@ static void tex_emit_mm(GLcontext *ctx, struct radeon_state_atom *atom)
    uint32_t dwords = atom->check(ctx, atom);
    int i = atom->idx;
    radeonTexObj *t = r200->state.texture.unit[i].texobj;
-   if (!r200->state.texture.unit[i].unitneeded)
+
+   if (!r200->state.texture.unit[i].unitneeded && !(dwords <= atom->cmd_size))
         dwords -= 4;
    BEGIN_BATCH_NO_AUTOSTATE(dwords);
 




More information about the mesa-commit mailing list