summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2019-12-05 21:40:51 -0500
committerMarge Bot <eric+marge@anholt.net>2021-05-05 02:56:20 +0000
commit10abc09a0444f0853e0c7208cb280ed2c2d477f0 (patch)
treee275fe4b8647b5c24cc16a51e65635a8fcbf10b9
parent26feb458108c6339edbe68052a6e6a29398ec22e (diff)
intel: fix MI builder for pre-gen7
MI_LOAD_REGISTER_MEM is only available on gen7+, so avoid build errors on earlier generations. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10636>
-rw-r--r--src/intel/common/mi_builder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel/common/mi_builder.h b/src/intel/common/mi_builder.h
index 71927ca9f59..a73f4996557 100644
--- a/src/intel/common/mi_builder.h
+++ b/src/intel/common/mi_builder.h
@@ -499,6 +499,7 @@ _mi_copy_no_unref(struct mi_builder *b,
case MI_VALUE_TYPE_MEM32:
case MI_VALUE_TYPE_MEM64:
+#if GFX_VER >= 7
mi_builder_emit(b, GENX(MI_LOAD_REGISTER_MEM), lrm) {
struct mi_reg_num reg = mi_adjust_reg_num(dst.reg);
lrm.RegisterAddress = reg.num;
@@ -507,6 +508,9 @@ _mi_copy_no_unref(struct mi_builder *b,
#endif
lrm.MemoryAddress = src.addr;
}
+#else
+ unreachable("Cannot load do mem -> reg copy on SNB and earlier");
+#endif
break;
case MI_VALUE_TYPE_REG32: