Mesa (master): freedreno/ir3: legalize cleanups
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 12 22:32:46 UTC 2019
Module: Mesa
Branch: master
Commit: df7a88dca3e85ad40e5313840aadce884b28bb8d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=df7a88dca3e85ad40e5313840aadce884b28bb8d
Author: Rob Clark <robdclark at chromium.org>
Date: Sun Nov 10 10:49:59 2019 -0800
freedreno/ir3: legalize cleanups
We can clear the "needs" flags once we emit a flag. And also, don't
open-code the opcode name.
Signed-off-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
src/freedreno/ir3/ir3_legalize.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/freedreno/ir3/ir3_legalize.c b/src/freedreno/ir3/ir3_legalize.c
index a7c41b36b10..4470eabd352 100644
--- a/src/freedreno/ir3/ir3_legalize.c
+++ b/src/freedreno/ir3/ir3_legalize.c
@@ -134,10 +134,16 @@ legalize_block(struct ir3_legalize_ctx *ctx, struct ir3_block *block)
if (last_n && is_barrier(last_n)) {
n->flags |= IR3_INSTR_SS | IR3_INSTR_SY;
last_input_needs_ss = false;
+ regmask_init(&state->needs_ss_war);
+ regmask_init(&state->needs_ss);
+ regmask_init(&state->needs_sy);
}
- if (last_n && opc_cat(last_n->opc) == 0 && opc_op(last_n->opc) == 13)
+ if (last_n && (last_n->opc == OPC_CONDEND)) {
n->flags |= IR3_INSTR_SS;
+ regmask_init(&state->needs_ss_war);
+ regmask_init(&state->needs_ss);
+ }
/* NOTE: consider dst register too.. it could happen that
* texture sample instruction (for example) writes some
More information about the mesa-commit
mailing list