Mesa (master): radeon/r200: fix the state emission before kernel clear

Dave Airlie airlied at kemper.freedesktop.org
Wed Feb 24 09:16:20 UTC 2010


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Feb 24 19:13:07 2010 +1000

radeon/r200: fix the state emission before kernel clear

this moves the emission outside the lock and adds r200 support.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

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

diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c
index a1b5057..b72f69b 100644
--- a/src/mesa/drivers/dri/r200/r200_ioctl.c
+++ b/src/mesa/drivers/dri/r200/r200_ioctl.c
@@ -61,6 +61,8 @@ static void r200KernelClear(GLcontext *ctx, GLuint flags)
    GLint cx, cy, cw, ch, ret;
    GLuint i;
 
+   radeonEmitState(&rmesa->radeon);
+
    LOCK_HARDWARE( &rmesa->radeon );
 
    /* Throttle the number of clear ioctls we do.
diff --git a/src/mesa/drivers/dri/radeon/radeon_ioctl.c b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
index d429f15..5ac526c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c
@@ -442,6 +442,8 @@ static void radeonKernelClear(GLcontext *ctx, GLuint flags)
    GLint ret, i;
    GLint cx, cy, cw, ch;
 
+   radeonEmitState(&rmesa->radeon);
+
    LOCK_HARDWARE( &rmesa->radeon );
 
    /* compute region after locking: */
@@ -481,7 +483,6 @@ static void radeonKernelClear(GLcontext *ctx, GLuint flags)
       }
    }
 
-   radeonEmitState(&rmesa->radeon);
    /* Send current state to the hardware */
    rcommonFlushCmdBufLocked( &rmesa->radeon, __FUNCTION__ );
 




More information about the mesa-commit mailing list