Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-04 19:40:01 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-05 03:26:44 +0300
commitde947c5c507e747b715877f9193efe146752ca87 (patch)
tree545a7d092f809577dc3a975c1980dd7000202009 /source/blender/gpu/intern
parent3a522f7a7ffd49ae51ccdd2b050eee6f15b98ac2 (diff)
GPUTexture: Improve debug print
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index f8d38b489e8..a332cddddb0 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -925,14 +925,16 @@ GPUTexture *GPU_texture_create_nD(int w,
&rescaled_pixels);
if (G.debug & G_DEBUG_GPU || !valid) {
- printf("GPUTexture: create : %s, %s, w : %d, h : %d, d : %d, comp : %d, size : %.2f MiB\n",
- gl_enum_to_str(tex->target),
- gl_enum_to_str(internalformat),
- w,
- h,
- d,
- tex->components,
- gpu_texture_memory_footprint_compute(tex) / 1048576.0f);
+ printf(
+ "GPUTexture: create : %s,\t w : %5d, h : %5d, d : %5d, comp : %4d, size : %.2f "
+ "MiB,\t %s\n",
+ gl_enum_to_str(tex->target),
+ w,
+ h,
+ d,
+ tex->components,
+ gpu_texture_memory_footprint_compute(tex) / 1048576.0f,
+ gl_enum_to_str(internalformat));
}
if (!valid) {
@@ -1054,14 +1056,16 @@ GPUTexture *GPU_texture_cube_create(int w,
}
if (G.debug & G_DEBUG_GPU) {
- printf("GPUTexture: create : %s, %s, w : %d, h : %d, d : %d, comp : %d, size : %.2f MiB\n",
- gl_enum_to_str(tex->target),
- gl_enum_to_str(internalformat),
- w,
- w,
- d,
- tex->components,
- gpu_texture_memory_footprint_compute(tex) / 1048576.0f);
+ printf(
+ "GPUTexture: create : %s,\t w : %5d, h : %5d, d : %5d, comp : %4d, size : %.2f "
+ "MiB,\t %s\n",
+ gl_enum_to_str(tex->target),
+ w,
+ w,
+ d * 6,
+ tex->components,
+ gpu_texture_memory_footprint_compute(tex) / 1048576.0f,
+ gl_enum_to_str(internalformat));
}
gpu_texture_memory_footprint_add(tex);