Skip to content

Commit

Permalink
Merge branch 'main' into push-constant
Browse files Browse the repository at this point in the history
  • Loading branch information
fyellin committed Sep 13, 2024
2 parents 2249a4b + 9a9f7a7 commit 7a2b3e8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
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 @@ -408,7 +408,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

0 comments on commit 7a2b3e8

Please sign in to comment.