Skip to content

Commit 7f03467

Browse files
Add docs for device_lost callback and buffer.map_async args (#568)
Adds missing docs for `device_lost` callback and `buffer.map_async()` mode arg
1 parent 2fff5e7 commit 7f03467

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

webgpu.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,11 @@ typedef void (*WGPUCreateRenderPipelineAsyncCallback)(WGPUCreatePipelineAsyncSta
14081408
* (2) The last ref of the device has been (or is being) released: see @ref DeviceRelease.
14091409
* This parameter is @ref PassedWithoutOwnership.
14101410
*
1411+
* @param reason
1412+
* An error code explaining why the device was lost.
1413+
*
14111414
* @param message
1415+
* A @ref LocalizableHumanReadableMessageString describing why the device was lost.
14121416
* This parameter is @ref PassedWithoutOwnership.
14131417
*/
14141418
typedef void (*WGPUDeviceLostCallback)(WGPUDevice const * device, WGPUDeviceLostReason reason, WGPUStringView message, WGPU_NULLABLE void* userdata1, WGPU_NULLABLE void* userdata2) WGPU_FUNCTION_ATTRIBUTE;
@@ -5938,6 +5942,9 @@ WGPU_EXPORT WGPUBufferMapState wgpuBufferGetMapState(WGPUBuffer buffer) WGPU_FUN
59385942
WGPU_EXPORT uint64_t wgpuBufferGetSize(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
59395943
WGPU_EXPORT WGPUBufferUsage wgpuBufferGetUsage(WGPUBuffer buffer) WGPU_FUNCTION_ATTRIBUTE;
59405944
/**
5945+
* @param mode
5946+
* The mapping mode (read or write).
5947+
*
59415948
* @param offset
59425949
* Byte offset relative to beginning of the buffer.
59435950
*

webgpu.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webgpu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3485,11 +3485,11 @@ callbacks:
34853485
passed_with_ownership: false
34863486
- name: reason
34873487
doc: |
3488-
TODO
3488+
An error code explaining why the device was lost.
34893489
type: enum.device_lost_reason
34903490
- name: message
34913491
doc: |
3492-
TODO
3492+
A @ref LocalizableHumanReadableMessageString describing why the device was lost.
34933493
type: out_string
34943494
passed_with_ownership: false
34953495
- name: pop_error_scope
@@ -3735,7 +3735,7 @@ objects:
37353735
args:
37363736
- name: mode
37373737
doc: |
3738-
TODO
3738+
The mapping mode (read or write).
37393739
type: bitflag.map_mode
37403740
- name: offset
37413741
doc: |

0 commit comments

Comments
 (0)