summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-01-23 17:19:44 +0100
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-01-24 23:03:29 -0800
commit85059964307c3f10e4a328d82af2bb791a5a4927 (patch)
tree5d2e0499c3b2de9e56feb2e30f2727978735a523 /src
parent4aed0944f4b8b8d14d210cf6bc87ccddfa9a77ec (diff)
radeong: do not emit a zero-sized command stream
Fixing a hardlock introduced in fcbd285e421903ee0a65f19f5d633b25b5923c24 and reproducible with piglit/bugs/fdo23489.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/drm/radeon/core/radeon_r300.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/winsys/drm/radeon/core/radeon_r300.c b/src/gallium/winsys/drm/radeon/core/radeon_r300.c
index 0875ee41cb..0253bc2527 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_r300.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_r300.c
@@ -108,6 +108,11 @@ static void radeon_flush_cs(struct radeon_winsys* winsys)
{
int retval;
+ /* Don't flush a zero-sized CS. */
+ if (!winsys->priv->cs->cdw) {
+ return;
+ }
+
/* Emit the CS. */
retval = radeon_cs_emit(winsys->priv->cs);
if (retval) {