diff options
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/engines/maxwell_3d.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/memory_manager.h | 2 | ||||
| -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 | ||||
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp index ae9da6290..7195f2bc1 100644 --- a/src/video_core/engines/maxwell_3d.cpp +++ b/src/video_core/engines/maxwell_3d.cpp | |||
| @@ -258,7 +258,7 @@ u32 Maxwell3D::GetMaxCurrentVertices() { | |||
| 258 | size_t Maxwell3D::EstimateIndexBufferSize() { | 258 | size_t Maxwell3D::EstimateIndexBufferSize() { |
| 259 | GPUVAddr start_address = regs.index_buffer.StartAddress(); | 259 | GPUVAddr start_address = regs.index_buffer.StartAddress(); |
| 260 | GPUVAddr end_address = regs.index_buffer.EndAddress(); | 260 | GPUVAddr end_address = regs.index_buffer.EndAddress(); |
| 261 | constexpr std::array<size_t, 4> max_sizes = { | 261 | static constexpr std::array<size_t, 4> max_sizes = { |
| 262 | std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(), | 262 | std::numeric_limits<u8>::max(), std::numeric_limits<u16>::max(), |
| 263 | std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; | 263 | std::numeric_limits<u32>::max(), std::numeric_limits<u32>::max()}; |
| 264 | const size_t byte_size = regs.index_buffer.FormatSizeInBytes(); | 264 | const size_t byte_size = regs.index_buffer.FormatSizeInBytes(); |
diff --git a/src/video_core/memory_manager.h b/src/video_core/memory_manager.h index 9ebfb6179..cf56392ef 100644 --- a/src/video_core/memory_manager.h +++ b/src/video_core/memory_manager.h | |||
| @@ -216,7 +216,7 @@ private: | |||
| 216 | std::vector<u64> big_page_continous; | 216 | std::vector<u64> big_page_continous; |
| 217 | std::vector<std::pair<VAddr, std::size_t>> page_stash{}; | 217 | std::vector<std::pair<VAddr, std::size_t>> page_stash{}; |
| 218 | 218 | ||
| 219 | constexpr static size_t continous_bits = 64; | 219 | static constexpr size_t continous_bits = 64; |
| 220 | 220 | ||
| 221 | const size_t unique_identifier; | 221 | const size_t unique_identifier; |
| 222 | std::unique_ptr<VideoCommon::InvalidationAccumulator> accumulator; | 222 | std::unique_ptr<VideoCommon::InvalidationAccumulator> accumulator; |
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 | ||
| 470 | void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { | 470 | void 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 | ||
| 530 | void SMAA::CreateImages() { | 530 | void 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 | ||
| 587 | void SMAA::CreateShaders() { | 587 | void 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, |
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 59120cd09..95bcdd37b 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp | |||
| @@ -29,7 +29,7 @@ constexpr u32 pdep(u32 value) { | |||
| 29 | 29 | ||
| 30 | template <u32 mask, u32 incr_amount> | 30 | template <u32 mask, u32 incr_amount> |
| 31 | void incrpdep(u32& value) { | 31 | void incrpdep(u32& value) { |
| 32 | constexpr u32 swizzled_incr = pdep<mask>(incr_amount); | 32 | static constexpr u32 swizzled_incr = pdep<mask>(incr_amount); |
| 33 | value = ((value | ~mask) + swizzled_incr) & mask; | 33 | value = ((value | ~mask) + swizzled_incr) & mask; |
| 34 | } | 34 | } |
| 35 | 35 | ||