From: Marek Olšák Date: Thu, 18 Aug 2011 20:59:22 +0000 (+0200) Subject: r600g: fix a possible crash in r600_adjust_gprs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e330d90e919cebd64f720ccfb5dca94c2ded4e4c;p=mesa.git r600g: fix a possible crash in r600_adjust_gprs --- diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 0757eab2ea7..19bef31468d 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -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)