diff options
author | FengChen <vonchenplus@gmail.com> | 2022-09-01 16:05:11 +0200 |
---|---|---|
committer | FengChen <vonchenplus@gmail.com> | 2022-09-20 05:55:43 +0200 |
commit | 9a95c7fa14bdfc14aacea92896c8ae8533918fe8 (patch) | |
tree | 3beb2289136a59134195d35e37d4b56b294a3081 /src/video_core/renderer_vulkan/pipeline_helper.h | |
parent | Merge pull request #8841 from zhaobot/tx-update-20220901035349 (diff) | |
download | yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.tar yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.tar.gz yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.tar.bz2 yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.tar.lz yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.tar.xz yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.tar.zst yuzu-9a95c7fa14bdfc14aacea92896c8ae8533918fe8.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, 9 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/pipeline_helper.h b/src/video_core/renderer_vulkan/pipeline_helper.h index b24f3424a..b7843e995 100644 --- a/src/video_core/renderer_vulkan/pipeline_helper.h +++ b/src/video_core/renderer_vulkan/pipeline_helper.h @@ -68,13 +68,15 @@ public: } vk::PipelineLayout CreatePipelineLayout(VkDescriptorSetLayout descriptor_set_layout) const { + using Shader::Backend::SPIRV::RenderAreaLayout; using Shader::Backend::SPIRV::RescalingLayout; const u32 size_offset = is_compute ? sizeof(RescalingLayout::down_factor) : 0u; const VkPushConstantRange range{ .stageFlags = static_cast<VkShaderStageFlags>( is_compute ? VK_SHADER_STAGE_COMPUTE_BIT : VK_SHADER_STAGE_ALL_GRAPHICS), .offset = 0, - .size = static_cast<u32>(sizeof(RescalingLayout)) - size_offset, + .size = static_cast<u32>(sizeof(RescalingLayout)) - size_offset + + static_cast<u32>(sizeof(RenderAreaLayout)), }; return device->GetLogical().CreatePipelineLayout({ .sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, @@ -167,6 +169,12 @@ private: u32 image_bit{1u}; }; +class RenderAreaPushConstant { +public: + bool uses_render_area{}; + std::array<f32, 4> words{}; +}; + inline void PushImageDescriptors(TextureCache& texture_cache, UpdateDescriptorQueue& update_descriptor_queue, const Shader::Info& info, RescalingPushConstant& rescaling, |