From f6f0762e81c45faa6293cbb1f0be0b0d9a4b7a7b Mon Sep 17 00:00:00 2001 From: Nguyen Dac Nam Date: Tue, 18 Feb 2020 21:34:01 +0700 Subject: vk_shader: Implement function ImageLoad (Used by Kirby Start Allies) Please enter the commit message for your changes. Lines starting --- src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp index 24a658dce..070c98eef 100644 --- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp @@ -1748,8 +1748,12 @@ private: } Expression ImageLoad(Operation operation) { - UNIMPLEMENTED(); - return {}; + const auto& meta{std::get(operation.GetMeta())}; + + const Id coords = GetCoordinates(operation, Type::Int); + const Id texel = OpImageRead(t_uint4, GetImage(operation), coords); + + return {OpCompositeExtract(t_uint, texel, meta.element), Type::Uint}; } Expression ImageStore(Operation operation) { -- cgit v1.2.3