diff options
author | bunnei <bunneidev@gmail.com> | 2020-06-13 19:48:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-13 19:48:27 +0200 |
commit | c2ea1e1bcb88f8e307e54cf588829a516b40258e (patch) | |
tree | 3975cb756ef9d289cc13f3f6dc2a302dacc2c758 /src/video_core/renderer_vulkan | |
parent | Merge pull request #3986 from ReinUsesLisp/shader-cache (diff) | |
parent | shader/texture: Join separate image and sampler pairs offline (diff) | |
download | yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.tar yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.tar.gz yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.tar.bz2 yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.tar.lz yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.tar.xz yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.tar.zst yuzu-c2ea1e1bcb88f8e307e54cf588829a516b40258e.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3170c41f8..184b2238a 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -118,6 +118,17 @@ template <typename Engine, typename Entry> Tegra::Texture::FullTextureInfo GetTextureInfo(const Engine& engine, const Entry& entry, std::size_t stage, std::size_t index = 0) { const auto stage_type = static_cast<Tegra::Engines::ShaderType>(stage); + if constexpr (std::is_same_v<Entry, SamplerEntry>) { + if (entry.is_separated) { + const u32 buffer_1 = entry.buffer; + const u32 buffer_2 = entry.secondary_buffer; + const u32 offset_1 = entry.offset; + const u32 offset_2 = entry.secondary_offset; + const u32 handle_1 = engine.AccessConstBuffer32(stage_type, buffer_1, offset_1); + const u32 handle_2 = engine.AccessConstBuffer32(stage_type, buffer_2, offset_2); + return engine.GetTextureInfo(handle_1 | handle_2); + } + } if (entry.is_bindless) { const auto tex_handle = engine.AccessConstBuffer32(stage_type, entry.buffer, entry.offset); return engine.GetTextureInfo(tex_handle); |