From 56784c2681de87b1ad68c0df35d048da7f2a44e7 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 28 Aug 2025 09:19:29 +0200 Subject: [PATCH] Fix: Python: incorrect assert when reading back framebuffers Detected when looking into #144887 Pull Request: https://projects.blender.org/blender/blender/pulls/145165 --- source/blender/python/gpu/gpu_py_framebuffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc index ffc4cc00855..b8341316d29 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.cc +++ b/source/blender/python/gpu/gpu_py_framebuffer.cc @@ -637,7 +637,7 @@ static PyObject *pygpu_framebuffer_read_color(BPyGPUFrameBuffer *self, const Py_ssize_t shape[3] = {h, w, channels}; py_buffer = BPyGPU_Buffer_CreatePyObject(pygpu_dataformat.value_found, shape, 3, nullptr); BLI_assert(bpygpu_Buffer_size(py_buffer) == - w * h * channels * + size_t(w) * size_t(h) * size_t(channels) * GPU_texture_dataformat_size(eGPUDataFormat(pygpu_dataformat.value_found))); }