From 680042a18c11ad5e58757e45b260745c2f52417f Mon Sep 17 00:00:00 2001 From: skal Date: Thu, 21 May 2026 08:03:58 +0200 Subject: fix: correct WGPUTexelCopyBufferInfo initialization order --- src/gpu/texture_readback.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 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 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); -- cgit v1.2.3