mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-28 22:40:48 +01:00
[cmake] enable clang-cl and WoA builds (#348)
Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@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
428f136a75
commit
9d2681ecc9
276 changed files with 973 additions and 1010 deletions
|
|
@ -504,7 +504,7 @@ NvResult nvhost_as_gpu::GetVARegions3(IoctlGetVaRegions& params, std::span<VaReg
|
|||
|
||||
GetVARegionsImpl(params);
|
||||
|
||||
const size_t num_regions = std::min(params.regions.size(), regions.size());
|
||||
const size_t num_regions = (std::min)(params.regions.size(), regions.size());
|
||||
for (size_t i = 0; i < num_regions; i++) {
|
||||
regions[i] = params.regions[i];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,12 +197,12 @@ private:
|
|||
|
||||
struct VM {
|
||||
static constexpr u32 YUZU_PAGESIZE{0x1000};
|
||||
static constexpr u32 PAGE_SIZE_BITS{std::countr_zero(YUZU_PAGESIZE)};
|
||||
static constexpr u32 PAGE_SIZE_BITS{static_cast<u32>(std::countr_zero<u32>(YUZU_PAGESIZE))};
|
||||
|
||||
static constexpr u32 SUPPORTED_BIG_PAGE_SIZES{0x30000};
|
||||
static constexpr u32 DEFAULT_BIG_PAGE_SIZE{0x20000};
|
||||
u32 big_page_size{DEFAULT_BIG_PAGE_SIZE};
|
||||
u32 big_page_size_bits{std::countr_zero(DEFAULT_BIG_PAGE_SIZE)};
|
||||
u32 big_page_size_bits{static_cast<u32>(std::countr_zero<u32>(DEFAULT_BIG_PAGE_SIZE))};
|
||||
|
||||
static constexpr u32 VA_START_SHIFT{10};
|
||||
static constexpr u64 DEFAULT_VA_SPLIT{1ULL << 34};
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ NvResult nvhost_nvdec_common::GetWaitbase(IoctlGetWaitbase& params) {
|
|||
|
||||
NvResult nvhost_nvdec_common::MapBuffer(IoctlMapBuffer& params, std::span<MapBufferEntry> entries,
|
||||
DeviceFD fd) {
|
||||
const size_t num_entries = std::min(params.num_entries, static_cast<u32>(entries.size()));
|
||||
const size_t num_entries = (std::min)(params.num_entries, static_cast<u32>(entries.size()));
|
||||
for (size_t i = 0; i < num_entries; i++) {
|
||||
DAddr pin_address = nvmap.PinHandle(entries[i].map_handle, true);
|
||||
entries[i].map_address = static_cast<u32>(pin_address);
|
||||
|
|
@ -150,7 +150,7 @@ NvResult nvhost_nvdec_common::MapBuffer(IoctlMapBuffer& params, std::span<MapBuf
|
|||
|
||||
NvResult nvhost_nvdec_common::UnmapBuffer(IoctlMapBuffer& params,
|
||||
std::span<MapBufferEntry> entries) {
|
||||
const size_t num_entries = std::min(params.num_entries, static_cast<u32>(entries.size()));
|
||||
const size_t num_entries = (std::min)(params.num_entries, static_cast<u32>(entries.size()));
|
||||
for (size_t i = 0; i < num_entries; i++) {
|
||||
nvmap.UnpinHandle(entries[i].map_handle);
|
||||
entries[i] = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue