summaryrefslogtreecommitdiff
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_smaa.cpp14
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.h2
-rw-r--r--src/video_core/renderer_vulkan/vk_turbo_mode.cpp4
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>
468} 468}
469 469
470void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { 470void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) {
471 constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ 471 static constexpr std::array<VkImageSubresourceRange, 1> subresources{{{
472 .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, 472 .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
473 .baseMipLevel = 0, 473 .baseMipLevel = 0,
474 .levelCount = 1, 474 .levelCount = 1,
@@ -528,8 +528,8 @@ SMAA::SMAA(const Device& device, MemoryAllocator& allocator, size_t image_count,
528} 528}
529 529
530void SMAA::CreateImages() { 530void SMAA::CreateImages() {
531 constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; 531 static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT};
532 constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; 532 static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT};
533 533
534 std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = 534 std::tie(m_static_images[Area], m_static_buffer_commits[Area]) =
535 CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); 535 CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM);
@@ -586,12 +586,12 @@ void SMAA::CreateSampler() {
586 586
587void SMAA::CreateShaders() { 587void SMAA::CreateShaders() {
588 // These match the order of the SMAAStage enum 588 // These match the order of the SMAAStage enum
589 constexpr std::array vert_shader_sources{ 589 static constexpr std::array vert_shader_sources{
590 ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), 590 ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV),
591 ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), 591 ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV),
592 ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), 592 ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV),
593 }; 593 };
594 constexpr std::array frag_shader_sources{ 594 static constexpr std::array frag_shader_sources{
595 ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), 595 ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV),
596 ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), 596 ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV),
597 ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), 597 ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV),
@@ -675,8 +675,8 @@ void SMAA::UploadImages(Scheduler& scheduler) {
675 return; 675 return;
676 } 676 }
677 677
678 constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; 678 static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT};
679 constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; 679 static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT};
680 680
681 UploadImage(m_device, m_allocator, scheduler, m_static_images[Area], area_extent, 681 UploadImage(m_device, m_allocator, scheduler, m_static_images[Area], area_extent,
682 VK_FORMAT_R8G8_UNORM, ARRAY_TO_SPAN(areaTexBytes)); 682 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:
113 std::optional<ASTCDecoderPass> astc_decoder_pass; 113 std::optional<ASTCDecoderPass> astc_decoder_pass;
114 const Settings::ResolutionScalingInfo& resolution; 114 const Settings::ResolutionScalingInfo& resolution;
115 115
116 constexpr static size_t indexing_slots = 8 * sizeof(size_t); 116 static constexpr size_t indexing_slots = 8 * sizeof(size_t);
117 std::array<vk::Buffer, indexing_slots> buffers{}; 117 std::array<vk::Buffer, indexing_slots> buffers{};
118 std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{}; 118 std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{};
119}; 119};
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) {
48 auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal); 48 auto commit = m_allocator.Commit(buffer, MemoryUsage::DeviceLocal);
49 49
50 // Create the descriptor pool to contain our descriptor. 50 // Create the descriptor pool to contain our descriptor.
51 constexpr VkDescriptorPoolSize pool_size{ 51 static constexpr VkDescriptorPoolSize pool_size{
52 .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 52 .type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
53 .descriptorCount = 1, 53 .descriptorCount = 1,
54 }; 54 };
@@ -63,7 +63,7 @@ void TurboMode::Run(std::stop_token stop_token) {
63 }); 63 });
64 64
65 // Create the descriptor set layout from the pool. 65 // Create the descriptor set layout from the pool.
66 constexpr VkDescriptorSetLayoutBinding layout_binding{ 66 static constexpr VkDescriptorSetLayoutBinding layout_binding{
67 .binding = 0, 67 .binding = 0,
68 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 68 .descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER,
69 .descriptorCount = 1, 69 .descriptorCount = 1,