Mesa (main): aco: don't apply omod/clamp of different bit-size
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 3 16:21:09 UTC 2022
Module: Mesa
Branch: main
Commit: 3d8a8c6fc1f5a53916f0fef68462ec0fad3a138a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d8a8c6fc1f5a53916f0fef68462ec0fad3a138a
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Mon Jan 31 18:12:59 2022 +0000
aco: don't apply omod/clamp of different bit-size
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14810>
---
src/amd/compiler/aco_optimizer.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 939551f9a6b..1a363941b13 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -3020,6 +3020,9 @@ apply_omod_clamp(opt_ctx& ctx, aco_ptr<Instruction>& instr)
if (!ctx.uses[def_info.instr->definitions[0].tempId()])
return false;
+ if (def_info.instr->definitions[0].bytes() != instr->definitions[0].bytes())
+ return false;
+
/* MADs/FMAs are created later, so we don't have to update the original add */
assert(!ctx.info[instr->definitions[0].tempId()].is_mad());
More information about the mesa-commit
mailing list