<div dir="ltr">Assuming my half-dozen comments are addressed, 5-14 are<br>Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 28, 2014 at 8:10 PM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
 src/mesa/drivers/dri/i965/brw_eu_compact.c | 35 ++++++++++++++++++++++++++++++<br>
 1 file changed, 35 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c<br>
index e9ba928..38a60d0 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_eu_compact.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c<br>
@@ -35,6 +35,41 @@<br>
  * The idea of instruction compaction is that most instructions use a tiny<br>
  * subset of the GPU functionality, so we can encode what would be a 16 byte<br>
  * instruction in 8 bytes using some lookup tables for various fields.<br>
+ *<br>
+ *<br>
+ * Instruction compaction capabilities vary subtly by generation.<br>
+ *<br>
+ * G45's support for instruction compaction is very limited. Jump counts on<br>
+ * this generation are in units of 16-byte uncompacted instructions. As such,<br>
+ * all jump targets must be 16-byte aligned. Also, all instructions must be<br>
+ * naturally aligned, i.e. uncompacted instructions must be 16-byte aligned.<br>
+ * A G45-only instruction, NENOP, must be used to provide padding to align<br>
+ * uncompacted instructions.<br>
+ *<br>
+ * Gen5 removes these restrictions and changes jump counts to be in units of<br>
+ * 8-byte compacted instructions, allowing jump targets to be only 8-byte<br>
+ * aligned. Uncompacted instructions can also be placed on 8-byte boundaries.<br>
+ *<br>
+ * Gen6 adds the ability to compact instructions with a limited range of<br>
+ * immediate values. Compactable immediates have 12 unrestricted bits, and a<br>
+ * 13th bit that's replicated through the high 20 bits, to create the 32-bit<br>
+ * value of DW3 in the uncompacted instruction word.<br>
+ *<br>
+ * On Gen7 we can compact some control flow instructions with a small positive<br>
+ * immediate in the low bits of DW3, like ENDIF with the JIP field. Other<br>
+ * control flow instructions with UIP cannot be compacted, because of the<br>
+ * replicated 13th bit. No control flow instructions can be compacted on Gen6<br>
+ * since the jump count field is not in DW3.<br>
+ *<br>
+ *    break    JIP/UIP<br>
+ *    cont     JIP/UIP<br>
+ *    halt     JIP/UIP<br>
+ *    if       JIP/UIP<br>
+ *    else     JIP (plus UIP on BDW+)<br>
+ *    endif    JIP<br>
+ *    while    JIP (must be negative)<br>
+ *<br>
+ * Gen 8 adds support for compacting 3-src instructions.<br>
  */<br>
<br>
 #include "brw_context.h"<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.5.5<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>