r600g: fix a possible crash in r600_adjust_gprs
authorMarek Olšák <maraeo@gmail.com>
Thu, 18 Aug 2011 20:59:22 +0000 (22:59 +0200)
committerMarek Olšák <maraeo@gmail.com>
Fri, 19 Aug 2011 12:46:25 +0000 (14:46 +0200)
src/gallium/drivers/r600/r600_state.c

index 0757eab2ea7168d478b98c71f9d3fa0d55a063d0..19bef31468dc68b50623f0beefb11a8f107f3bb6 100644 (file)
@@ -1676,7 +1676,7 @@ void r600_adjust_gprs(struct r600_pipe_context *rctx)
        if (rctx->chip_class >= EVERGREEN)
                return;
 
-       if (!rctx->ps_shader && !rctx->vs_shader)
+       if (!rctx->ps_shader || !rctx->vs_shader)
                return;
 
        if (rctx->ps_shader->shader.bc.ngpr > rctx->default_ps_gprs)