From: Rob Clark Date: Sat, 29 Mar 2014 15:42:01 +0000 (-0400) Subject: freedreno/a3xx: little extra debug X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae5efaf2859db722cb8ef9be5ae5807068cbc1e5;hp=92141afd0eda8ac4c3940fdb5682d39a5726e36a;p=mesa.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 a84351ae887..09cadf81cbf 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 9d3a7783494..d926483a222 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: */