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:
@@ -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)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user