diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4d8462324f..c2016f70a1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 10 @@ -417,7 +417,7 @@ jobs: os: [ubuntu-24.04, windows-2022, macOS-15] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Install dependencies (Ubuntu) if: matrix.os == 'ubuntu-24.04' run: | @@ -559,7 +559,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')" runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Install dependencies run: | @@ -648,7 +648,7 @@ jobs: runs-on: ${{ matrix.runner }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Setup Android SDK uses: android-actions/setup-android@v4 diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 83a9d8138fb..48d8590387a 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -10,7 +10,7 @@ jobs: python-version: ['3.9', '3.13'] fail-fast: false steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 1ce4bd30fed..18c3cd82ad1 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -395,6 +395,8 @@ def parseopts(args): if target == 'windows': if target_arch == 'x64': PLATFORM = 'win-amd64' + elif target_arch == 'arm64': + PLATFORM = 'win-arm64' else: PLATFORM = 'win32' @@ -1224,7 +1226,7 @@ def CompileCxx(obj,src,opts): if (building): cmd += " /DBUILDING_" + building - if ("BIGOBJ" in opts) or GetTargetArch() == 'x64' or not PkgSkip("EIGEN"): + if ("BIGOBJ" in opts) or GetTargetArch() in ('x64', 'arm64') or not PkgSkip("EIGEN"): cmd += " /bigobj" cmd += " /Zm300" diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 1f526427615..477b4e3c368 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -308,6 +308,9 @@ def GetHostArch(): target = GetTarget() if target == 'windows': + machine = platform.machine().lower() + if machine in ('arm64', 'aarch64'): + return 'arm64' return 'x64' if host_64 else 'x86' machine = platform.machine() @@ -341,9 +344,11 @@ def SetTarget(target, arch=None): arch = 'x86' elif arch == 'amd64': arch = 'x64' + elif arch == 'aarch64': + arch = 'arm64' - if arch is not None and arch != 'x86' and arch != 'x64': - exit("Windows architecture must be x86 or x64") + if arch is not None and arch not in ('x86', 'x64', 'arm64'): + exit("Windows architecture must be x86, x64 or arm64") elif target == 'darwin': DEFAULT_CC = "clang" @@ -1394,6 +1399,8 @@ def GetThirdpartyDir(): if target_arch == 'x64': THIRDPARTYDIR = base + "/win-libs-vc" + vc + "-x64/" + elif target_arch == 'arm64': + THIRDPARTYDIR = base + "/win-libs-vc" + vc + "-arm64/" else: THIRDPARTYDIR = base + "/win-libs-vc" + vc + "/" @@ -2126,6 +2133,8 @@ def SdkLocatePython(prefer_thirdparty_python=False): sdkdir += "-dbg" if GetTargetArch() == 'x64': sdkdir += "-x64" + elif GetTargetArch() == 'arm64': + sdkdir += "-arm64" sdkdir = sdkdir.replace('\\', '/') SDK["PYTHON"] = sdkdir @@ -2764,6 +2773,8 @@ def SetupVisualStudioEnviron(): # Try the x86 tools, those should work just as well. if arch == 'x64' and os.path.isfile(vc_binpath + "\\x86_amd64\\cl.exe"): binpath = "{0}\\x86_amd64;{0}".format(vc_binpath) + elif arch == 'arm64' and os.path.isfile(vc_binpath + "\\Hostx64\\arm64\\cl.exe"): + binpath = "{0}\\Hostx64\\arm64;{0}".format(vc_binpath) elif winsdk_ver.startswith('10.'): exit("Couldn't find compilers in %s. You may need to install the Windows SDK 7.1 and the Visual C++ 2010 SP1 Compiler Update for Windows SDK 7.1." % binpath) else: @@ -3434,6 +3445,8 @@ def GetExtensionSuffix(): suffix = 't' if gil_disabled and int(gil_disabled) else '' if GetTargetArch() == 'x64': return dllext + '.cp%d%d%s-win_amd64.pyd' % (sys.version_info[0], sys.version_info[1], suffix) + elif GetTargetArch() == 'arm64': + return dllext + '.cp%d%d%s-win_arm64.pyd' % (sys.version_info[0], sys.version_info[1], suffix) else: return dllext + '.cp%d%d%s-win32.pyd' % (sys.version_info[0], sys.version_info[1], suffix) elif target == 'emscripten': diff --git a/panda/src/windisplay/winGraphicsPipe.cxx b/panda/src/windisplay/winGraphicsPipe.cxx index 428040f0f68..97ea67f1c1d 100644 --- a/panda/src/windisplay/winGraphicsPipe.cxx +++ b/panda/src/windisplay/winGraphicsPipe.cxx @@ -421,18 +421,6 @@ lookup_cpu_data() { _display_information->_get_memory_information_function = get_memory_information; // determine CPU frequency - uint64_t time; - uint64_t end_time; - LARGE_INTEGER counter; - LARGE_INTEGER end; - LARGE_INTEGER frequency; - - time = 0; - end_time = 0; - counter.QuadPart = 0; - end.QuadPart = 0; - frequency.QuadPart = 0; - int priority; HANDLE thread; @@ -441,6 +429,16 @@ lookup_cpu_data() { priority = GetThreadPriority (thread); SetThreadPriority(thread, THREAD_PRIORITY_TIME_CRITICAL); +#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__) + uint64_t time = 0; + uint64_t end_time = 0; + LARGE_INTEGER counter; + LARGE_INTEGER end; + LARGE_INTEGER frequency; + counter.QuadPart = 0; + end.QuadPart = 0; + frequency.QuadPart = 0; + if (QueryPerformanceFrequency(&frequency)) { if (frequency.QuadPart > 0) { if (QueryPerformanceCounter (&counter)) { @@ -455,6 +453,7 @@ lookup_cpu_data() { } } } +#endif SetThreadPriority(thread, priority); sprintf(string, "QueryPerformanceFrequency: %I64d\n", frequency.QuadPart);