wgpu 0.19.0__py3-none-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wgpu/__init__.py +19 -0
- wgpu/__pyinstaller/__init__.py +12 -0
- wgpu/__pyinstaller/conftest.py +1 -0
- wgpu/__pyinstaller/hook-wgpu.py +30 -0
- wgpu/__pyinstaller/test_wgpu.py +30 -0
- wgpu/_classes.py +2628 -0
- wgpu/_coreutils.py +226 -0
- wgpu/_diagnostics.py +524 -0
- wgpu/_version.py +113 -0
- wgpu/backends/__init__.py +37 -0
- wgpu/backends/auto.py +27 -0
- wgpu/backends/js_webgpu/__init__.py +31 -0
- wgpu/backends/wgpu_native/__init__.py +23 -0
- wgpu/backends/wgpu_native/_api.py +3646 -0
- wgpu/backends/wgpu_native/_ffi.py +208 -0
- wgpu/backends/wgpu_native/_helpers.py +513 -0
- wgpu/backends/wgpu_native/_mappings.py +491 -0
- wgpu/backends/wgpu_native/extras.py +121 -0
- wgpu/classes.py +8 -0
- wgpu/enums.py +411 -0
- wgpu/flags.py +70 -0
- wgpu/gui/__init__.py +12 -0
- wgpu/gui/_gui_utils.py +160 -0
- wgpu/gui/auto.py +191 -0
- wgpu/gui/base.py +389 -0
- wgpu/gui/glfw.py +628 -0
- wgpu/gui/jupyter.py +126 -0
- wgpu/gui/offscreen.py +99 -0
- wgpu/gui/qt.py +546 -0
- wgpu/gui/wx.py +519 -0
- wgpu/resources/__init__.py +1 -0
- wgpu/resources/codegen_report.md +40 -0
- wgpu/resources/webgpu.h +2091 -0
- wgpu/resources/webgpu.idl +1331 -0
- wgpu/resources/wgpu.h +301 -0
- wgpu/resources/wgpu_native-release.dll +0 -0
- wgpu/structs.py +757 -0
- wgpu/utils/__init__.py +21 -0
- wgpu/utils/compute.py +200 -0
- wgpu/utils/device.py +17 -0
- wgpu/utils/imgui/__init__.py +2 -0
- wgpu/utils/imgui/imgui_backend.py +501 -0
- wgpu/utils/imgui/imgui_renderer.py +205 -0
- wgpu-0.19.0.dist-info/METADATA +260 -0
- wgpu-0.19.0.dist-info/RECORD +48 -0
- wgpu-0.19.0.dist-info/WHEEL +4 -0
- wgpu-0.19.0.dist-info/entry_points.txt +3 -0
- wgpu-0.19.0.dist-info/licenses/LICENSE +25 -0
wgpu/__init__.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""
|
|
2
|
+
WebGPU for Python.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
# ruff: noqa: F401, F403
|
|
6
|
+
|
|
7
|
+
from ._coreutils import logger
|
|
8
|
+
from ._version import __version__, version_info
|
|
9
|
+
from ._diagnostics import diagnostics, DiagnosticsBase
|
|
10
|
+
from .flags import *
|
|
11
|
+
from .enums import *
|
|
12
|
+
from .classes import *
|
|
13
|
+
from .gui import WgpuCanvasInterface
|
|
14
|
+
from . import utils
|
|
15
|
+
from . import backends
|
|
16
|
+
from . import resources
|
|
17
|
+
|
|
18
|
+
# The API entrypoint, from wgpu.classes - gets replaced when a backend loads.
|
|
19
|
+
gpu = GPU() # noqa: F405
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from PyInstaller.utils.conftest import * # noqa: F403
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# ruff: noqa: N999
|
|
2
|
+
|
|
3
|
+
from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs
|
|
4
|
+
|
|
5
|
+
# Init variables that PyInstaller will pick up.
|
|
6
|
+
hiddenimports = []
|
|
7
|
+
datas = []
|
|
8
|
+
binaries = []
|
|
9
|
+
|
|
10
|
+
# Include our resource data and binaries.
|
|
11
|
+
datas += collect_data_files("wgpu", subdir="resources")
|
|
12
|
+
binaries += collect_dynamic_libs("wgpu")
|
|
13
|
+
|
|
14
|
+
# Always include the wgpu-native backend. Since an import is not needed to
|
|
15
|
+
# load this (default) backend, PyInstaller does not see it by itself.
|
|
16
|
+
hiddenimports += ["wgpu.backends.auto", "wgpu.backends.wgpu_native"]
|
|
17
|
+
|
|
18
|
+
# For the GUI backends, there always is an import. The auto backend is
|
|
19
|
+
# problematic because PyInstaller cannot follow it to a specific
|
|
20
|
+
# backend. Also, glfw does not have a hook like this, so it does not
|
|
21
|
+
# include the binary when freezing. We can solve both problems with the
|
|
22
|
+
# code below. Makes the binary a bit larger, but only marginally (less
|
|
23
|
+
# than 300kb).
|
|
24
|
+
try:
|
|
25
|
+
import glfw # noqa: F401
|
|
26
|
+
except ImportError:
|
|
27
|
+
pass
|
|
28
|
+
else:
|
|
29
|
+
hiddenimports += ["wgpu.gui.glfw"]
|
|
30
|
+
binaries += collect_dynamic_libs("glfw")
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
script = """
|
|
2
|
+
# The script part
|
|
3
|
+
import sys
|
|
4
|
+
import wgpu
|
|
5
|
+
import importlib
|
|
6
|
+
|
|
7
|
+
# The test part
|
|
8
|
+
if "is_test" in sys.argv:
|
|
9
|
+
included_modules = [
|
|
10
|
+
"wgpu.backends.auto",
|
|
11
|
+
"wgpu.backends.wgpu_native",
|
|
12
|
+
"wgpu.gui.glfw",
|
|
13
|
+
]
|
|
14
|
+
excluded_modules = [
|
|
15
|
+
"PySide6",
|
|
16
|
+
"PyQt6",
|
|
17
|
+
]
|
|
18
|
+
for module_name in included_modules:
|
|
19
|
+
importlib.import_module(module_name)
|
|
20
|
+
for module_name in excluded_modules:
|
|
21
|
+
try:
|
|
22
|
+
importlib.import_module(module_name)
|
|
23
|
+
except ModuleNotFoundError:
|
|
24
|
+
continue
|
|
25
|
+
raise RuntimeError(module_name + " is not supposed to be importable.")
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_pyi_wgpu(pyi_builder):
|
|
30
|
+
pyi_builder.test_source(script, app_args=["is_test"])
|