summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar Subv2018-06-04 19:03:47 -0500
committerGravatar Subv2018-06-04 20:17:41 -0500
commit23b1e6eded2d4af99b69d6958314db610ab23cd3 (patch)
tree14161915d3416ded9edd36c45bbb6ac03f6394da /src/video_core/engines
parentGPU: Added decodings for the ISCADD instructions. (diff)
downloadyuzu-23b1e6eded2d4af99b69d6958314db610ab23cd3.tar.gz
yuzu-23b1e6eded2d4af99b69d6958314db610ab23cd3.tar.xz
yuzu-23b1e6eded2d4af99b69d6958314db610ab23cd3.zip
GPU: Implement the ISCADD shader instructions.
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index da451c4d6..8d4ea3401 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -233,6 +233,22 @@ union Instruction {
233 } alu; 233 } alu;
234 234
235 union { 235 union {
236 BitField<39, 5, u64> shift_amount;
237 BitField<20, 19, u64> immediate_low;
238 BitField<56, 1, u64> immediate_high;
239 BitField<48, 1, u64> negate_b;
240 BitField<49, 1, u64> negate_a;
241
242 s32 GetImmediate() const {
243 u32 immediate = static_cast<u32>(immediate_low | (immediate_high << 19));
244 // Sign extend the 20-bit value.
245 u32 mask = 1U << (20 - 1);
246 return static_cast<s32>((immediate ^ mask) - mask);
247 }
248
249 } iscadd;
250
251 union {
236 BitField<48, 1, u64> negate_b; 252 BitField<48, 1, u64> negate_b;
237 BitField<49, 1, u64> negate_c; 253 BitField<49, 1, u64> negate_c;
238 } ffma; 254 } ffma;