[Bf-blender-cvs] [8e4c0efbe36] master: Cleanup: GPUTexture: Move debug messages outside of creation function

Clément Foucault noreply at git.blender.org
Sat Sep 5 17:50:09 CEST 2020


Commit: 8e4c0efbe36a1470efea2919053b58096e662f2b
Author: Clément Foucault
Date:   Sat Sep 5 02:55:22 2020 +0200
Branches: master
https://developer.blender.org/rB8e4c0efbe36a1470efea2919053b58096e662f2b

Cleanup: GPUTexture: Move debug messages outside of creation function

# Conflicts:
#	source/blender/gpu/intern/gpu_framebuffer.cc

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

M	intern/opencolorio/ocio_impl_glsl.cc
M	source/blender/blenkernel/intern/image_gpu.c
M	source/blender/blenkernel/intern/movieclip.c
M	source/blender/gpu/intern/gpu_texture.cc

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

diff --git a/intern/opencolorio/ocio_impl_glsl.cc b/intern/opencolorio/ocio_impl_glsl.cc
index 1461be42578..c6e194a2ea9 100644
--- a/intern/opencolorio/ocio_impl_glsl.cc
+++ b/intern/opencolorio/ocio_impl_glsl.cc
@@ -184,7 +184,7 @@ static void updateGLSLShader(OCIO_GLSLShader *shader,
                                      NULL,
                                      NULL,
                                      NULL,
-                                     __func__);
+                                     "OCIOShader");
 
   if (shader->shader) {
     shader->dither_loc = GPU_shader_get_uniform(shader->shader, "dither");
diff --git a/source/blender/blenkernel/intern/image_gpu.c b/source/blender/blenkernel/intern/image_gpu.c
index 183129bf9b6..083d6c1d973 100644
--- a/source/blender/blenkernel/intern/image_gpu.c
+++ b/source/blender/blenkernel/intern/image_gpu.c
@@ -247,6 +247,7 @@ static GPUTexture **get_image_gpu_texture_ptr(Image *ima,
 
 static GPUTexture *image_gpu_texture_error_create(eGPUTextureTarget textarget)
 {
+  fprintf(stderr, "GPUTexture: Blender Texture Not Loaded!\n");
   switch (textarget) {
     case TEXTARGET_2D_ARRAY:
       return GPU_texture_create_error(2, true);
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 3865407b0a7..b70b1ff036b 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -1917,6 +1917,7 @@ GPUTexture *BKE_movieclip_get_gpu_texture(MovieClip *clip, MovieClipUser *cuser)
   /* check if we have a valid image buffer */
   ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, cuser);
   if (ibuf == NULL) {
+    fprintf(stderr, "GPUTexture: Blender Texture Not Loaded!\n");
     *tex = GPU_texture_create_error(2, false);
     return *tex;
   }
diff --git a/source/blender/gpu/intern/gpu_texture.cc b/source/blender/gpu/intern/gpu_texture.cc
index 914aa8617a9..bdbf623a391 100644
--- a/source/blender/gpu/intern/gpu_texture.cc
+++ b/source/blender/gpu/intern/gpu_texture.cc
@@ -325,7 +325,6 @@ GPUTexture *GPU_texture_create_error(int dimension, bool is_array)
   type = (dimension == 2) ? (is_array ? GPU_TEXTURE_2D_ARRAY : GPU_TEXTURE_2D) : type;
   type = (dimension == 1) ? (is_array ? GPU_TEXTURE_1D_ARRAY : GPU_TEXTURE_1D) : type;
 
-  fprintf(stderr, "GPUTexture: Blender Texture Not Loaded!");
   return gpu_texture_create("invalid_tex", w, h, d, type, 1, GPU_RGBA8, pixel);
 }



More information about the Bf-blender-cvs mailing list