Fix: Python: incorrect assert when reading back framebuffers

Detected when looking into #144887

Pull Request: https://projects.blender.org/blender/blender/pulls/145165
This commit is contained in:
Jeroen Bakker
2025-08-28 09:19:29 +02:00
parent 149a47ba57
commit 56784c2681

View File

@@ -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)));
}