[Mesa-dev] [PATCH 3/6] i965/generator: use MRF when sending 1-OWord read messages for DF scratch reads on IVB

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Jun 15 11:15:07 UTC 2017


Use MRF for 1-Oword read messages again to avoid problems when
sending scratch read messages. We cannot reuse the destination as the DF
scratch reads on IVB are splitted in several instructions and that could
end up having invalid data.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/intel/compiler/brw_eu_emit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c
index bd6f46c776..fa6dc0d5ff 100644
--- a/src/intel/compiler/brw_eu_emit.c
+++ b/src/intel/compiler/brw_eu_emit.c
@@ -2267,7 +2267,9 @@ brw_oword_block_read_scratch(struct brw_codegen *p,
    if (devinfo->gen >= 6)
       offset /= 16;
 
-   if (p->devinfo->gen >= 7) {
+   if (p->devinfo->gen >= 7 &&
+       (p->devinfo->gen > 7 || p->devinfo->is_haswell ||
+        type_sz(dest.type) != 8)) {
       /* On gen 7 and above, we no longer have message registers and we can
        * send from any register we want.  By using the destination register
        * for the message, we guarantee that the implied message write won't
-- 
2.11.0



More information about the mesa-dev mailing list