summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar Subv2018-08-18 14:36:37 -0500
committerGravatar Subv2018-08-18 14:36:37 -0500
commit8335b2f115d8c2e082f1b085eedb54d334489f6d (patch)
tree108bfacaaa4d40d36a0e0aa41701d7330ded4ee6 /src/video_core/engines
parentMerge pull request #1100 from ogniK5377/missing-pred (diff)
downloadyuzu-8335b2f115d8c2e082f1b085eedb54d334489f6d.tar.gz
yuzu-8335b2f115d8c2e082f1b085eedb54d334489f6d.tar.xz
yuzu-8335b2f115d8c2e082f1b085eedb54d334489f6d.zip
Shader: Implemented the predicate and mode arguments of LOP.
The mode can be used to set the predicate to true depending on the result of the logic operation. In some cases, this means discarding the result (writing it to register 0xFF (Zero)). This is used by Super Mario Odyssey.
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index b038a9d92..6cfb9c5f8 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -214,6 +214,11 @@ enum class FlowCondition : u64 {
214 Fcsm_Tr = 0x1C, // TODO(bunnei): What is this used for? 214 Fcsm_Tr = 0x1C, // TODO(bunnei): What is this used for?
215}; 215};
216 216
217enum class PredicateResultMode : u64 {
218 None = 0x0,
219 NotZero = 0x3,
220};
221
217union Instruction { 222union Instruction {
218 Instruction& operator=(const Instruction& instr) { 223 Instruction& operator=(const Instruction& instr) {
219 value = instr.value; 224 value = instr.value;
@@ -254,7 +259,7 @@ union Instruction {
254 BitField<39, 1, u64> invert_a; 259 BitField<39, 1, u64> invert_a;
255 BitField<40, 1, u64> invert_b; 260 BitField<40, 1, u64> invert_b;
256 BitField<41, 2, LogicOperation> operation; 261 BitField<41, 2, LogicOperation> operation;
257 BitField<44, 2, u64> unk44; 262 BitField<44, 2, PredicateResultMode> pred_result_mode;
258 BitField<48, 3, Pred> pred48; 263 BitField<48, 3, Pred> pred48;
259 } lop; 264 } lop;
260 265