freedreno/ir3/asm: change assert to warning
authorRob Clark <robclark@freedesktop.org>
Mon, 6 Apr 2015 15:42:57 +0000 (11:42 -0400)
committerRob Clark <robclark@freedesktop.org>
Sat, 11 Apr 2015 15:40:03 +0000 (11:40 -0400)
It probably *should* be an assert, but for now TGSI f/e isn't very good
about dealing w/ CONST vs ABS/NEG.  So for debug builds, print a warning
instead of crashing with an assert for now.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3.c

index 284c6559eb1a745ba5d6e69597725bed9180e673..e015de91c33412899965f540748ea14f1bedaf3f 100644 (file)
@@ -97,7 +97,10 @@ static uint32_t reg(struct ir3_register *reg, struct ir3_info *info,
 {
        reg_t val = { .dummy32 = 0 };
 
-       assert(!(reg->flags & ~valid_flags));
+       if (reg->flags & ~valid_flags) {
+               debug_printf("INVALID FLAGS: %x vs %x\n",
+                               reg->flags, valid_flags);
+       }
 
        if (!(reg->flags & IR3_REG_R))
                repeat = 0;