// GPU texture readback utility for offline processing // Synchronous blocking operation (waits for GPU completion) #pragma once // Protected with STRIP_ALL: only needed for dev tools, not final release #if !defined(STRIP_ALL) #include "platform/platform.h" #include #include // Read texture pixels to CPU memory (synchronous, blocking) // Format: BGRA8Unorm (4 bytes per pixel) // Returns: width * height * 4 bytes std::vector read_texture_pixels( WGPUInstance instance, WGPUDevice device, WGPUTexture texture, int width, int height); #endif // !defined(STRIP_ALL)