[Bf-blender-cvs] [dcad6c9db8d] master: Cleanup: correct assert in GPU_offscreen_read_pixels

Campbell Barton noreply at git.blender.org
Wed Jul 29 03:01:32 CEST 2020


Commit: dcad6c9db8dc6ce343fab51430f7709e4b0fe94a
Author: Campbell Barton
Date:   Wed Jul 29 10:50:31 2020 +1000
Branches: master
https://developer.blender.org/rBdcad6c9db8dc6ce343fab51430f7709e4b0fe94a

Cleanup: correct assert in GPU_offscreen_read_pixels

===================================================================

M	source/blender/gpu/intern/gpu_framebuffer.cc

===================================================================

diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index 3829573cde1..8864b8daf6a 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -1046,7 +1046,7 @@ void GPU_offscreen_read_pixels(GPUOffScreen *ofs, eGPUDataFormat type, void *pix
   const int w = GPU_texture_width(ofs->color);
   const int h = GPU_texture_height(ofs->color);
 
-  BLI_assert(ELEM(type, GPU_DATA_UNSIGNED_BYTE, GL_FLOAT));
+  BLI_assert(ELEM(type, GPU_DATA_UNSIGNED_BYTE, GPU_DATA_FLOAT));
   GLenum gl_type = (type == GPU_DATA_FLOAT) ? GL_FLOAT : GL_UNSIGNED_BYTE;
 
   glReadPixels(0, 0, w, h, GL_RGBA, gl_type, pixels);



More information about the Bf-blender-cvs mailing list