aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_structs.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-01-27 12:54:11 -0800
committerEric Anholt <[email protected]>2012-01-30 11:32:55 -0800
commite910241e9754b6e673ed0fc3133c8b1de56e76c7 (patch)
tree4094c354171a3f8878b8f1dec43e6852f6d9cf7e /src/mesa/drivers/dri/i965/brw_structs.h
parentb9aab8b3b3769b9c5121686efe3446dae770b951 (diff)
i965/fs: Fix rendering corruption in unigine tropics.
We were allocating registers into the MRF hack region, resulting in sparkly renering in a few of the scenes. We could do better allocation by making an MRF class, having MRFs conflict with the corresponding GRFs, and tracking the live intervals of the "MRF"s and setting up the conflicts. But this is way easier for the moment. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_structs.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_structs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h
index aef56958c66..d23ad0d91a0 100644
--- a/src/mesa/drivers/dri/i965/brw_structs.h
+++ b/src/mesa/drivers/dri/i965/brw_structs.h
@@ -37,6 +37,17 @@
/** Number of general purpose registers (VS, WM, etc) */
#define BRW_MAX_GRF 128
+/**
+ * First GRF used for the MRF hack.
+ *
+ * On gen7, MRFs are no longer used, and contiguous GRFs are used instead. We
+ * haven't converted our compiler to be aware of this, so it asks for MRFs and
+ * brw_eu_emit.c quietly converts them to be accesses of the top GRFs. The
+ * register allocators have to be careful of this to avoid corrupting the "MRF"s
+ * with actual GRF allocations.
+ */
+#define GEN7_MRF_HACK_START 112.
+
/** Number of message register file registers */
#define BRW_MAX_MRF 16