summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-26 02:56:11 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-26 03:55:26 +0200
commit255197e64363f9286ed145cafdeb129c85c16621 (patch)
tree976cb93129b86277b8136f21f3c7c2492bb8694d /src/video_core/renderer_vulkan
parentdecode/register_set_predicate: Implement CC (diff)
downloadyuzu-255197e64363f9286ed145cafdeb129c85c16621.tar
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.gz
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.bz2
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.lz
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.xz
yuzu-255197e64363f9286ed145cafdeb129c85c16621.tar.zst
yuzu-255197e64363f9286ed145cafdeb129c85c16621.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index aaa138f52..20b6ca0ad 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -1584,6 +1584,15 @@ private:
return {OpCompositeConstruct(t_half, low, high), Type::HalfFloat};
}
+ Expression LogicalAddCarry(Operation operation) {
+ const Id op_a = AsUint(Visit(operation[0]));
+ const Id op_b = AsUint(Visit(operation[1]));
+
+ const Id result = OpIAddCarry(TypeStruct({t_uint, t_uint}), op_a, op_b);
+ const Id carry = OpCompositeExtract(t_uint, result, 1);
+ return {OpINotEqual(t_bool, carry, Constant(t_uint, 0)), Type::Bool};
+ }
+
Expression LogicalAssign(Operation operation) {
const Node& dest = operation[0];
const Node& src = operation[1];
@@ -2518,6 +2527,8 @@ private:
&SPIRVDecompiler::Binary<&Module::OpINotEqual, Type::Bool, Type::Uint>,
&SPIRVDecompiler::Binary<&Module::OpUGreaterThanEqual, Type::Bool, Type::Uint>,
+ &SPIRVDecompiler::LogicalAddCarry,
+
&SPIRVDecompiler::Binary<&Module::OpFOrdLessThan, Type::Bool2, Type::HalfFloat>,
&SPIRVDecompiler::Binary<&Module::OpFOrdEqual, Type::Bool2, Type::HalfFloat>,
&SPIRVDecompiler::Binary<&Module::OpFOrdLessThanEqual, Type::Bool2, Type::HalfFloat>,