diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-02-15 23:42:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-15 23:42:38 +0100 |
commit | 04d2d2ef5fdd56baa0ecf60e59ea4e915262161d (patch) | |
tree | 3951ff8988fff573acd7f2b4edf5d95774b3721d /src/video_core/renderer_vulkan | |
parent | Merge pull request #9809 from liamwhite/unused-service (diff) | |
parent | remove constexpr from virtual function (diff) | |
download | yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.tar yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.tar.gz yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.tar.bz2 yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.tar.lz yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.tar.xz yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.tar.zst yuzu-04d2d2ef5fdd56baa0ecf60e59ea4e915262161d.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_smaa.cpp | 14 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.h | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_turbo_mode.cpp | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/video_core/renderer_vulkan/vk_smaa.cpp b/src/video_core/renderer_vulkan/vk_smaa.cpp index 8eb735489..f8735189d 100644 --- a/src/video_core/renderer_vulkan/vk_smaa.cpp +++ b/src/video_core/renderer_vulkan/vk_smaa.cpp @@ -468,7 +468,7 @@ VkWriteDescriptorSet CreateWriteDescriptorSet(std::vector<VkDescriptorImageInfo> } void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { - constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ + static constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .baseMipLevel = 0, .levelCount = 1, @@ -528,8 +528,8 @@ SMAA::SMAA(const Device& device, MemoryAllocator& allocator, size_t image_count, } void SMAA::CreateImages() { - constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; - constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; + static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; + static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); @@ -586,12 +586,12 @@ void SMAA::CreateSampler() { void SMAA::CreateShaders() { // These match the order of the SMAAStage enum - constexpr std::array vert_shader_sources{ + static constexpr std::array vert_shader_sources{ ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), }; - constexpr std::array frag_shader_sources{ + static constexpr std::array frag_shader_sources{ ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), @@ -675,8 +675,8 @@ void SMAA::UploadImages(Scheduler& scheduler) { return; } - constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; - constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; + static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; + static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; UploadImage(m_device, m_allocator, scheduler, m_static_images[Area], area_extent, VK_FORMAT_R8G8_UNORM, ARRAY_TO_SPAN(areaTexBytes)); diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index b9ee83de7..0ce39616f 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -113,7 +113,7 @@ public: std::optional<ASTCDecoderPass> astc_decoder_pass; const Settings::ResolutionScalingInfo& resolution; - constexpr static size_t indexing_slots = 8 * sizeof(size_t); + static constexpr size_t indexing_slots = 8 * sizeof(size_t); std::array<vk::Buffer, indexing_slots> buffers{}; std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{}; }; diff --git a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp index c42594149..db04943eb 100644 --- a/src/video_core/renderer_vulkan/vk_turbo_mode.cpp +++ b/src/video_core/renderer_vulkan/vk_turbo_mode.cpp @@ -48,7 +48,7 @@ void TurboMode::Run(std::stop_token stop_token) { auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); // Create the descriptor pool to contain our descriptor. - constexpr VkDescriptorPoolSize pool_size{ + static constexpr VkDescriptorPoolSize pool_size{ .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .descriptorCount = 1, }; @@ -63,7 +63,7 @@ void TurboMode::Run(std::stop_token stop_token) { }); // Create the descriptor set layout from the pool. - constexpr VkDescriptorSetLayoutBinding layout_binding{ + static constexpr VkDescriptorSetLayoutBinding layout_binding{ .binding = 0, .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, .descriptorCount = 1, |