Skip to content

Commit

Permalink
codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Oct 17, 2023
1 parent 1fbf6fd commit 0f43262
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wgpu/backends/rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ def _check_range(self, offset, size):
raise ValueError("Mapped range must not extend beyond total buffer size.")
return offset, size

def map(self, mode, offset=None, size=None):
def map(self, mode, offset=0, size=None):
sync_on_read = True

# Check mode
Expand Down
2 changes: 1 addition & 1 deletion wgpu/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ def map_state(self):
# an array-like object that exposes the shared memory.

# IDL: Promise<undefined> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size);
def map(self, mode, offset=None, size=None):
def map(self, mode, offset=0, size=None):
"""Maps the given range of the GPUBuffer.
When this call returns, the buffer content is ready to be
Expand Down

0 comments on commit 0f43262

Please sign in to comment.