summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-01-17 08:08:25 -0800
committerIan Romanick <ian.d.romanick@intel.com>2012-01-24 15:39:46 -0800
commit5f25e0a39cb5111c1d36813a28ee283db683ae07 (patch)
tree0ee659456340bfa02286537907a9c3f3f3f19507
parentf48e6748a719968dd0b959c00f3d89eb7d4c6e82 (diff)
i965: Bump Ivybridge's fake MRF range to g112-127 instead of g111-126.
When I originally implemented the hack to use GRFs 111+ as fake MRFs, I did so purely to avoid rewriting all the code that dealt with MRFs. However, it turns out that a similar hack is actually required. Newly discovered language in the BSpec indicates that SEND instructions with EOT set "should" use g112-g127 as their source registers. Based on assertions in the simulator, this is actually a requirement on certain platforms. Since we're faking MRFs already, we may as well use the officially sanctioned range. My guess is that we avoided this issue because we seldom use m0: URB writes in the new VS backend start at m1, and RT writes in the new FS backend start at m2. NOTE: This is a candidate for stable release branches. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 5acc7f38d42859db459567d4442c18764a4072e7)
-rw-r--r--src/mesa/drivers/dri/i965/brw_eu_emit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 1f4afa0edab..d8ea06f0e6a 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -84,10 +84,18 @@ gen6_resolve_implied_move(struct brw_compile *p,
static void
gen7_convert_mrf_to_grf(struct brw_compile *p, struct brw_reg *reg)
{
+ /* From the BSpec / ISA Reference / send - [DevIVB+]:
+ * "The send with EOT should use register space R112-R127 for <src>. This is
+ * to enable loading of a new thread into the same slot while the message
+ * with EOT for current thread is pending dispatch."
+ *
+ * Since we're pretending to have 16 MRFs anyway, we may as well use the
+ * registers required for messages with EOT.
+ */
struct intel_context *intel = &p->brw->intel;
if (intel->gen == 7 && reg->file == BRW_MESSAGE_REGISTER_FILE) {
reg->file = BRW_GENERAL_REGISTER_FILE;
- reg->nr += 111;
+ reg->nr += 112;
}
}