diff options
| author | 2023-02-14 11:13:47 -0500 | |
|---|---|---|
| committer | 2023-02-14 12:35:39 -0500 | |
| commit | 683019878fc939b418a65e1c5d84b066596d7655 (patch) | |
| tree | 6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/video_core/renderer_vulkan | |
| parent | apply clang-format (diff) | |
| download | yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.gz yuzu-683019878fc939b418a65e1c5d84b066596d7655.tar.xz yuzu-683019878fc939b418a65e1c5d84b066596d7655.zip | |
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
Diffstat (limited to 'src/video_core/renderer_vulkan')
10 files changed, 32 insertions, 36 deletions
diff --git a/src/video_core/renderer_vulkan/blit_image.cpp b/src/video_core/renderer_vulkan/blit_image.cpp index 334087119..cf2964a3f 100644 --- a/src/video_core/renderer_vulkan/blit_image.cpp +++ b/src/video_core/renderer_vulkan/blit_image.cpp | |||
| @@ -358,9 +358,8 @@ VkExtent2D GetConversionExtent(const ImageView& src_image_view) { | |||
| 358 | 358 | ||
| 359 | void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, | 359 | void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, |
| 360 | VkImageLayout source_layout = VK_IMAGE_LAYOUT_GENERAL) { | 360 | VkImageLayout source_layout = VK_IMAGE_LAYOUT_GENERAL) { |
| 361 | constexpr static VkFlags flags{VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | | 361 | constexpr VkFlags flags{VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | |
| 362 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | | 362 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT}; |
| 363 | VK_ACCESS_SHADER_READ_BIT}; | ||
| 364 | const VkImageMemoryBarrier barrier{ | 363 | const VkImageMemoryBarrier barrier{ |
| 365 | .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, | 364 | .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, |
| 366 | .pNext = nullptr, | 365 | .pNext = nullptr, |
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 34a86a407..2f0cc27e8 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp | |||
| @@ -175,7 +175,7 @@ VkSemaphore BlitScreen::Draw(const Tegra::FramebufferConfig& framebuffer, | |||
| 175 | const u8* const host_ptr = cpu_memory.GetPointer(framebuffer_addr); | 175 | const u8* const host_ptr = cpu_memory.GetPointer(framebuffer_addr); |
| 176 | 176 | ||
| 177 | // TODO(Rodrigo): Read this from HLE | 177 | // TODO(Rodrigo): Read this from HLE |
| 178 | constexpr static u32 block_height_log2 = 4; | 178 | constexpr u32 block_height_log2 = 4; |
| 179 | const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer); | 179 | const u32 bytes_per_pixel = GetBytesPerPixel(framebuffer); |
| 180 | const u64 linear_size{GetSizeInBytes(framebuffer)}; | 180 | const u64 linear_size{GetSizeInBytes(framebuffer)}; |
| 181 | const u64 tiled_size{Tegra::Texture::CalculateSize(true, bytes_per_pixel, | 181 | const u64 tiled_size{Tegra::Texture::CalculateSize(true, bytes_per_pixel, |
| @@ -1482,7 +1482,7 @@ u64 BlitScreen::CalculateBufferSize(const Tegra::FramebufferConfig& framebuffer) | |||
| 1482 | 1482 | ||
| 1483 | u64 BlitScreen::GetRawImageOffset(const Tegra::FramebufferConfig& framebuffer, | 1483 | u64 BlitScreen::GetRawImageOffset(const Tegra::FramebufferConfig& framebuffer, |
| 1484 | std::size_t image_index) const { | 1484 | std::size_t image_index) const { |
| 1485 | constexpr static auto first_image_offset = static_cast<u64>(sizeof(BufferData)); | 1485 | constexpr auto first_image_offset = static_cast<u64>(sizeof(BufferData)); |
| 1486 | return first_image_offset + GetSizeInBytes(framebuffer) * image_index; | 1486 | return first_image_offset + GetSizeInBytes(framebuffer) * image_index; |
| 1487 | } | 1487 | } |
| 1488 | 1488 | ||
diff --git a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp index 326260b41..2a0f0dbf0 100644 --- a/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_compute_pipeline.cpp | |||
| @@ -172,8 +172,7 @@ void ComputePipeline::Configure(Tegra::Engines::KeplerCompute& kepler_compute, | |||
| 172 | buffer_cache.UnbindComputeTextureBuffers(); | 172 | buffer_cache.UnbindComputeTextureBuffers(); |
| 173 | size_t index{}; | 173 | size_t index{}; |
| 174 | const auto add_buffer{[&](const auto& desc) { | 174 | const auto add_buffer{[&](const auto& desc) { |
| 175 | constexpr static bool is_image = | 175 | constexpr bool is_image = std::is_same_v<decltype(desc), const ImageBufferDescriptor&>; |
| 176 | std::is_same_v<decltype(desc), const ImageBufferDescriptor&>; | ||
| 177 | for (u32 i = 0; i < desc.count; ++i) { | 176 | for (u32 i = 0; i < desc.count; ++i) { |
| 178 | bool is_written{false}; | 177 | bool is_written{false}; |
| 179 | if constexpr (is_image) { | 178 | if constexpr (is_image) { |
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index bdab00597..baedc4424 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | |||
| @@ -398,8 +398,7 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) { | |||
| 398 | const auto bind_stage_info{[&](size_t stage) LAMBDA_FORCEINLINE { | 398 | const auto bind_stage_info{[&](size_t stage) LAMBDA_FORCEINLINE { |
| 399 | size_t index{}; | 399 | size_t index{}; |
| 400 | const auto add_buffer{[&](const auto& desc) { | 400 | const auto add_buffer{[&](const auto& desc) { |
| 401 | constexpr static bool is_image = | 401 | constexpr bool is_image = std::is_same_v<decltype(desc), const ImageBufferDescriptor&>; |
| 402 | std::is_same_v<decltype(desc), const ImageBufferDescriptor&>; | ||
| 403 | for (u32 i = 0; i < desc.count; ++i) { | 402 | for (u32 i = 0; i < desc.count; ++i) { |
| 404 | bool is_written{false}; | 403 | bool is_written{false}; |
| 405 | if constexpr (is_image) { | 404 | if constexpr (is_image) { |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 3d50f8edb..719edbcfb 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -1109,9 +1109,9 @@ void RasterizerVulkan::UpdateDepthBiasEnable(Tegra::Engines::Maxwell3D::Regs& re | |||
| 1109 | if (!state_tracker.TouchDepthBiasEnable()) { | 1109 | if (!state_tracker.TouchDepthBiasEnable()) { |
| 1110 | return; | 1110 | return; |
| 1111 | } | 1111 | } |
| 1112 | constexpr static size_t POINT = 0; | 1112 | constexpr size_t POINT = 0; |
| 1113 | constexpr static size_t LINE = 1; | 1113 | constexpr size_t LINE = 1; |
| 1114 | constexpr static size_t POLYGON = 2; | 1114 | constexpr size_t POLYGON = 2; |
| 1115 | static constexpr std::array POLYGON_OFFSET_ENABLE_LUT = { | 1115 | static constexpr std::array POLYGON_OFFSET_ENABLE_LUT = { |
| 1116 | POINT, // Points | 1116 | POINT, // Points |
| 1117 | LINE, // Lines | 1117 | LINE, // Lines |
diff --git a/src/video_core/renderer_vulkan/vk_smaa.cpp b/src/video_core/renderer_vulkan/vk_smaa.cpp index 1cd354003..f8735189d 100644 --- a/src/video_core/renderer_vulkan/vk_smaa.cpp +++ b/src/video_core/renderer_vulkan/vk_smaa.cpp | |||
| @@ -55,9 +55,8 @@ std::pair<vk::Image, MemoryCommit> CreateWrappedImage(const Device& device, | |||
| 55 | 55 | ||
| 56 | void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, | 56 | void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, |
| 57 | VkImageLayout source_layout = VK_IMAGE_LAYOUT_GENERAL) { | 57 | VkImageLayout source_layout = VK_IMAGE_LAYOUT_GENERAL) { |
| 58 | constexpr static VkFlags flags{VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | | 58 | constexpr VkFlags flags{VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | |
| 59 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | | 59 | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_SHADER_READ_BIT}; |
| 60 | VK_ACCESS_SHADER_READ_BIT}; | ||
| 61 | const VkImageMemoryBarrier barrier{ | 60 | const VkImageMemoryBarrier barrier{ |
| 62 | .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, | 61 | .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, |
| 63 | .pNext = nullptr, | 62 | .pNext = nullptr, |
| @@ -153,7 +152,7 @@ vk::RenderPass CreateWrappedRenderPass(const Device& device, VkFormat format) { | |||
| 153 | .finalLayout = VK_IMAGE_LAYOUT_GENERAL, | 152 | .finalLayout = VK_IMAGE_LAYOUT_GENERAL, |
| 154 | }; | 153 | }; |
| 155 | 154 | ||
| 156 | constexpr static VkAttachmentReference color_attachment_ref{ | 155 | constexpr VkAttachmentReference color_attachment_ref{ |
| 157 | .attachment = 0, | 156 | .attachment = 0, |
| 158 | .layout = VK_IMAGE_LAYOUT_GENERAL, | 157 | .layout = VK_IMAGE_LAYOUT_GENERAL, |
| 159 | }; | 158 | }; |
| @@ -171,7 +170,7 @@ vk::RenderPass CreateWrappedRenderPass(const Device& device, VkFormat format) { | |||
| 171 | .pPreserveAttachments = nullptr, | 170 | .pPreserveAttachments = nullptr, |
| 172 | }; | 171 | }; |
| 173 | 172 | ||
| 174 | constexpr static VkSubpassDependency dependency{ | 173 | constexpr VkSubpassDependency dependency{ |
| 175 | .srcSubpass = VK_SUBPASS_EXTERNAL, | 174 | .srcSubpass = VK_SUBPASS_EXTERNAL, |
| 176 | .dstSubpass = 0, | 175 | .dstSubpass = 0, |
| 177 | .srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, | 176 | .srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, |
| @@ -329,7 +328,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 329 | }, | 328 | }, |
| 330 | }}; | 329 | }}; |
| 331 | 330 | ||
| 332 | constexpr static VkPipelineVertexInputStateCreateInfo vertex_input_ci{ | 331 | constexpr VkPipelineVertexInputStateCreateInfo vertex_input_ci{ |
| 333 | .sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, | 332 | .sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, |
| 334 | .pNext = nullptr, | 333 | .pNext = nullptr, |
| 335 | .flags = 0, | 334 | .flags = 0, |
| @@ -339,7 +338,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 339 | .pVertexAttributeDescriptions = nullptr, | 338 | .pVertexAttributeDescriptions = nullptr, |
| 340 | }; | 339 | }; |
| 341 | 340 | ||
| 342 | constexpr static VkPipelineInputAssemblyStateCreateInfo input_assembly_ci{ | 341 | constexpr VkPipelineInputAssemblyStateCreateInfo input_assembly_ci{ |
| 343 | .sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, | 342 | .sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, |
| 344 | .pNext = nullptr, | 343 | .pNext = nullptr, |
| 345 | .flags = 0, | 344 | .flags = 0, |
| @@ -347,7 +346,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 347 | .primitiveRestartEnable = VK_FALSE, | 346 | .primitiveRestartEnable = VK_FALSE, |
| 348 | }; | 347 | }; |
| 349 | 348 | ||
| 350 | constexpr static VkPipelineViewportStateCreateInfo viewport_state_ci{ | 349 | constexpr VkPipelineViewportStateCreateInfo viewport_state_ci{ |
| 351 | .sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, | 350 | .sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, |
| 352 | .pNext = nullptr, | 351 | .pNext = nullptr, |
| 353 | .flags = 0, | 352 | .flags = 0, |
| @@ -357,7 +356,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 357 | .pScissors = nullptr, | 356 | .pScissors = nullptr, |
| 358 | }; | 357 | }; |
| 359 | 358 | ||
| 360 | constexpr static VkPipelineRasterizationStateCreateInfo rasterization_ci{ | 359 | constexpr VkPipelineRasterizationStateCreateInfo rasterization_ci{ |
| 361 | .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, | 360 | .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, |
| 362 | .pNext = nullptr, | 361 | .pNext = nullptr, |
| 363 | .flags = 0, | 362 | .flags = 0, |
| @@ -373,7 +372,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 373 | .lineWidth = 1.0f, | 372 | .lineWidth = 1.0f, |
| 374 | }; | 373 | }; |
| 375 | 374 | ||
| 376 | constexpr static VkPipelineMultisampleStateCreateInfo multisampling_ci{ | 375 | constexpr VkPipelineMultisampleStateCreateInfo multisampling_ci{ |
| 377 | .sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, | 376 | .sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, |
| 378 | .pNext = nullptr, | 377 | .pNext = nullptr, |
| 379 | .flags = 0, | 378 | .flags = 0, |
| @@ -385,7 +384,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 385 | .alphaToOneEnable = VK_FALSE, | 384 | .alphaToOneEnable = VK_FALSE, |
| 386 | }; | 385 | }; |
| 387 | 386 | ||
| 388 | constexpr static VkPipelineColorBlendAttachmentState color_blend_attachment{ | 387 | constexpr VkPipelineColorBlendAttachmentState color_blend_attachment{ |
| 389 | .blendEnable = VK_FALSE, | 388 | .blendEnable = VK_FALSE, |
| 390 | .srcColorBlendFactor = VK_BLEND_FACTOR_ZERO, | 389 | .srcColorBlendFactor = VK_BLEND_FACTOR_ZERO, |
| 391 | .dstColorBlendFactor = VK_BLEND_FACTOR_ZERO, | 390 | .dstColorBlendFactor = VK_BLEND_FACTOR_ZERO, |
| @@ -408,7 +407,7 @@ vk::Pipeline CreateWrappedPipeline(const Device& device, vk::RenderPass& renderp | |||
| 408 | .blendConstants = {0.0f, 0.0f, 0.0f, 0.0f}, | 407 | .blendConstants = {0.0f, 0.0f, 0.0f, 0.0f}, |
| 409 | }; | 408 | }; |
| 410 | 409 | ||
| 411 | constexpr static std::array dynamic_states{ | 410 | constexpr std::array dynamic_states{ |
| 412 | VK_DYNAMIC_STATE_VIEWPORT, | 411 | VK_DYNAMIC_STATE_VIEWPORT, |
| 413 | VK_DYNAMIC_STATE_SCISSOR, | 412 | VK_DYNAMIC_STATE_SCISSOR, |
| 414 | }; | 413 | }; |
| @@ -469,7 +468,7 @@ VkWriteDescriptorSet CreateWriteDescriptorSet(std::vector<VkDescriptorImageInfo> | |||
| 469 | } | 468 | } |
| 470 | 469 | ||
| 471 | void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { | 470 | void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { |
| 472 | constexpr static std::array<VkImageSubresourceRange, 1> subresources{{{ | 471 | static constexpr std::array<VkImageSubresourceRange, 1> subresources{{{ |
| 473 | .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, | 472 | .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, |
| 474 | .baseMipLevel = 0, | 473 | .baseMipLevel = 0, |
| 475 | .levelCount = 1, | 474 | .levelCount = 1, |
| @@ -529,8 +528,8 @@ SMAA::SMAA(const Device& device, MemoryAllocator& allocator, size_t image_count, | |||
| 529 | } | 528 | } |
| 530 | 529 | ||
| 531 | void SMAA::CreateImages() { | 530 | void SMAA::CreateImages() { |
| 532 | constexpr static VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; | 531 | static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; |
| 533 | constexpr static VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; | 532 | static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; |
| 534 | 533 | ||
| 535 | std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = | 534 | std::tie(m_static_images[Area], m_static_buffer_commits[Area]) = |
| 536 | CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); | 535 | CreateWrappedImage(m_device, m_allocator, area_extent, VK_FORMAT_R8G8_UNORM); |
| @@ -587,12 +586,12 @@ void SMAA::CreateSampler() { | |||
| 587 | 586 | ||
| 588 | void SMAA::CreateShaders() { | 587 | void SMAA::CreateShaders() { |
| 589 | // These match the order of the SMAAStage enum | 588 | // These match the order of the SMAAStage enum |
| 590 | constexpr static std::array vert_shader_sources{ | 589 | static constexpr std::array vert_shader_sources{ |
| 591 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), | 590 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_VERT_SPV), |
| 592 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), | 591 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_VERT_SPV), |
| 593 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), | 592 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_VERT_SPV), |
| 594 | }; | 593 | }; |
| 595 | constexpr static std::array frag_shader_sources{ | 594 | static constexpr std::array frag_shader_sources{ |
| 596 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), | 595 | ARRAY_TO_SPAN(SMAA_EDGE_DETECTION_FRAG_SPV), |
| 597 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), | 596 | ARRAY_TO_SPAN(SMAA_BLENDING_WEIGHT_CALCULATION_FRAG_SPV), |
| 598 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), | 597 | ARRAY_TO_SPAN(SMAA_NEIGHBORHOOD_BLENDING_FRAG_SPV), |
| @@ -676,8 +675,8 @@ void SMAA::UploadImages(Scheduler& scheduler) { | |||
| 676 | return; | 675 | return; |
| 677 | } | 676 | } |
| 678 | 677 | ||
| 679 | constexpr static VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; | 678 | static constexpr VkExtent2D area_extent{AREATEX_WIDTH, AREATEX_HEIGHT}; |
| 680 | constexpr static VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; | 679 | static constexpr VkExtent2D search_extent{SEARCHTEX_WIDTH, SEARCHTEX_HEIGHT}; |
| 681 | 680 | ||
| 682 | 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, |
| 683 | 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_staging_buffer_pool.cpp b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp index 172b6ed95..74ca77216 100644 --- a/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp +++ b/src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp | |||
| @@ -299,7 +299,7 @@ void StagingBufferPool::ReleaseCache(MemoryUsage usage) { | |||
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | void StagingBufferPool::ReleaseLevel(StagingBuffersCache& cache, size_t log2) { | 301 | void StagingBufferPool::ReleaseLevel(StagingBuffersCache& cache, size_t log2) { |
| 302 | constexpr static size_t deletions_per_tick = 16; | 302 | constexpr size_t deletions_per_tick = 16; |
| 303 | auto& staging = cache[log2]; | 303 | auto& staging = cache[log2]; |
| 304 | auto& entries = staging.entries; | 304 | auto& entries = staging.entries; |
| 305 | const size_t old_size = entries.size(); | 305 | const size_t old_size = entries.size(); |
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index 0b24a98eb..b6810eef9 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp | |||
| @@ -53,7 +53,7 @@ VkPresentModeKHR ChooseSwapPresentMode(vk::Span<VkPresentModeKHR> modes) { | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | VkExtent2D ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, u32 width, u32 height) { | 55 | VkExtent2D ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, u32 width, u32 height) { |
| 56 | constexpr static auto undefined_size{std::numeric_limits<u32>::max()}; | 56 | constexpr auto undefined_size{std::numeric_limits<u32>::max()}; |
| 57 | if (capabilities.currentExtent.width != undefined_size) { | 57 | if (capabilities.currentExtent.width != undefined_size) { |
| 58 | return capabilities.currentExtent; | 58 | return capabilities.currentExtent; |
| 59 | } | 59 | } |
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 38c7e533d..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 static 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 static 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, |