Skip to content

Commit 6516d37

Browse files
authored
Change all occurrences of request_adapter_trace (except in the changelog) to request_adapter. (#589)
1 parent 6088dd8 commit 6516d37

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

docs/backends.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ It also works out of the box, because the wgpu-native DLL is shipped with wgpu-p
4444

4545
The wgpu_native backend provides a few extra functionalities:
4646

47-
.. py:function:: wgpu.backends.wgpu_native.request_device_tracing(adapter, trace_path, *, label="", required_features, required_limits, default_queue)
47+
.. py:function:: wgpu.backends.wgpu_native.request_device(adapter, trace_path, *, label="", required_features, required_limits, default_queue)
4848
4949
An alternative to :func:`wgpu.GPUAdapter.request_adapter`, that streams a trace
5050
of all low level calls to disk, so the visualization can be replayed (also on other systems),
5151
investigated, and debugged.
5252

53+
The trace_path argument is ignored on drivers that do not support tracing.
54+
5355
:param adapter: The adapter to create a device for.
5456
:param trace_path: The path to an (empty) directory. Is created if it does not exist.
5557
:param label: A human readable label. Optional.

docs/guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ You can run your application via RenderDoc, which is able to capture a
232232
frame, including all API calls, objects and the complete pipeline state,
233233
and display all of that information within a nice UI.
234234

235-
You can use ``adapter.request_device_tracing()`` to provide a directory path
235+
You can use ``adapter.request_device()`` to provide a directory path
236236
where a trace of all API calls will be written. This trace can then be used
237237
to re-play your use-case elsewhere (it's cross-platform).
238238

tests/test_wgpu_native_basics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,15 +328,15 @@ def test_wgpu_native_tracer():
328328
assert not os.path.isdir(tempdir)
329329

330330
# Works!
331-
wgpu.backends.wgpu_native.request_device_tracing(adapter, tempdir)
331+
wgpu.backends.wgpu_native.request_device(adapter, tempdir)
332332
assert os.path.isdir(tempdir)
333333

334334
# Make dir not empty
335335
with open(os.path.join(tempdir, "stub.txt"), "wb"):
336336
pass
337337

338338
# Still works, but produces warning
339-
wgpu.backends.wgpu_native.request_device_tracing(adapter, tempdir)
339+
wgpu.backends.wgpu_native.request_device(adapter, tempdir)
340340

341341

342342
@mark.skipif(not can_use_wgpu_lib, reason="Needs wgpu lib")

wgpu/backends/wgpu_native/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
gpu = GPU() # noqa: F405
1919
_register_backend(gpu) # noqa: F405
2020

21-
from .extras import enumerate_adapters, request_device_tracing # noqa: F401, E402
21+
from .extras import enumerate_adapters, request_device # noqa: F401, E402

wgpu/backends/wgpu_native/extras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def enumerate_adapters():
1414
raise RuntimeError("Deprecated: use wgpu.gpu.enumerate_adapters() instead.")
1515

1616

17-
def request_device_tracing(
17+
def request_device(
1818
adapter,
1919
trace_path,
2020
*,

0 commit comments

Comments
 (0)