From 2135c88d9cc264f3583c1c60d28374dff59be0c5 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Wed, 10 Nov 2021 15:02:24 +0000 Subject: [PATCH] aco: fix signedness of DS_instruction::offset0/1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Timur Kristóf Part-of: --- 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),