Mesa (main): aco: fix signedness of DS_instruction::offset0/1
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 23:39:27 UTC 2022
Module: Mesa
Branch: main
Commit: 2135c88d9cc264f3583c1c60d28374dff59be0c5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2135c88d9cc264f3583c1c60d28374dff59be0c5
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Wed Nov 10 15:02:24 2021 +0000
aco: fix signedness of DS_instruction::offset0/1
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13778>
---
src/amd/compiler/aco_ir.h | 4 ++--
src/amd/compiler/aco_opcodes.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h
index 51c405aa727..327acbf0e6a 100644
--- a/src/amd/compiler/aco_ir.h
+++ b/src/amd/compiler/aco_ir.h
@@ -1515,8 +1515,8 @@ static_assert(sizeof(Interp_instruction) == sizeof(Instruction) + 4, "Unexpected
struct DS_instruction : public Instruction {
memory_sync_info sync;
bool gds;
- int16_t offset0;
- int8_t offset1;
+ uint16_t offset0;
+ uint8_t offset1;
uint8_t padding;
};
static_assert(sizeof(DS_instruction) == sizeof(Instruction) + 8, "Unexpected padding");
diff --git a/src/amd/compiler/aco_opcodes.py b/src/amd/compiler/aco_opcodes.py
index d95f37a21e7..15ecb1aacd4 100644
--- a/src/amd/compiler/aco_opcodes.py
+++ b/src/amd/compiler/aco_opcodes.py
@@ -90,8 +90,8 @@ class Format(Enum):
('bool', 'dlc', 'false'),
('bool', 'nv', 'false')]
elif self == Format.DS:
- return [('int16_t', 'offset0', '0'),
- ('int8_t', 'offset1', '0'),
+ return [('uint16_t', 'offset0', '0'),
+ ('uint8_t', 'offset1', '0'),
('bool', 'gds', 'false')]
elif self == Format.MTBUF:
return [('unsigned', 'dfmt', None),
More information about the mesa-commit
mailing list