Debugger: Send whole pixels in gpu.buffer.* base64 responses

StreamBufferToBase64 sent width * height bytes, so any buffer with more than one
byte per pixel came back truncated: half a D16 depth buffer, a quarter of a
D32F or 8888 one.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-10-11 14:50:19 +02:00
1 parent 50696c5b1f
commit fbcec91074
1 file changed
+1 -1
@@ -189,7 +189,7 @@ static std::string DescribeFormat(GPUDebugBufferFormat fmt) {
// Note: Calls req.Respond(). Other data can be added afterward.
static bool StreamBufferToBase64(DebuggerRequest &req, const GPUDebugBuffer &buf, bool isFramebuffer) {
size_t length = buf.GetStride() * buf.GetHeight();
size_t length = buf.GetStride() * buf.GetHeight() * buf.PixelSize();
auto &json = req.Respond();
json.writeInt("width", buf.GetStride());