aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2020-01-23 17:51:09 +0100
committerMarge Bot <[email protected]>2020-01-24 18:34:27 +0000
commitb9cc50fbce4c5aeab035d855c9368e24e2ed2d20 (patch)
tree0ceb368a609c28f1f50a840ad9f53fc15802c94d /src
parentf55e215b8c7ebbd58635694f048b121bb1d1bc03 (diff)
aco: fix a hardware bug for MRTZ exports on GFX6
GFX6 (except OLAND and HAINAN) has a bug that it only looks at the X writemask component. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3533>
Diffstat (limited to 'src')
-rw-r--r--src/amd/compiler/aco_instruction_selection.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index 7e3226635a3..60344d299ca 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -8364,6 +8364,15 @@ static void export_fs_mrt_z(isel_context *ctx)
}
}
+ /* GFX6 (except OLAND and HAINAN) has a bug that it only looks at the X
+ * writemask component.
+ */
+ if (ctx->options->chip_class == GFX6 &&
+ ctx->options->family != CHIP_OLAND &&
+ ctx->options->family != CHIP_HAINAN) {
+ enabled_channels |= 0x1;
+ }
+
bld.exp(aco_opcode::exp, values[0], values[1], values[2], values[3],
enabled_channels, V_008DFC_SQ_EXP_MRTZ, compr);
}