diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-11 10:51:06 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-11 10:51:06 +0100 |
| commit | 4da0a3a5369142078fd7c681e3f0f1817bd6e2f3 (patch) | |
| tree | d69429d6800dad0bb819f164122df634543796a5 /src/gpu/texture_readback.h | |
| parent | 7dd1ac57178055aa8407777d4fb03787e21e6f66 (diff) | |
add --save-intermediates to train.py and cnn_test
Diffstat (limited to 'src/gpu/texture_readback.h')
| -rw-r--r-- | src/gpu/texture_readback.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/texture_readback.h b/src/gpu/texture_readback.h index 1bf770f..8230e13 100644 --- a/src/gpu/texture_readback.h +++ b/src/gpu/texture_readback.h @@ -20,4 +20,14 @@ std::vector<uint8_t> read_texture_pixels( int width, int height); +// Read RGBA16Float texture and convert to BGRA8Unorm for saving +// Converts [-1,1] float range to [0,255] uint8 range +// Returns: width * height * 4 bytes (BGRA8) +std::vector<uint8_t> texture_readback_fp16_to_u8( + WGPUDevice device, + WGPUQueue queue, + WGPUTexture texture, + int width, + int height); + #endif // !defined(STRIP_ALL) |
