File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1347,8 +1347,8 @@ pub const Buffer = *opaque {
1347
1347
}
1348
1348
extern fn wgpuBufferGetConstMappedRange (buffer : Buffer , offset : usize , size : usize ) ? * const anyopaque ;
1349
1349
1350
- // `offset` has to be a multiple of 8 (otherwise `null` will be returned).
1351
- // `@sizeOf(T) * len` has to be a multiple of 4 (otherwise `null` will be returned).
1350
+ // `offset` - in bytes, has to be a multiple of 8 (otherwise `null` will be returned).
1351
+ // `len` - length of slice to return, in elements of type T, ` @sizeOf(T) * len` has to be a multiple of 4 (otherwise `null` will be returned).
1352
1352
pub fn getMappedRange (buffer : Buffer , comptime T : type , offset : usize , len : usize ) ? []T {
1353
1353
if (len == 0 ) return null ;
1354
1354
const ptr = wgpuBufferGetMappedRange (buffer , offset , @sizeOf (T ) * len );
@@ -1372,9 +1372,8 @@ pub const Buffer = *opaque {
1372
1372
}
1373
1373
extern fn wgpuBufferGetUsage (buffer : Buffer ) BufferUsage ;
1374
1374
1375
- // `offset` has to be a multiple of 8 (Dawn's validation layer will warn).
1376
- // `size` has to be a multiple of 4 (Dawn's validation layer will warn).
1377
- // `size == 0` will map entire range (from 'offset' to the end of the buffer).
1375
+ // `offset` - in bytes, has to be a multiple of 8 (Dawn's validation layer will warn).
1376
+ // `size` - size of buffer to map in bytes, has to be a multiple of 4 (Dawn's validation layer will warn).
1378
1377
pub fn mapAsync (
1379
1378
buffer : Buffer ,
1380
1379
mode : MapMode ,
You can’t perform that action at this time.
0 commit comments