diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_viewport.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_viewport.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index fd1265dc2a6..bc3c30ea1c8 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -380,7 +380,7 @@ GPUTexture *GPU_viewport_texture_pool_query( } } - tex = GPU_texture_create_2d(width, height, format, NULL, NULL); + tex = GPU_texture_create_2d("temp_from_pool", width, height, 1, format, NULL); /* Doing filtering for depth does not make sense when not doing shadow mapping, * and enabling texture filtering on integer texture make them unreadable. */ bool do_filter = !GPU_texture_depth(tex) && !GPU_texture_integer(tex); @@ -453,16 +453,21 @@ static void gpu_viewport_default_fb_create(GPUViewport *viewport) int *size = viewport->size; bool ok = true; - dtxl->color = GPU_texture_create_2d(size[0], size[1], GPU_RGBA16F, NULL, NULL); - dtxl->color_overlay = GPU_texture_create_2d(size[0], size[1], GPU_SRGB8_A8, NULL, NULL); - if (((viewport->flag & GPU_VIEWPORT_STEREO) != 0)) { - dtxl->color_stereo = GPU_texture_create_2d(size[0], size[1], GPU_RGBA16F, NULL, NULL); - dtxl->color_overlay_stereo = GPU_texture_create_2d(size[0], size[1], GPU_SRGB8_A8, NULL, NULL); + dtxl->color = GPU_texture_create_2d("dtxl_color", UNPACK2(size), 1, GPU_RGBA16F, NULL); + dtxl->color_overlay = GPU_texture_create_2d( + "dtxl_color_overlay", UNPACK2(size), 1, GPU_SRGB8_A8, NULL); + + if (viewport->flag & GPU_VIEWPORT_STEREO) { + dtxl->color_stereo = GPU_texture_create_2d( + "dtxl_color_stereo", UNPACK2(size), 1, GPU_RGBA16F, NULL); + dtxl->color_overlay_stereo = GPU_texture_create_2d( + "dtxl_color_overlay_stereo", UNPACK2(size), 1, GPU_SRGB8_A8, NULL); } /* Can be shared with GPUOffscreen. */ if (dtxl->depth == NULL) { - dtxl->depth = GPU_texture_create_2d(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL); + dtxl->depth = GPU_texture_create_2d( + "dtxl_depth", UNPACK2(size), 1, GPU_DEPTH24_STENCIL8, NULL); } if (!dtxl->depth || !dtxl->color) { |