mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-14 17:48:59 +02:00
[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 <dravee@dravee.dev> Co-authored-by: Escary <81011361+pflyly@users.noreply.github.com> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3332 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Co-authored-by: Lizzie <lizzie@eden-emu.dev> Co-committed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
833a38b443
commit
6ec6ca7c37
11 changed files with 23 additions and 17 deletions
|
|
@ -1468,7 +1468,7 @@ void TextureCache<P>::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<P>::TickAsyncUnswizzle() {
|
|||
|
||||
if (complete_slices >= swizzle_slices_per_batch || (is_final_batch && complete_slices > 0)) {
|
||||
const u32 z_start = static_cast<u32>(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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue