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>2018-12-12 00:30:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-12 00:30:41 +0300
commitb7933cc60195b5e96878aaab7045db6cf81b2dba (patch)
tree890378656f4566e3e5805e561d10d5b5d6a0d199 /source/blender/gpu/intern/gpu_texture.c
parent70d38a996eb507dd9e35c265153934191ccba855 (diff)
GPUTexture: Add debug print for cubemap textures
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture.c')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 75eb17546ac..d3642c8f31b 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -138,6 +138,7 @@ static const char *gl_enum_to_str(GLenum e)
{
#define ENUM_TO_STRING(e) [GL_##e] = STRINGIFY_ARG(e)
static const char *enum_strings[] = {
+ ENUM_TO_STRING(TEXTURE_CUBE_MAP),
ENUM_TO_STRING(TEXTURE_2D),
ENUM_TO_STRING(TEXTURE_2D_ARRAY),
ENUM_TO_STRING(TEXTURE_1D),
@@ -764,6 +765,13 @@ static GPUTexture *GPU_texture_cube_create(
return NULL;
}
+ 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);
+ }
+
gpu_texture_memory_footprint_add(tex);
glBindTexture(tex->target, tex->bindcode);