From 94c1e65de97c2c62fbc436f3d43268843ec21ead Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 3 May 2021 09:50:44 -0500 Subject: [PATCH] intel/eu: Set message subtype properly for SIMD8 FB fetch There were two bugs which crep in here as part of 64551610d1e6: forgetting that exec sizes in HW are in log2 space and having the exec_size condition for the subtype backwards. Fixes: 64551610d1e6 "intel/compiler: rework message descriptors..." Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_eu.h | 4 +++- src/intel/compiler/brw_eu_emit.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_eu.h b/src/intel/compiler/brw_eu.h index d84af2b73b4..6c15ad78a08 100644 --- a/src/intel/compiler/brw_eu.h +++ b/src/intel/compiler/brw_eu.h @@ -1068,10 +1068,12 @@ brw_fb_read_desc(const struct intel_device_info *devinfo, bool per_sample) { assert(devinfo->ver >= 9); + assert(exec_size == 8 || exec_size == 16); + return brw_fb_desc(devinfo, binding_table_index, GFX9_DATAPORT_RC_RENDER_TARGET_READ, msg_control) | SET_BITS(per_sample, 13, 13) | - SET_BITS(exec_size == 16, 8, 8) /* Render Target Message Subtype */; + SET_BITS(exec_size == 8, 8, 8) /* Render Target Message Subtype */; } static inline uint32_t diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c index a8577fac632..775ef37e034 100644 --- a/src/intel/compiler/brw_eu_emit.c +++ b/src/intel/compiler/brw_eu_emit.c @@ -2490,7 +2490,7 @@ gfx9_fb_READ(struct brw_codegen *p, p, insn, brw_message_desc(devinfo, msg_length, response_length, true) | brw_fb_read_desc(devinfo, binding_table_index, 0 /* msg_control */, - brw_get_default_exec_size(p), per_sample)); + 1 << brw_get_default_exec_size(p), per_sample)); brw_inst_set_rt_slot_group(devinfo, insn, brw_get_default_group(p) / 16); return insn;