Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 10

Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion makepanda/makepanda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down Expand Up @@ -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"
Expand Down
17 changes: 15 additions & 2 deletions makepanda/makepandacore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 + "/"

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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':
Expand Down
23 changes: 11 additions & 12 deletions panda/src/windisplay/winGraphicsPipe.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)) {
Expand All @@ -455,6 +453,7 @@ lookup_cpu_data() {
}
}
}
#endif

SetThreadPriority(thread, priority);
sprintf(string, "QueryPerformanceFrequency: %I64d\n", frequency.QuadPart);
Expand Down
Loading