diff options
| author | bunnei <bunneidev@gmail.com> | 2022-11-03 22:21:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-03 22:21:58 -0700 |
| commit | 38e4382f532d606afbd3969990a9ca3bac70e557 (patch) | |
| tree | b9af6ed0a26285f4b0dcd5c21028601004267607 /src/video_core/renderer_vulkan/pipeline_helper.h | |
| parent | 37de88040c1999fed639004fb7200cabb8a5f9c0 (diff) | |
| parent | c864cb57726e76e9dc4558036f3212168bec825d (diff) | |
Merge pull request #8858 from vonchenplus/mipmap
video_core: Generate mipmap texture by drawing
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, |
