From: Rob Clark Date: Sat, 29 Mar 2014 15:42:01 +0000 (-0400) Subject: freedreno/a3xx: little extra debug X-Git-Tag: upstream/10.3~2873 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae5efaf2859db722cb8ef9be5ae5807068cbc1e5;p=platform%2Fupstream%2Fmesa.git freedreno/a3xx: little extra debug Catch things which should not happen in debug builds. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index a84351a..09cadf8 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -300,6 +300,8 @@ find_output(const struct fd3_shader_variant *so, fd3_semantic semantic) return find_output(so, fd3_semantic_name(TGSI_SEMANTIC_COLOR, idx)); } + assert(0); + return 0; } diff --git a/src/gallium/drivers/freedreno/a3xx/ir3_ra.c b/src/gallium/drivers/freedreno/a3xx/ir3_ra.c index 9d3a778..d926483 100644 --- a/src/gallium/drivers/freedreno/a3xx/ir3_ra.c +++ b/src/gallium/drivers/freedreno/a3xx/ir3_ra.c @@ -440,6 +440,9 @@ static void ra_assign_reg(struct ir3_visitor *v, reg->flags &= ~IR3_REG_SSA; reg->num = a->num & ~REG_HALF; + + assert(reg->num >= 0); + if (a->num & REG_HALF) { reg->flags |= IR3_REG_HALF; /* if dst reg being assigned, patch up the instr: */