From: Kenneth Graunke Date: Tue, 4 Nov 2014 06:16:13 +0000 (-0800) Subject: i965: Update compaction code to handle Skylake like Cherryview. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5ad8a5d72654f5d99891024407b5a68406223e5;p=mesa.git i965: Update compaction code to handle Skylake like Cherryview. Matt requested this in review feedback on the original patch, which I completely missed when pushing this series. Kristian also made this change, but I grabbed the wrong version of the patch. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner --- diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c index 97dc368971f..7117890197a 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c @@ -795,7 +795,7 @@ set_3src_control_index(struct brw_context *brw, brw_compact_inst *dst, brw_inst (brw_inst_bits(src, 34, 32) << 21) | /* 3b */ (brw_inst_bits(src, 28, 8)); /* 21b */ - if (brw->is_cherryview) + if (brw->gen >= 9 || brw->is_cherryview) uncompacted |= brw_inst_bits(src, 36, 35) << 24; /* 2b */ for (int i = 0; i < ARRAY_SIZE(gen8_3src_control_index_table); i++) { @@ -820,7 +820,7 @@ set_3src_source_index(struct brw_context *brw, brw_compact_inst *dst, brw_inst * (brw_inst_bits(src, 72, 65) << 19) | /* 8b */ (brw_inst_bits(src, 55, 37)); /* 19b */ - if (brw->is_cherryview) { + if (brw->gen >= 9 || brw->is_cherryview) { uncompacted |= (brw_inst_bits(src, 126, 125) << 47) | /* 2b */ (brw_inst_bits(src, 105, 104) << 45) | /* 2b */ @@ -1057,7 +1057,7 @@ set_uncompacted_3src_control_index(struct brw_context *brw, brw_inst *dst, brw_inst_set_bits(dst, 34, 32, (uncompacted >> 21) & 0x7); brw_inst_set_bits(dst, 28, 8, (uncompacted >> 0) & 0x1fffff); - if (brw->is_cherryview) + if (brw->gen >= 9 || brw->is_cherryview) brw_inst_set_bits(dst, 36, 35, (uncompacted >> 24) & 0x3); } @@ -1076,7 +1076,7 @@ set_uncompacted_3src_source_index(struct brw_context *brw, brw_inst *dst, brw_inst_set_bits(dst, 72, 65, (uncompacted >> 19) & 0xff); brw_inst_set_bits(dst, 55, 37, (uncompacted >> 0) & 0x7ffff); - if (brw->is_cherryview) { + if (brw->gen >= 9 || brw->is_cherryview) { brw_inst_set_bits(dst, 126, 125, (uncompacted >> 47) & 0x3); brw_inst_set_bits(dst, 105, 104, (uncompacted >> 45) & 0x3); brw_inst_set_bits(dst, 84, 84, (uncompacted >> 44) & 0x1);