Mesa (master): radeonsi: Improve assert info out of si_set_framebuffer_state()

Dave Airlie airlied at kemper.freedesktop.org
Thu Apr 7 02:05:34 UTC 2016


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

Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Sun Mar 20 18:01:06 2016 +1100

radeonsi: Improve assert info out of si_set_framebuffer_state()

Lets give the developer a little hand if we are going to assert
on a zero literal at the end of a branch.

Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_state.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 415b03a..f559c73 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2628,6 +2628,8 @@ static void si_set_framebuffer_state(struct pipe_context *ctx,
 			constbuf.user_buffer = sctx->b.sample_locations_16x;
 			break;
 		default:
+			R600_ERR("Requested an invalid number of samples %i.\n",
+				 sctx->framebuffer.nr_samples);
 			assert(0);
 		}
 		constbuf.buffer_size = sctx->framebuffer.nr_samples * 2 * 4;




More information about the mesa-commit mailing list