summaryrefslogtreecommitdiff
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorGravatar bunnei2018-06-06 22:21:29 -0400
committerGravatar bunnei2018-06-06 22:21:29 -0400
commit128aeba0f3fc2477f91a00b1aba866f113a6945f (patch)
tree1022593280140fa23c14b78c7dfebf0b20ea1cfe /src/video_core/engines
parentMerge pull request #537 from bunnei/misc-shader (diff)
downloadyuzu-128aeba0f3fc2477f91a00b1aba866f113a6945f.tar.gz
yuzu-128aeba0f3fc2477f91a00b1aba866f113a6945f.tar.xz
yuzu-128aeba0f3fc2477f91a00b1aba866f113a6945f.zip
gl_shader_decompiler: F2F: Implement rounding modes.
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index ab45cfbef..2cda1e63e 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -168,13 +168,22 @@ enum class SubOp : u64 {
168 Min = 0x8, 168 Min = 0x8,
169}; 169};
170 170
171enum class FloatRoundingOp : u64 { 171enum class F2iRoundingOp : u64 {
172 None = 0, 172 None = 0,
173 Floor = 1, 173 Floor = 1,
174 Ceil = 2, 174 Ceil = 2,
175 Trunc = 3, 175 Trunc = 3,
176}; 176};
177 177
178enum class F2fRoundingOp : u64 {
179 None = 0,
180 Pass = 3,
181 Round = 8,
182 Floor = 9,
183 Ceil = 10,
184 Trunc = 11,
185};
186
178enum class UniformType : u64 { 187enum class UniformType : u64 {
179 UnsignedByte = 0, 188 UnsignedByte = 0,
180 SignedByte = 1, 189 SignedByte = 1,
@@ -314,11 +323,11 @@ union Instruction {
314 BitField<50, 1, u64> saturate_a; 323 BitField<50, 1, u64> saturate_a;
315 324
316 union { 325 union {
317 BitField<39, 2, FloatRoundingOp> rounding; 326 BitField<39, 2, F2iRoundingOp> rounding;
318 } f2i; 327 } f2i;
319 328
320 union { 329 union {
321 BitField<39, 4, u64> rounding; 330 BitField<39, 4, F2fRoundingOp> rounding;
322 } f2f; 331 } f2f;
323 } conversion; 332 } conversion;
324 333