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
15 changes: 9 additions & 6 deletions download-wgpu-native.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,17 @@ def download_file(url, filename):


def extract_file(zip_filename, member, path):
# Read file from archive, find it no matter the folder structure
z = ZipFile(zip_filename)
os.makedirs(path, exist_ok=True)
z.extract(member, path=path)
flat_map = {os.path.basename(fi.filename): fi.filename for fi in z.filelist}
bb = z.read(flat_map[member])
# Make newlines consistent with Git rules etc.
if member.endswith(".h") and FORCE_SIMPLE_NEWLINES:
filename = os.path.join(path, member)
bb = open(filename, "rb").read()
with open(filename, "wb") as f:
f.write(bb.replace(b"\r\n", b"\n"))
bb = bb.replace(b"\r\n", b"\n")
# Write to disk
os.makedirs(path, exist_ok=True)
with open(os.path.join(path, member), "wb") as f:
f.write(bb)


def get_os_string():
Expand Down
4 changes: 2 additions & 2 deletions wgpu/_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ def info(self):
@apidiff.add("Useful in multi-gpu environments")
@property
def summary(self):
"""A one-line summary of the info of this adapter (description, adapter_type, backend_type)."""
"""A one-line summary of the info of this adapter (device, adapter_type, backend_type)."""
d = self._adapter_info
return f"{d['description']} ({d['adapter_type']}) via {d['backend_type']}"
return f"{d['device']} ({d['adapter_type']}) via {d['backend_type']}"


class GPUObjectBase:
Expand Down
4 changes: 2 additions & 2 deletions wgpu/backends/wgpu_native/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@


# The wgpu-native version that we target/expect
__version__ = "22.1.0.2"
__commit_sha__ = "3e18e3d3e5fd433053875464447c36d980625f0b"
__version__ = "22.1.0.5"
__commit_sha__ = "fad19f5990d8eb9a6e942eb957344957193fe66d"
version_info = tuple(map(int, __version__.split(".")))
_check_expected_version(version_info) # produces a warning on mismatch

Expand Down
2 changes: 1 addition & 1 deletion wgpu/backends/wgpu_native/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def to_py_str(key):

# Populate a dict according to the WebGPU spec: https://gpuweb.github.io/gpuweb/#gpuadapterinfo
# And add all other info we get from wgpu-native too.
# note: description is human readable. device is a PCI ID.
# note: device is human readable. description is driver-description; usually more cryptic, or empty.
adapter_info = {
# Spec
"vendor": to_py_str("vendor"),
Expand Down