From e910241e9754b6e673ed0fc3133c8b1de56e76c7 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 27 Jan 2012 12:54:11 -0800 Subject: 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 --- src/mesa/drivers/dri/i965/brw_structs.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/mesa/drivers/dri/i965/brw_structs.h') 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 -- cgit v1.2.3