Skip to content

Commit

Permalink
3.7 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein committed Oct 17, 2023
1 parent 0f43262 commit 2b4b16a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion wgpu/backends/rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,9 @@ def read_mapped(self, buffer_offset=None, size=None, *, copy=True):
return data
else:
# Return view on the actually mapped data
data = src_m.toreadonly()
data = src_m
if hasattr(data, "toreadonly"): # Py 3.8+
data = data.toreadonly()
self._mapped_memoryviews.append(data)
return data

Expand Down

0 comments on commit 2b4b16a

Please sign in to comment.