libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.28k stars 1.83k forks source link

Broken UWP Builds, we missed you (not) #14866

Closed GABO1423 closed 1 year ago

GABO1423 commented 1 year ago

Description

Either PR https://github.com/libretro/RetroArch/pull/14850 or https://github.com/libretro/RetroArch/pull/14853 broke UWP builds.

These are the errors:

image

@warmenhoven Since you were behind both PRs, do you have any thoughts about these errors?

Expected behavior

RetroArch to build

Actual behavior

Build errors

Bisect Results

Either PR https://github.com/libretro/RetroArch/pull/14850 or https://github.com/libretro/RetroArch/pull/14853 were the culprits.

Environment information

warmenhoven commented 1 year ago
3 matches for "std::max" in buffer: spirv_msl.cpp
   2367:            num_components = std::max(num_components, get_target_components_for_fragment_location(locn));
   3849:                            location_meta.num_components = std::max(location_meta.num_components, component + type.vecsize);
   7209:        last_significant = std::max(last_reference, last_pointer);

Looks like that should instead be something more like:

4 matches for "max<" in buffer: spirv_msl.cpp
   4518:                    array_stride /= max<uint32_t>(array_size, 1u);
   4725:            array_stride /= max<uint32_t>(to_array_size_literal(mbr_type, dim), 1u);
  15923:        value_size *= max<uint32_t>(array_size, 1u);
  16034:            return get_declared_type_array_stride_msl(type, is_packed, row_major) * max<uint32_t>(array_size, 1u);
warmenhoven commented 1 year ago

https://github.com/KhronosGroup/SPIRV-Cross/pull/2089

GABO1423 commented 1 year ago

@warmenhoven Your commit did fix the errors... but new ones came up:

image

Visual Studio also shows up some code errors in the file:

image

LibretroAdmin commented 1 year ago

Should be fixed by this now - https://github.com/libretro/RetroArch/commit/993d4ee64f1ca040e87065535c5e4e50ef31d7e5

GABO1423 commented 1 year ago

Can confirm it's fixed. Closing