OSDN Git Service

i965: Also consider HALTs a potential block end.
authorEric Anholt <eric@anholt.net>
Wed, 12 Dec 2012 20:47:50 +0000 (12:47 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 14 Dec 2012 23:45:26 +0000 (15:45 -0800)
The final halt of the fragment shader turns off the remaining channels,
then jumps such that everything is turned back on.  So, we can have our
last ENDIF of the shader point at that directly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_eu_emit.c

index c294bae..8a93ced 100644 (file)
@@ -2317,6 +2317,7 @@ brw_find_next_block_end(struct brw_compile *p, int start)
       case BRW_OPCODE_ENDIF:
       case BRW_OPCODE_ELSE:
       case BRW_OPCODE_WHILE:
+      case BRW_OPCODE_HALT:
         return ip;
       }
    }