summaryrefslogtreecommitdiff
path: root/src/video_core
diff options
context:
space:
mode:
authorGravatar arades792023-02-14 11:13:47 -0500
committerGravatar arades792023-02-14 12:35:39 -0500
commit683019878fc939b418a65e1c5d84b066596d7655 (patch)
tree6b2a2e8ea34cb00a3fccf3613a52475550997035 /src/video_core
parentapply clang-format (diff)
downloadyuzu-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')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h8
-rw-r--r--src/video_core/dma_pusher.cpp2
-rw-r--r--src/video_core/engines/fermi_2d.cpp2
-rw-r--r--src/video_core/engines/maxwell_3d.cpp2
-rw-r--r--src/video_core/engines/sw_blitter/converter.cpp10
-rw-r--r--src/video_core/gpu.cpp4
-rw-r--r--src/video_core/host1x/codecs/vp9.cpp4
-rw-r--r--src/video_core/memory_manager.h2
-rw-r--r--src/video_core/query_cache.h2
-rw-r--r--src/video_core/renderer_opengl/gl_compute_pipeline.cpp3
-rw-r--r--src/video_core/renderer_opengl/gl_device.cpp4
-rw-r--r--src/video_core/renderer_opengl/gl_graphics_pipeline.cpp3
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp4
-rw-r--r--src/video_core/renderer_vulkan/blit_image.cpp5
-rw-r--r--src/video_core/renderer_vulkan/vk_blit_screen.cpp4
-rw-r--r--src/video_core/renderer_vulkan/vk_compute_pipeline.cpp3
-rw-r--r--src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp3
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp6
-rw-r--r--src/video_core/renderer_vulkan/vk_smaa.cpp37
-rw-r--r--src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_swapchain.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.h2
-rw-r--r--src/video_core/renderer_vulkan/vk_turbo_mode.cpp4
-rw-r--r--src/video_core/surface.cpp2
-rw-r--r--src/video_core/textures/decoders.cpp2
-rw-r--r--src/video_core/vulkan_common/vulkan_wrapper.cpp4
26 files changed, 60 insertions, 66 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index b650d0e59..627917ab6 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -890,8 +890,8 @@ void BufferCache<P>::CommitAsyncFlushesHigh() {
890 buffer_id, 890 buffer_id,
891 }); 891 });
892 // Align up to avoid cache conflicts 892 // Align up to avoid cache conflicts
893 constexpr static u64 align = 8ULL; 893 constexpr u64 align = 8ULL;
894 constexpr static u64 mask = ~(align - 1ULL); 894 constexpr u64 mask = ~(align - 1ULL);
895 total_size_bytes += (new_size + align - 1) & mask; 895 total_size_bytes += (new_size + align - 1) & mask;
896 largest_copy = std::max(largest_copy, new_size); 896 largest_copy = std::max(largest_copy, new_size);
897 }; 897 };
@@ -1843,8 +1843,8 @@ void BufferCache<P>::DownloadBufferMemory(Buffer& buffer, VAddr cpu_addr, u64 si
1843 .size = new_size, 1843 .size = new_size,
1844 }); 1844 });
1845 // Align up to avoid cache conflicts 1845 // Align up to avoid cache conflicts
1846 constexpr static u64 align = 256ULL; 1846 constexpr u64 align = 256ULL;
1847 constexpr static u64 mask = ~(align - 1ULL); 1847 constexpr u64 mask = ~(align - 1ULL);
1848 total_size_bytes += (new_size + align - 1) & mask; 1848 total_size_bytes += (new_size + align - 1) & mask;
1849 largest_copy = std::max(largest_copy, new_size); 1849 largest_copy = std::max(largest_copy, new_size);
1850 }; 1850 };
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp
index 72ad3ccc8..551929824 100644
--- a/src/video_core/dma_pusher.cpp
+++ b/src/video_core/dma_pusher.cpp
@@ -75,7 +75,7 @@ bool DmaPusher::Step() {
75 75
76 // Push buffer non-empty, read a word 76 // Push buffer non-empty, read a word
77 command_headers.resize_destructive(command_list_header.size); 77 command_headers.resize_destructive(command_list_header.size);
78 constexpr static u32 MacroRegistersStart = 0xE00; 78 constexpr u32 MacroRegistersStart = 0xE00;
79 if (dma_state.method < MacroRegistersStart) { 79 if (dma_state.method < MacroRegistersStart) {
80 if (Settings::IsGPULevelHigh()) { 80 if (Settings::IsGPULevelHigh()) {
81 memory_manager.ReadBlock(dma_state.dma_get, command_headers.data(), 81 memory_manager.ReadBlock(dma_state.dma_get, command_headers.data(),
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp
index 40176821b..a126c359c 100644
--- a/src/video_core/engines/fermi_2d.cpp
+++ b/src/video_core/engines/fermi_2d.cpp
@@ -72,7 +72,7 @@ void Fermi2D::Blit() {
72 UNIMPLEMENTED_IF_MSG(regs.clip_enable != 0, "Clipped blit enabled"); 72 UNIMPLEMENTED_IF_MSG(regs.clip_enable != 0, "Clipped blit enabled");
73 73
74 const auto& args = regs.pixels_from_memory; 74 const auto& args = regs.pixels_from_memory;
75 constexpr static s64 null_derivate = 1ULL << 32; 75 constexpr s64 null_derivate = 1ULL << 32;
76 Surface src = regs.src; 76 Surface src = regs.src;
77 const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format)); 77 const auto bytes_per_pixel = BytesPerBlock(PixelFormatFromRenderTargetFormat(src.format));
78 const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 && 78 const bool delegate_to_gpu = src.width > 512 && src.height > 512 && bytes_per_pixel <= 8 &&
diff --git a/src/video_core/engines/maxwell_3d.cpp b/src/video_core/engines/maxwell_3d.cpp
index 3c1af92c4..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() {
258size_t Maxwell3D::EstimateIndexBufferSize() { 258size_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 static 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/engines/sw_blitter/converter.cpp b/src/video_core/engines/sw_blitter/converter.cpp
index 11674c748..2419b5632 100644
--- a/src/video_core/engines/sw_blitter/converter.cpp
+++ b/src/video_core/engines/sw_blitter/converter.cpp
@@ -694,16 +694,16 @@ private:
694 }; 694 };
695 const auto force_to_fp16 = [](f32 base_value) { 695 const auto force_to_fp16 = [](f32 base_value) {
696 u32 tmp = Common::BitCast<u32>(base_value); 696 u32 tmp = Common::BitCast<u32>(base_value);
697 constexpr static size_t fp32_mantissa_bits = 23; 697 constexpr size_t fp32_mantissa_bits = 23;
698 constexpr static size_t fp16_mantissa_bits = 10; 698 constexpr size_t fp16_mantissa_bits = 10;
699 constexpr static size_t mantissa_mask = 699 constexpr size_t mantissa_mask =
700 ~((1ULL << (fp32_mantissa_bits - fp16_mantissa_bits)) - 1ULL); 700 ~((1ULL << (fp32_mantissa_bits - fp16_mantissa_bits)) - 1ULL);
701 tmp = tmp & static_cast<u32>(mantissa_mask); 701 tmp = tmp & static_cast<u32>(mantissa_mask);
702 // TODO: force the exponent within the range of half float. Not needed in UNORM / SNORM 702 // TODO: force the exponent within the range of half float. Not needed in UNORM / SNORM
703 return Common::BitCast<f32>(tmp); 703 return Common::BitCast<f32>(tmp);
704 }; 704 };
705 const auto from_fp_n = [&sign_extend](u32 base_value, size_t bits, size_t mantissa) { 705 const auto from_fp_n = [&sign_extend](u32 base_value, size_t bits, size_t mantissa) {
706 constexpr static size_t fp32_mantissa_bits = 23; 706 constexpr size_t fp32_mantissa_bits = 23;
707 size_t shift_towards = fp32_mantissa_bits - mantissa; 707 size_t shift_towards = fp32_mantissa_bits - mantissa;
708 const u32 new_value = 708 const u32 new_value =
709 static_cast<u32>(sign_extend(base_value, bits) << shift_towards) & (~(1U << 31)); 709 static_cast<u32>(sign_extend(base_value, bits) << shift_towards) & (~(1U << 31));
@@ -770,7 +770,7 @@ private:
770 component_mask[which_component]; 770 component_mask[which_component];
771 }; 771 };
772 const auto to_fp_n = [](f32 base_value, size_t bits, size_t mantissa) { 772 const auto to_fp_n = [](f32 base_value, size_t bits, size_t mantissa) {
773 constexpr static size_t fp32_mantissa_bits = 23; 773 constexpr size_t fp32_mantissa_bits = 23;
774 u32 tmp_value = Common::BitCast<u32>(std::max(base_value, 0.0f)); 774 u32 tmp_value = Common::BitCast<u32>(std::max(base_value, 0.0f));
775 size_t shift_towards = fp32_mantissa_bits - mantissa; 775 size_t shift_towards = fp32_mantissa_bits - mantissa;
776 return tmp_value >> shift_towards; 776 return tmp_value >> shift_towards;
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index caf241eac..7024a19cf 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -194,8 +194,8 @@ struct GPU::Impl {
194 [[nodiscard]] u64 GetTicks() const { 194 [[nodiscard]] u64 GetTicks() const {
195 // This values were reversed engineered by fincs from NVN 195 // This values were reversed engineered by fincs from NVN
196 // The gpu clock is reported in units of 385/625 nanoseconds 196 // The gpu clock is reported in units of 385/625 nanoseconds
197 constexpr static u64 gpu_ticks_num = 384; 197 constexpr u64 gpu_ticks_num = 384;
198 constexpr static u64 gpu_ticks_den = 625; 198 constexpr u64 gpu_ticks_den = 625;
199 199
200 u64 nanoseconds = system.CoreTiming().GetGlobalTimeNs().count(); 200 u64 nanoseconds = system.CoreTiming().GetGlobalTimeNs().count();
201 if (Settings::values.use_fast_gpu_time.GetValue()) { 201 if (Settings::values.use_fast_gpu_time.GetValue()) {
diff --git a/src/video_core/host1x/codecs/vp9.cpp b/src/video_core/host1x/codecs/vp9.cpp
index bb691f7d8..cf40c9012 100644
--- a/src/video_core/host1x/codecs/vp9.cpp
+++ b/src/video_core/host1x/codecs/vp9.cpp
@@ -283,7 +283,7 @@ void VP9::EncodeTermSubExp(VpxRangeEncoder& writer, s32 value) {
283 } else { 283 } else {
284 value -= 64; 284 value -= 64;
285 285
286 constexpr static s32 size = 8; 286 constexpr s32 size = 8;
287 287
288 const s32 mask = (1 << size) - 191; 288 const s32 mask = (1 << size) - 191;
289 289
@@ -307,7 +307,7 @@ bool VP9::WriteLessThan(VpxRangeEncoder& writer, s32 value, s32 test) {
307void VP9::WriteCoefProbabilityUpdate(VpxRangeEncoder& writer, s32 tx_mode, 307void VP9::WriteCoefProbabilityUpdate(VpxRangeEncoder& writer, s32 tx_mode,
308 const std::array<u8, 1728>& new_prob, 308 const std::array<u8, 1728>& new_prob,
309 const std::array<u8, 1728>& old_prob) { 309 const std::array<u8, 1728>& old_prob) {
310 constexpr static u32 block_bytes = 2 * 2 * 6 * 6 * 3; 310 constexpr u32 block_bytes = 2 * 2 * 6 * 6 * 3;
311 311
312 const auto needs_update = [&](u32 base_index) { 312 const auto needs_update = [&](u32 base_index) {
313 return !std::equal(new_prob.begin() + base_index, 313 return !std::equal(new_prob.begin() + base_index,
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/query_cache.h b/src/video_core/query_cache.h
index c9b482bbe..00ce53e3e 100644
--- a/src/video_core/query_cache.h
+++ b/src/video_core/query_cache.h
@@ -281,7 +281,7 @@ public:
281 explicit HostCounterBase(std::shared_ptr<HostCounter> dependency_) 281 explicit HostCounterBase(std::shared_ptr<HostCounter> dependency_)
282 : dependency{std::move(dependency_)}, depth{dependency ? (dependency->Depth() + 1) : 0} { 282 : dependency{std::move(dependency_)}, depth{dependency ? (dependency->Depth() + 1) : 0} {
283 // Avoid nesting too many dependencies to avoid a stack overflow when these are deleted. 283 // Avoid nesting too many dependencies to avoid a stack overflow when these are deleted.
284 constexpr static u64 depth_threshold = 96; 284 constexpr u64 depth_threshold = 96;
285 if (depth > depth_threshold) { 285 if (depth > depth_threshold) {
286 depth = 0; 286 depth = 0;
287 base_result = dependency->Query(); 287 base_result = dependency->Query();
diff --git a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
index e49b04975..1a0cea9b7 100644
--- a/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_compute_pipeline.cpp
@@ -162,8 +162,7 @@ void ComputePipeline::Configure() {
162 buffer_cache.UnbindComputeTextureBuffers(); 162 buffer_cache.UnbindComputeTextureBuffers();
163 size_t texbuf_index{}; 163 size_t texbuf_index{};
164 const auto add_buffer{[&](const auto& desc) { 164 const auto add_buffer{[&](const auto& desc) {
165 constexpr static bool is_image = 165 constexpr bool is_image = std::is_same_v<decltype(desc), const ImageBufferDescriptor&>;
166 std::is_same_v<decltype(desc), const ImageBufferDescriptor&>;
167 for (u32 i = 0; i < desc.count; ++i) { 166 for (u32 i = 0; i < desc.count; ++i) {
168 bool is_written{false}; 167 bool is_written{false};
169 if constexpr (is_image) { 168 if constexpr (is_image) {
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp
index a5e27de73..22ed16ebf 100644
--- a/src/video_core/renderer_opengl/gl_device.cpp
+++ b/src/video_core/renderer_opengl/gl_device.cpp
@@ -126,9 +126,9 @@ Device::Device(Core::Frontend::EmuWindow& emu_window) {
126 const bool is_intel = vendor_name == "Intel"; 126 const bool is_intel = vendor_name == "Intel";
127 127
128#ifdef __unix__ 128#ifdef __unix__
129 constexpr static bool is_linux = true; 129 constexpr bool is_linux = true;
130#else 130#else
131 constexpr static bool is_linux = false; 131 constexpr bool is_linux = false;
132#endif 132#endif
133 133
134 bool disable_fast_buffer_sub_data = false; 134 bool disable_fast_buffer_sub_data = false;
diff --git a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
index c409d6ae7..29491e762 100644
--- a/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
+++ b/src/video_core/renderer_opengl/gl_graphics_pipeline.cpp
@@ -385,8 +385,7 @@ void GraphicsPipeline::ConfigureImpl(bool is_indexed) {
385 const auto bind_stage_info{[&](size_t stage) LAMBDA_FORCEINLINE { 385 const auto bind_stage_info{[&](size_t stage) LAMBDA_FORCEINLINE {
386 size_t index{}; 386 size_t index{};
387 const auto add_buffer{[&](const auto& desc) { 387 const auto add_buffer{[&](const auto& desc) {
388 constexpr static bool is_image = 388 constexpr bool is_image = std::is_same_v<decltype(desc), const ImageBufferDescriptor&>;
389 std::is_same_v<decltype(desc), const ImageBufferDescriptor&>;
390 for (u32 i = 0; i < desc.count; ++i) { 389 for (u32 i = 0; i < desc.count; ++i) {
391 bool is_written{false}; 390 bool is_written{false};
392 if constexpr (is_image) { 391 if constexpr (is_image) {
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 5d25b8a7d..2a74c1d05 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -237,7 +237,7 @@ void RendererOpenGL::LoadFBToScreenInfo(const Tegra::FramebufferConfig& framebuf
237 screen_info.display_texture = screen_info.texture.resource.handle; 237 screen_info.display_texture = screen_info.texture.resource.handle;
238 238
239 // TODO(Rodrigo): Read this from HLE 239 // TODO(Rodrigo): Read this from HLE
240 constexpr static u32 block_height_log2 = 4; 240 constexpr u32 block_height_log2 = 4;
241 const auto pixel_format{ 241 const auto pixel_format{
242 VideoCore::Surface::PixelFormatFromGPUPixelFormat(framebuffer.pixel_format)}; 242 VideoCore::Surface::PixelFormatFromGPUPixelFormat(framebuffer.pixel_format)};
243 const u32 bytes_per_pixel{VideoCore::Surface::BytesPerBlock(pixel_format)}; 243 const u32 bytes_per_pixel{VideoCore::Surface::BytesPerBlock(pixel_format)};
@@ -375,7 +375,7 @@ void RendererOpenGL::AddTelemetryFields() {
375 LOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor); 375 LOG_INFO(Render_OpenGL, "GL_VENDOR: {}", gpu_vendor);
376 LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model); 376 LOG_INFO(Render_OpenGL, "GL_RENDERER: {}", gpu_model);
377 377
378 constexpr static auto user_system = Common::Telemetry::FieldType::UserSystem; 378 constexpr auto user_system = Common::Telemetry::FieldType::UserSystem;
379 telemetry_session.AddField(user_system, "GPU_Vendor", std::string(gpu_vendor)); 379 telemetry_session.AddField(user_system, "GPU_Vendor", std::string(gpu_vendor));
380 telemetry_session.AddField(user_system, "GPU_Model", std::string(gpu_model)); 380 telemetry_session.AddField(user_system, "GPU_Model", std::string(gpu_model));
381 telemetry_session.AddField(user_system, "GPU_OpenGL_Version", std::string(gl_version)); 381 telemetry_session.AddField(user_system, "GPU_OpenGL_Version", std::string(gl_version));
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
359void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, 359void 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
1483u64 BlitScreen::GetRawImageOffset(const Tegra::FramebufferConfig& framebuffer, 1483u64 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
56void TransitionImageLayout(vk::CommandBuffer& cmdbuf, VkImage image, VkImageLayout target_layout, 56void 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
471void ClearColorImage(vk::CommandBuffer& cmdbuf, VkImage image) { 470void 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
531void SMAA::CreateImages() { 530void 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
588void SMAA::CreateShaders() { 587void 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
301void StagingBufferPool::ReleaseLevel(StagingBuffersCache& cache, size_t log2) { 301void 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
55VkExtent2D ChooseSwapExtent(const VkSurfaceCapabilitiesKHR& capabilities, u32 width, u32 height) { 55VkExtent2D 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,
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp
index e69855cad..1a76d4178 100644
--- a/src/video_core/surface.cpp
+++ b/src/video_core/surface.cpp
@@ -371,7 +371,7 @@ std::pair<u32, u32> GetASTCBlockSize(PixelFormat format) {
371} 371}
372 372
373u64 EstimatedDecompressedSize(u64 base_size, PixelFormat format) { 373u64 EstimatedDecompressedSize(u64 base_size, PixelFormat format) {
374 constexpr static u64 RGBA8_PIXEL_SIZE = 4; 374 constexpr u64 RGBA8_PIXEL_SIZE = 4;
375 const u64 base_block_size = static_cast<u64>(DefaultBlockWidth(format)) * 375 const u64 base_block_size = static_cast<u64>(DefaultBlockWidth(format)) *
376 static_cast<u64>(DefaultBlockHeight(format)) * RGBA8_PIXEL_SIZE; 376 static_cast<u64>(DefaultBlockHeight(format)) * RGBA8_PIXEL_SIZE;
377 return (base_size * base_block_size) / BytesPerBlock(format); 377 return (base_size * base_block_size) / BytesPerBlock(format);
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp
index 436f228b3..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
30template <u32 mask, u32 incr_amount> 30template <u32 mask, u32 incr_amount>
31void incrpdep(u32& value) { 31void incrpdep(u32& value) {
32 constexpr static 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
diff --git a/src/video_core/vulkan_common/vulkan_wrapper.cpp b/src/video_core/vulkan_common/vulkan_wrapper.cpp
index 7efe83c9a..486d4dfaf 100644
--- a/src/video_core/vulkan_common/vulkan_wrapper.cpp
+++ b/src/video_core/vulkan_common/vulkan_wrapper.cpp
@@ -495,9 +495,9 @@ VkResult Free(VkDevice device, VkCommandPool handle, Span<VkCommandBuffer> buffe
495Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char*> extensions, 495Instance Instance::Create(u32 version, Span<const char*> layers, Span<const char*> extensions,
496 InstanceDispatch& dispatch) { 496 InstanceDispatch& dispatch) {
497#ifdef __APPLE__ 497#ifdef __APPLE__
498 constexpr static VkFlags ci_flags{VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR}; 498 constexpr VkFlags ci_flags{VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR};
499#else 499#else
500 constexpr static VkFlags ci_flags{}; 500 constexpr VkFlags ci_flags{};
501#endif 501#endif
502 502
503 const VkApplicationInfo application_info{ 503 const VkApplicationInfo application_info{