Skip to content

Remove sync workaround in GPUBuffer.map_async() #808

Description

@almarklein

The workaround:

# Sync up when reading, otherwise the memory may be all zeros.
# See https://github.com/gfx-rs/wgpu-native/issues/305
if sync_on_read and map_mode & lib.WGPUMapMode_Read:
if self._mapped_status[2] == 0 and self._usage & flags.BufferUsage.MAP_READ:
encoder = self._device.create_command_encoder()
command_buffer = encoder.finish()
self._device.queue.submit([command_buffer])

Links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions