Mesa (master): aco: default to a definition size of 32

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 28 13:16:50 UTC 2020


Module: Mesa
Branch: master
Commit: 41839d38cf367baea66dfe2306cc4dd0b4adaf2f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=41839d38cf367baea66dfe2306cc4dd0b4adaf2f

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Wed Oct 21 16:00:36 2020 +0100

aco: default to a definition size of 32

For non-arithmetic opcodes such as buffer_load_dword and buffer_load_short,
default to a definition size of 32.

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/7276>

---

 src/amd/compiler/aco_opcodes.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/amd/compiler/aco_opcodes.py b/src/amd/compiler/aco_opcodes.py
index 42629c41051..868ba2ba02c 100644
--- a/src/amd/compiler/aco_opcodes.py
+++ b/src/amd/compiler/aco_opcodes.py
@@ -206,7 +206,10 @@ class Opcode(object):
       op_dtype_sizes['i16'] = 32
       op_dtype_sizes['u16'] = 32
 
-      self.operand_size = op_dtype_sizes.get(op_dtype, 0)
+      # If we can't tell the definition size and the operand size, default to
+      # 32. Some opcodes can have a larger definition size, but
+      # get_subdword_definition_info() handles that.
+      self.operand_size = op_dtype_sizes.get(op_dtype, 32)
       self.definition_size = def_dtype_sizes.get(def_dtype, self.operand_size)
 
       # exceptions
@@ -228,9 +231,6 @@ class Opcode(object):
          self.definition_size = 32
       elif '_pknorm_' in name:
          self.definition_size = 32
-      elif format == Format.PSEUDO_REDUCTION:
-         # 64-bit reductions can have a larger definition size, but get_subdword_definition_info() handles that
-         self.definition_size = 32
 
 
 # global dictionary of opcodes



More information about the mesa-commit mailing list