diff options
author | Dave Airlie <airlied@redhat.com> | 2010-02-24 17:19:09 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-24 19:16:13 +1000 |
commit | bc7e12e5e3c063b8f29fecad43d85b09fa6b205d (patch) | |
tree | 568fac7924186fb58cdbdd7c581a6cce81c957b8 /src/mesa/drivers/dri | |
parent | 7accf8ced6f939d227e3b06fed99d00e73b36833 (diff) |
radeon/r200: fix bad state emission causes kernel to do bad depth clear
The kernel lets you clear depth without getting a depth offset
from userspace, mesa used to emit state before clear, but that got
lost in the refactoring, which made the kernel bug show up. Fix
mesa driver to emit the state properly now.
cherry-pick + squash master commits.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_ioctl.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_ioctl.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_ioctl.c b/src/mesa/drivers/dri/r200/r200_ioctl.c index b238adb9721..e81dcc2638a 100644 --- a/src/mesa/drivers/dri/r200/r200_ioctl.c +++ b/src/mesa/drivers/dri/r200/r200_ioctl.c @@ -65,6 +65,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 674b72d3de6..8ea8900abc3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_ioctl.c +++ b/src/mesa/drivers/dri/radeon/radeon_ioctl.c @@ -457,6 +457,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: */ |