diff options
| author | skal <pascal.massimino@gmail.com> | 2026-05-21 08:03:58 +0200 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-05-21 08:03:58 +0200 |
| commit | 680042a18c11ad5e58757e45b260745c2f52417f (patch) | |
| tree | 7fa049dae25110ba9e29ecd57e6d6ba9103b665c | |
| parent | cca9db73a325b1da7492b18d7097c9235f91b688 (diff) | |
fix: correct WGPUTexelCopyBufferInfo initialization order
| -rw-r--r-- | src/gpu/texture_readback.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/texture_readback.cc b/src/gpu/texture_readback.cc index e7f2729..14cdc11 100644 --- a/src/gpu/texture_readback.cc +++ b/src/gpu/texture_readback.cc @@ -48,12 +48,12 @@ std::vector<uint8_t> read_texture_pixels(WGPUInstance instance, }; const WGPUTexelCopyBufferInfo dst = { - .buffer = staging, .layout = { .bytesPerRow = aligned_bytes_per_row, .rowsPerImage = (uint32_t)(height), }, + .buffer = staging, }; const WGPUExtent3D copy_size = {(uint32_t)(width), (uint32_t)(height), 1}; @@ -191,12 +191,12 @@ std::vector<uint8_t> texture_readback_fp16_to_u8(WGPUDevice device, .origin = {0, 0, 0}, }; const WGPUTexelCopyBufferInfo dst = { - .buffer = staging, .layout = { .bytesPerRow = aligned_bytes_per_row, .rowsPerImage = (uint32_t)(height), }, + .buffer = staging, }; const WGPUExtent3D copy_size = {(uint32_t)(width), (uint32_t)(height), 1}; wgpuCommandEncoderCopyTextureToBuffer(encoder, &src, &dst, ©_size); |
