Mesa (master): r600g: fix a possible crash in r600_adjust_gprs

Marek Olšák mareko at kemper.freedesktop.org
Fri Aug 19 07:05:06 PDT 2011


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

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Aug 18 22:59:22 2011 +0200

r600g: fix a possible crash in r600_adjust_gprs

---

 src/gallium/drivers/r600/r600_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 0757eab..19bef31 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)



More information about the mesa-commit mailing list