summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-04-20 03:24:00 -0300
committerGravatar ReinUsesLisp2020-04-23 18:29:38 -0300
commitdbaebd8582c33807ca25acbf36cbd90587c9cfa9 (patch)
treee64142da235b23d85320ad53741cfb2b0cd51f5f /src/video_core/engines
parentMerge pull request #3719 from jbeich/clang (diff)
downloadyuzu-dbaebd8582c33807ca25acbf36cbd90587c9cfa9.tar.gz
yuzu-dbaebd8582c33807ca25acbf36cbd90587c9cfa9.tar.xz
yuzu-dbaebd8582c33807ca25acbf36cbd90587c9cfa9.zip
decode/arithmetic_half: Fix HADD2 and HMUL2 absolute and negation bits
The encoding for negation and absolute value was wrong. Extracting is now done manually. Similar instructions having different encodings is the rule, not the exception. To keep sanity and readability I preferred to extract the desired bit manually. This is implemented against nxas: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L68 That is itself tested against nvdisasm (Nvidia's official disassembler).
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 7231597d4..44dbb8088 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -817,11 +817,9 @@ union Instruction {
817 BitField<32, 1, u64> saturate; 817 BitField<32, 1, u64> saturate;
818 BitField<49, 2, HalfMerge> merge; 818 BitField<49, 2, HalfMerge> merge;
819 819
820 BitField<43, 1, u64> negate_a;
821 BitField<44, 1, u64> abs_a; 820 BitField<44, 1, u64> abs_a;
822 BitField<47, 2, HalfType> type_a; 821 BitField<47, 2, HalfType> type_a;
823 822
824 BitField<31, 1, u64> negate_b;
825 BitField<30, 1, u64> abs_b; 823 BitField<30, 1, u64> abs_b;
826 BitField<28, 2, HalfType> type_b; 824 BitField<28, 2, HalfType> type_b;
827 825