mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-17 16:07:57 +00: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
|
@ -245,15 +245,15 @@ u32 Maxwell3D::GetMaxCurrentVertices() {
|
|||
}
|
||||
const auto& attribute = regs.vertex_attrib_format[index];
|
||||
if (attribute.constant) {
|
||||
num_vertices = std::max(num_vertices, 1U);
|
||||
num_vertices = (std::max)(num_vertices, 1U);
|
||||
continue;
|
||||
}
|
||||
const auto& limit = regs.vertex_stream_limits[index];
|
||||
const GPUVAddr gpu_addr_begin = array.Address();
|
||||
const GPUVAddr gpu_addr_end = limit.Address() + 1;
|
||||
const u32 address_size = static_cast<u32>(gpu_addr_end - gpu_addr_begin);
|
||||
num_vertices = std::max(
|
||||
num_vertices, address_size / std::max(attribute.SizeInBytes(), array.stride.Value()));
|
||||
num_vertices = (std::max)(
|
||||
num_vertices, address_size / (std::max)(attribute.SizeInBytes(), array.stride.Value()));
|
||||
break;
|
||||
}
|
||||
return num_vertices;
|
||||
|
@ -262,9 +262,9 @@ u32 Maxwell3D::GetMaxCurrentVertices() {
|
|||
size_t Maxwell3D::EstimateIndexBufferSize() {
|
||||
GPUVAddr start_address = regs.index_buffer.StartAddress();
|
||||
GPUVAddr end_address = regs.index_buffer.EndAddress();
|
||||
static constexpr std::array<size_t, 3> max_sizes = {std::numeric_limits<u8>::max(),
|
||||
std::numeric_limits<u16>::max(),
|
||||
std::numeric_limits<u32>::max()};
|
||||
static constexpr std::array<size_t, 3> max_sizes = {(std::numeric_limits<u8>::max)(),
|
||||
(std::numeric_limits<u16>::max)(),
|
||||
(std::numeric_limits<u32>::max)()};
|
||||
const size_t byte_size = regs.index_buffer.FormatSizeInBytes();
|
||||
const size_t log2_byte_size = Common::Log2Ceil64(byte_size);
|
||||
const size_t cap{GetMaxCurrentVertices() * 4 * byte_size};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue