summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-06-13 19:48:27 +0200
committerGitHub <noreply@github.com>2020-06-13 19:48:27 +0200
commitc2ea1e1bcb88f8e307e54cf588829a516b40258e (patch)
tree3975cb756ef9d289cc13f3f6dc2a302dacc2c758 /src/video_core/renderer_vulkan
parentMerge pull request #3986 from ReinUsesLisp/shader-cache (diff)
parentshader/texture: Join separate image and sampler pairs offline (diff)
downloadyuzu-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.cpp11
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);