diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-06 07:56:15 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:26 +0200 |
commit | 1f3eb601acdcdfa4c119cffbf36b5792147b893f (patch) | |
tree | 1a8dcc5e4ce11e9090dd6d7a8b4e8aaa130ff67b /src/video_core/renderer_vulkan/pipeline_helper.h | |
parent | shader: Address feedback (diff) | |
download | yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.tar yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.tar.gz yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.tar.bz2 yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.tar.lz yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.tar.xz yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.tar.zst yuzu-1f3eb601acdcdfa4c119cffbf36b5792147b893f.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/pipeline_helper.h')
-rw-r--r-- | src/video_core/renderer_vulkan/pipeline_helper.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/pipeline_helper.h b/src/video_core/renderer_vulkan/pipeline_helper.h index eebe5d569..decf0d32c 100644 --- a/src/video_core/renderer_vulkan/pipeline_helper.h +++ b/src/video_core/renderer_vulkan/pipeline_helper.h @@ -93,6 +93,9 @@ public: for ([[maybe_unused]] const auto& desc : info.texture_descriptors) { Add(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, stage); } + for (const auto& desc : info.texture_buffer_descriptors) { + Add(VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, stage); + } } private: @@ -146,6 +149,8 @@ inline VideoCommon::ImageViewType CastType(Shader::TextureType type) { case Shader::TextureType::ColorArrayCube: case Shader::TextureType::ShadowArrayCube: return VideoCommon::ImageViewType::CubeArray; + case Shader::TextureType::Buffer: + break; } UNREACHABLE_MSG("Invalid texture type {}", type); return {}; @@ -161,6 +166,11 @@ inline void PushImageDescriptors(const Shader::Info& info, const VkSampler* samp update_descriptor_queue.AddSampledImage(vk_image_view, sampler); ++index; } + for (const auto& desc : info.texture_buffer_descriptors) { + ImageView& image_view{texture_cache.GetImageView(image_view_ids[index])}; + update_descriptor_queue.AddTexelBuffer(image_view.BufferView()); + ++index; + } } } // namespace Vulkan |