Skip to content

Commit 2920a8d

Browse files
authored
Merge pull request #2897 from pygame-community/add-common-cpu-instuctions-to-debug-info
Add SSE2, AVX2 & NEON support to `pygame.print_debug_info()`
2 parents 3c14cd1 + 951c213 commit 2920a8d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src_py/_debug.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from os import environ
99

1010
from pygame.version import ver
11+
from pygame.system import get_cpu_instruction_sets
1112

1213
ImportResult = Tuple[str, bool, Optional[Callable]]
1314

@@ -60,10 +61,14 @@ def _get_platform_info():
6061
"""
6162
Internal helper to get platform information
6263
"""
64+
cpu_inst_dict = get_cpu_instruction_sets()
65+
sse2 = 'Yes' if cpu_inst_dict['SSE2'] else 'No'
66+
avx2 = 'Yes' if cpu_inst_dict['AVX2'] else 'No'
67+
neon = 'Yes' if cpu_inst_dict['NEON'] else 'No'
6368
ret = f"Platform:\t\t{platform.platform()}\n"
6469
ret += f"System:\t\t\t{platform.system()}\n"
6570
ret += f"System Version:\t\t{platform.version()}\n"
66-
ret += f"Processor:\t\t{platform.processor()}\n"
71+
ret += f"Processor:\t\t{platform.processor()}\tSSE2: {sse2}\tAVX2: {avx2}\tNEON: {neon}\n"
6772
ret += (
6873
f"Architecture:\t\tBits: {platform.architecture()[0]}\t"
6974
f"Linkage: {platform.architecture()[1]}\n\n"

0 commit comments

Comments
 (0)