From 6ec6ca7c3798e3f7c8c57ee2e8462705bebebc20 Mon Sep 17 00:00:00 2001 From: Lizzie Date: Sun, 18 Jan 2026 02:35:57 +0100 Subject: [clang, opengl] fix opengl build on PGO build and clang-cl on windows (#3332) - [backported] opengl: fix PGO build error (pulled from 34332ab81326c3f2dfae2fd11ff5b18619fedb1e@pflyly/eden-nightly) - [clang] chore: fix std::min on windows Signed-off-by: lizzie lizzie@eden-emu.dev Co-authored-by: DraVee Co-authored-by: Escary <81011361+pflyly@users.noreply.github.com> Co-authored-by: Caio Oliveira Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3332 Reviewed-by: DraVee Reviewed-by: MaranBr Co-authored-by: Lizzie Co-committed-by: Lizzie --- src/video_core/texture_cache/texture_cache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/video_core/texture_cache/texture_cache.h') diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 53fb57317f..46a825ea39 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1468,7 +1468,7 @@ void TextureCache

::TickAsyncUnswizzle() { if (task.current_offset < task.total_size) { const size_t remaining = task.total_size - task.current_offset; - size_t copy_amount = std::min(swizzle_chunk_size, remaining); + size_t copy_amount = (std::min)(swizzle_chunk_size, remaining); if (remaining > swizzle_chunk_size) { copy_amount = (copy_amount / task.bytes_per_slice) * task.bytes_per_slice; @@ -1487,8 +1487,8 @@ void TextureCache

::TickAsyncUnswizzle() { if (complete_slices >= swizzle_slices_per_batch || (is_final_batch && complete_slices > 0)) { const u32 z_start = static_cast(task.last_submitted_offset / task.bytes_per_slice); - const u32 slices_to_process = std::min(complete_slices, swizzle_slices_per_batch); - const u32 z_count = std::min(slices_to_process, image.info.size.depth - z_start); + const u32 slices_to_process = (std::min)(complete_slices, swizzle_slices_per_batch); + const u32 z_count = (std::min)(slices_to_process, image.info.size.depth - z_start); if (z_count > 0) { const auto uploads = FullUploadSwizzles(task.info); -- cgit v1.2.3