Blender V4.3
blender::gpu::debug Namespace Reference

Classes

class  VKDebuggingTools
 

Functions

void mtl_debug_init ()
 
void init_debug_layer ()
 
 DEBUG_FUNC_DECLARE (PFNGLBEGINQUERYPROC, void, glBeginQuery, GLenum, target, GLuint, id)
 
 DEBUG_FUNC_DECLARE (PFNGLBEGINTRANSFORMFEEDBACKPROC, void, glBeginTransformFeedback, GLenum, primitiveMode)
 
 DEBUG_FUNC_DECLARE (PFNGLBINDBUFFERBASEPROC, void, glBindBufferBase, GLenum, target, GLuint, index, GLuint, buffer)
 
 DEBUG_FUNC_DECLARE (PFNGLBINDBUFFERPROC, void, glBindBuffer, GLenum, target, GLuint, buffer)
 
 DEBUG_FUNC_DECLARE (PFNGLBINDFRAMEBUFFERPROC, void, glBindFramebuffer, GLenum, target, GLuint, framebuffer)
 
 DEBUG_FUNC_DECLARE (PFNGLBINDSAMPLERPROC, void, glBindSampler, GLuint, unit, GLuint, sampler)
 
 DEBUG_FUNC_DECLARE (PFNGLBINDVERTEXARRAYPROC, void, glBindVertexArray, GLuint, array)
 
 DEBUG_FUNC_DECLARE (PFNGLBLITFRAMEBUFFERPROC, void, glBlitFramebuffer, GLint, srcX0, GLint, srcY0, GLint, srcX1, GLint, srcY1, GLint, dstX0, GLint, dstY0, GLint, dstX1, GLint, dstY1, GLbitfield, mask, GLenum, filter)
 
 DEBUG_FUNC_DECLARE (PFNGLBUFFERDATAPROC, void, glBufferData, GLenum, target, GLsizeiptr, size, const void *, data, GLenum, usage)
 
 DEBUG_FUNC_DECLARE (PFNGLBUFFERSUBDATAPROC, void, glBufferSubData, GLenum, target, GLintptr, offset, GLsizeiptr, size, const void *, data)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETEBUFFERSPROC, void, glDeleteBuffers, GLsizei, n, const GLuint *, buffers)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETEFRAMEBUFFERSPROC, void, glDeleteFramebuffers, GLsizei, n, const GLuint *, framebuffers)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETEPROGRAMPROC, void, glDeleteProgram, GLuint, program)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETEQUERIESPROC, void, glDeleteQueries, GLsizei, n, const GLuint *, ids)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETESAMPLERSPROC, void, glDeleteSamplers, GLsizei, count, const GLuint *, samplers)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETESHADERPROC, void, glDeleteShader, GLuint, shader)
 
 DEBUG_FUNC_DECLARE (PFNGLDELETEVERTEXARRAYSPROC, void, glDeleteVertexArrays, GLsizei, n, const GLuint *, arrays)
 
 DEBUG_FUNC_DECLARE (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC, void, glDrawArraysInstancedBaseInstance, GLenum, mode, GLint, first, GLsizei, count, GLsizei, primcount, GLuint, baseinstance)
 
 DEBUG_FUNC_DECLARE (PFNGLDRAWARRAYSINSTANCEDPROC, void, glDrawArraysInstanced, GLenum, mode, GLint, first, GLsizei, count, GLsizei, primcount)
 
 DEBUG_FUNC_DECLARE (PFNGLDRAWBUFFERSPROC, void, glDrawBuffers, GLsizei, n, const GLenum *, bufs)
 
 DEBUG_FUNC_DECLARE (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC, void, glDrawElementsInstancedBaseVertexBaseInstance, GLenum, mode, GLsizei, count, GLenum, type, const void *, indices, GLsizei, primcount, GLint, basevertex, GLuint, baseinstance)
 
 DEBUG_FUNC_DECLARE (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC, void, glDrawElementsInstancedBaseVertex, GLenum, mode, GLsizei, count, GLenum, type, const void *, indices, GLsizei, instancecount, GLint, basevertex)
 
 DEBUG_FUNC_DECLARE (PFNGLENDQUERYPROC, void, glEndQuery, GLenum, target)
 
 DEBUG_FUNC_DECLARE (PFNGLDISPATCHCOMPUTEPROC, void, glDispatchCompute, GLuint, num_groups_x, GLuint, num_groups_y, GLuint, num_groups_z)
 
 DEBUG_FUNC_DECLARE (PFNGLDISPATCHCOMPUTEINDIRECTPROC, void, glDispatchComputeIndirect, GLintptr, indirect)
 
 DEBUG_FUNC_DECLARE (PFNGLENDTRANSFORMFEEDBACKPROC, void, glEndTransformFeedback, void)
 
 DEBUG_FUNC_DECLARE (PFNGLFRAMEBUFFERTEXTURE2DPROC, void, glFramebufferTexture2D, GLenum, target, GLenum, attachment, GLenum, textarget, GLuint, texture, GLint, level)
 
 DEBUG_FUNC_DECLARE (PFNGLFRAMEBUFFERTEXTURELAYERPROC, void, glFramebufferTextureLayer, GLenum, target, GLenum, attachment, GLuint, texture, GLint, level, GLint, layer)
 
 DEBUG_FUNC_DECLARE (PFNGLFRAMEBUFFERTEXTUREPROC, void, glFramebufferTexture, GLenum, target, GLenum, attachment, GLuint, texture, GLint, level)
 
 DEBUG_FUNC_DECLARE (PFNGLGENBUFFERSPROC, void, glGenBuffers, GLsizei, n, GLuint *, buffers)
 
 DEBUG_FUNC_DECLARE (PFNGLGENERATEMIPMAPPROC, void, glGenerateMipmap, GLenum, target)
 
 DEBUG_FUNC_DECLARE (PFNGLGENERATETEXTUREMIPMAPPROC, void, glGenerateTextureMipmap, GLuint, texture)
 
 DEBUG_FUNC_DECLARE (PFNGLGENFRAMEBUFFERSPROC, void, glGenFramebuffers, GLsizei, n, GLuint *, framebuffers)
 
 DEBUG_FUNC_DECLARE (PFNGLGENQUERIESPROC, void, glGenQueries, GLsizei, n, GLuint *, ids)
 
 DEBUG_FUNC_DECLARE (PFNGLGENSAMPLERSPROC, void, glGenSamplers, GLsizei, n, GLuint *, samplers)
 
 DEBUG_FUNC_DECLARE (PFNGLGENVERTEXARRAYSPROC, void, glGenVertexArrays, GLsizei, n, GLuint *, arrays)
 
 DEBUG_FUNC_DECLARE (PFNGLLINKPROGRAMPROC, void, glLinkProgram, GLuint, program)
 
 DEBUG_FUNC_DECLARE (PFNGLMAPBUFFERRANGEPROC, GPUvoidptr, glMapBufferRange, GLenum, target, GLintptr, offset, GLsizeiptr, length, GLbitfield, access)
 
 DEBUG_FUNC_DECLARE (PFNGLTEXBUFFERPROC, void, glTexBuffer, GLenum, target, GLenum, internalFormat, GLuint, buffer)
 
 DEBUG_FUNC_DECLARE (PFNGLTEXIMAGE3DPROC, void, glTexImage3D, GLenum, target, GLint, level, GLint, internalFormat, GLsizei, width, GLsizei, height, GLsizei, depth, GLint, border, GLenum, format, GLenum, type, const GLvoid *, pixels)
 
 DEBUG_FUNC_DECLARE (PFNGLTEXSUBIMAGE3DPROC, void, glTexSubImage3D, GLenum, target, GLint, level, GLint, xoffset, GLint, yoffset, GLint, zoffset, GLsizei, width, GLsizei, height, GLsizei, depth, GLenum, format, GLenum, type, const GLvoid *, pixels)
 
 DEBUG_FUNC_DECLARE (PFNGLTEXTUREBUFFERPROC, void, glTextureBuffer, GLuint, texture, GLenum, internalformat, GLuint, buffer)
 
 DEBUG_FUNC_DECLARE (PFNGLUNMAPBUFFERPROC, GLboolean, glUnmapBuffer, GLenum, target)
 
 DEBUG_FUNC_DECLARE (PFNGLUSEPROGRAMPROC, void, glUseProgram, GLuint, program)
 
void object_label (VkObjectType vk_object_type, uint64_t object_handle, const char *name)
 
static VKAPI_ATTR VkBool32 VKAPI_CALL messenger_callback (VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, VkDebugUtilsMessageTypeFlagsEXT, const VkDebugUtilsMessengerCallbackDataEXT *callback_data, void *user_data)
 
template<typename T >
void object_label (T vk_object_type, const char *name)
 
void raise_message (int32_t id_number, VkDebugUtilsMessageSeverityFlagBitsEXT vk_severity_flag_bits, const char *fmt,...) ATTR_PRINTF_FORMAT(3
 
Debug Callbacks

Hooks up debug callbacks to a debug OpenGL context using extensions or 4.3 core debug capabilities.

static void APIENTRY debug_callback (GLenum, GLenum type, GLuint, GLenum severity, GLsizei, const GLchar *message, const GLvoid *)
 
void init_gl_callbacks ()
 
Error Checking

This is only useful for implementation that does not support the KHR_debug extension OR when the implementations do not report any errors even when clearly doing shady things.

void check_gl_error (const char *info)
 
void check_gl_resources (const char *info)
 
void raise_gl_error (const char *info)
 
Object Label

Useful for debugging through render-doc. Only defined if using --debug-gpu. Make sure to bind the object first so that it gets defined by the GL implementation.

static const char * to_str_prefix (GLenum type)
 
static const char * to_str_suffix (GLenum type)
 
void object_label (GLenum type, GLuint object, const char *name)
 

Variables

CLG_LogRef LOG = {"gpu.debug.metal"}
 

Function Documentation

◆ check_gl_error()

void blender::gpu::debug::check_gl_error ( const char * info)

Definition at line 182 of file gl_debug.cc.

References debug_callback(), error(), ERROR_CASE, G, G_DEBUG_GPU, and SNPRINTF.

Referenced by blender::gpu::detect_mip_render_workaround().

◆ check_gl_resources()

◆ debug_callback()

◆ DEBUG_FUNC_DECLARE() [1/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBEGINQUERYPROC ,
void ,
glBeginQuery ,
GLenum ,
target ,
GLuint ,
id  )

◆ DEBUG_FUNC_DECLARE() [2/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBEGINTRANSFORMFEEDBACKPROC ,
void ,
glBeginTransformFeedback ,
GLenum ,
primitiveMode  )

◆ DEBUG_FUNC_DECLARE() [3/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBINDBUFFERBASEPROC ,
void ,
glBindBufferBase ,
GLenum ,
target ,
GLuint ,
index ,
GLuint ,
buffer  )

◆ DEBUG_FUNC_DECLARE() [4/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBINDBUFFERPROC ,
void ,
glBindBuffer ,
GLenum ,
target ,
GLuint ,
buffer  )

◆ DEBUG_FUNC_DECLARE() [5/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBINDFRAMEBUFFERPROC ,
void ,
glBindFramebuffer ,
GLenum ,
target ,
GLuint ,
framebuffer  )

◆ DEBUG_FUNC_DECLARE() [6/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBINDSAMPLERPROC ,
void ,
glBindSampler ,
GLuint ,
unit ,
GLuint ,
sampler  )

◆ DEBUG_FUNC_DECLARE() [7/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBINDVERTEXARRAYPROC ,
void ,
glBindVertexArray ,
GLuint ,
array  )

◆ DEBUG_FUNC_DECLARE() [8/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBLITFRAMEBUFFERPROC ,
void ,
glBlitFramebuffer ,
GLint ,
srcX0 ,
GLint ,
srcY0 ,
GLint ,
srcX1 ,
GLint ,
srcY1 ,
GLint ,
dstX0 ,
GLint ,
dstY0 ,
GLint ,
dstX1 ,
GLint ,
dstY1 ,
GLbitfield ,
mask ,
GLenum ,
filter  )

◆ DEBUG_FUNC_DECLARE() [9/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBUFFERDATAPROC ,
void ,
glBufferData ,
GLenum ,
target ,
GLsizeiptr ,
size ,
const void * ,
data ,
GLenum ,
usage  )

◆ DEBUG_FUNC_DECLARE() [10/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLBUFFERSUBDATAPROC ,
void ,
glBufferSubData ,
GLenum ,
target ,
GLintptr ,
offset ,
GLsizeiptr ,
size ,
const void * ,
data  )

◆ DEBUG_FUNC_DECLARE() [11/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETEBUFFERSPROC ,
void ,
glDeleteBuffers ,
GLsizei ,
n ,
const GLuint * ,
buffers  )

◆ DEBUG_FUNC_DECLARE() [12/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETEFRAMEBUFFERSPROC ,
void ,
glDeleteFramebuffers ,
GLsizei ,
n ,
const GLuint * ,
framebuffers  )

◆ DEBUG_FUNC_DECLARE() [13/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETEPROGRAMPROC ,
void ,
glDeleteProgram ,
GLuint ,
program  )

◆ DEBUG_FUNC_DECLARE() [14/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETEQUERIESPROC ,
void ,
glDeleteQueries ,
GLsizei ,
n ,
const GLuint * ,
ids  )

◆ DEBUG_FUNC_DECLARE() [15/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETESAMPLERSPROC ,
void ,
glDeleteSamplers ,
GLsizei ,
count ,
const GLuint * ,
samplers  )

◆ DEBUG_FUNC_DECLARE() [16/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETESHADERPROC ,
void ,
glDeleteShader ,
GLuint ,
shader  )

◆ DEBUG_FUNC_DECLARE() [17/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETEVERTEXARRAYSPROC ,
void ,
glDeleteVertexArrays ,
GLsizei ,
n ,
const GLuint * ,
arrays  )

◆ DEBUG_FUNC_DECLARE() [18/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDISPATCHCOMPUTEINDIRECTPROC ,
void ,
glDispatchComputeIndirect ,
GLintptr ,
indirect  )

◆ DEBUG_FUNC_DECLARE() [19/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDISPATCHCOMPUTEPROC ,
void ,
glDispatchCompute ,
GLuint ,
num_groups_x ,
GLuint ,
num_groups_y ,
GLuint ,
num_groups_z  )

◆ DEBUG_FUNC_DECLARE() [20/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC ,
void ,
glDrawArraysInstancedBaseInstance ,
GLenum ,
mode ,
GLint ,
first ,
GLsizei ,
count ,
GLsizei ,
primcount ,
GLuint ,
baseinstance  )

◆ DEBUG_FUNC_DECLARE() [21/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDRAWARRAYSINSTANCEDPROC ,
void ,
glDrawArraysInstanced ,
GLenum ,
mode ,
GLint ,
first ,
GLsizei ,
count ,
GLsizei ,
primcount  )

◆ DEBUG_FUNC_DECLARE() [22/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDRAWBUFFERSPROC ,
void ,
glDrawBuffers ,
GLsizei ,
n ,
const GLenum * ,
bufs  )

◆ DEBUG_FUNC_DECLARE() [23/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC ,
void ,
glDrawElementsInstancedBaseVertexBaseInstance ,
GLenum ,
mode ,
GLsizei ,
count ,
GLenum ,
type ,
const void * ,
indices ,
GLsizei ,
primcount ,
GLint ,
basevertex ,
GLuint ,
baseinstance  )

◆ DEBUG_FUNC_DECLARE() [24/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC ,
void ,
glDrawElementsInstancedBaseVertex ,
GLenum ,
mode ,
GLsizei ,
count ,
GLenum ,
type ,
const void * ,
indices ,
GLsizei ,
instancecount ,
GLint ,
basevertex  )

◆ DEBUG_FUNC_DECLARE() [25/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLENDQUERYPROC ,
void ,
glEndQuery ,
GLenum ,
target  )

◆ DEBUG_FUNC_DECLARE() [26/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLENDTRANSFORMFEEDBACKPROC ,
void ,
glEndTransformFeedback ,
void  )

◆ DEBUG_FUNC_DECLARE() [27/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLFRAMEBUFFERTEXTURE2DPROC ,
void ,
glFramebufferTexture2D ,
GLenum ,
target ,
GLenum ,
attachment ,
GLenum ,
textarget ,
GLuint ,
texture ,
GLint ,
level  )

◆ DEBUG_FUNC_DECLARE() [28/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLFRAMEBUFFERTEXTURELAYERPROC ,
void ,
glFramebufferTextureLayer ,
GLenum ,
target ,
GLenum ,
attachment ,
GLuint ,
texture ,
GLint ,
level ,
GLint ,
layer  )

◆ DEBUG_FUNC_DECLARE() [29/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLFRAMEBUFFERTEXTUREPROC ,
void ,
glFramebufferTexture ,
GLenum ,
target ,
GLenum ,
attachment ,
GLuint ,
texture ,
GLint ,
level  )

◆ DEBUG_FUNC_DECLARE() [30/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENBUFFERSPROC ,
void ,
glGenBuffers ,
GLsizei ,
n ,
GLuint * ,
buffers  )

◆ DEBUG_FUNC_DECLARE() [31/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENERATEMIPMAPPROC ,
void ,
glGenerateMipmap ,
GLenum ,
target  )

◆ DEBUG_FUNC_DECLARE() [32/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENERATETEXTUREMIPMAPPROC ,
void ,
glGenerateTextureMipmap ,
GLuint ,
texture  )

◆ DEBUG_FUNC_DECLARE() [33/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENFRAMEBUFFERSPROC ,
void ,
glGenFramebuffers ,
GLsizei ,
n ,
GLuint * ,
framebuffers  )

◆ DEBUG_FUNC_DECLARE() [34/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENQUERIESPROC ,
void ,
glGenQueries ,
GLsizei ,
n ,
GLuint * ,
ids  )

◆ DEBUG_FUNC_DECLARE() [35/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENSAMPLERSPROC ,
void ,
glGenSamplers ,
GLsizei ,
n ,
GLuint * ,
samplers  )

◆ DEBUG_FUNC_DECLARE() [36/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENVERTEXARRAYSPROC ,
void ,
glGenVertexArrays ,
GLsizei ,
n ,
GLuint * ,
arrays  )

◆ DEBUG_FUNC_DECLARE() [37/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLLINKPROGRAMPROC ,
void ,
glLinkProgram ,
GLuint ,
program  )

◆ DEBUG_FUNC_DECLARE() [38/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLMAPBUFFERRANGEPROC ,
GPUvoidptr ,
glMapBufferRange ,
GLenum ,
target ,
GLintptr ,
offset ,
GLsizeiptr ,
length ,
GLbitfield ,
access  )

◆ DEBUG_FUNC_DECLARE() [39/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLTEXBUFFERPROC ,
void ,
glTexBuffer ,
GLenum ,
target ,
GLenum ,
internalFormat ,
GLuint ,
buffer  )

◆ DEBUG_FUNC_DECLARE() [40/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLTEXIMAGE3DPROC ,
void ,
glTexImage3D ,
GLenum ,
target ,
GLint ,
level ,
GLint ,
internalFormat ,
GLsizei ,
width ,
GLsizei ,
height ,
GLsizei ,
depth ,
GLint ,
border ,
GLenum ,
format ,
GLenum ,
type ,
const GLvoid * ,
pixels  )

◆ DEBUG_FUNC_DECLARE() [41/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLTEXSUBIMAGE3DPROC ,
void ,
glTexSubImage3D ,
GLenum ,
target ,
GLint ,
level ,
GLint ,
xoffset ,
GLint ,
yoffset ,
GLint ,
zoffset ,
GLsizei ,
width ,
GLsizei ,
height ,
GLsizei ,
depth ,
GLenum ,
format ,
GLenum ,
type ,
const GLvoid * ,
pixels  )

◆ DEBUG_FUNC_DECLARE() [42/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLTEXTUREBUFFERPROC ,
void ,
glTextureBuffer ,
GLuint ,
texture ,
GLenum ,
internalformat ,
GLuint ,
buffer  )

◆ DEBUG_FUNC_DECLARE() [43/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLUNMAPBUFFERPROC ,
GLboolean ,
glUnmapBuffer ,
GLenum ,
target  )

◆ DEBUG_FUNC_DECLARE() [44/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLUSEPROGRAMPROC ,
void ,
glUseProgram ,
GLuint ,
program  )

◆ init_debug_layer()

void blender::gpu::debug::init_debug_layer ( )

Initialize a fallback layer (to KHR_debug) that covers only some functions. We override the functions pointers by our own implementation that just checks #glGetError. Some additional functions (not overridable) are covered inside the header using wrappers.

Definition at line 93 of file gl_debug_layer.cc.

References DEBUG_WRAP.

Referenced by init_gl_callbacks().

◆ init_gl_callbacks()

void blender::gpu::debug::init_gl_callbacks ( )

This function needs to be called once per context.

Definition at line 135 of file gl_debug.cc.

References CLOG_ENSURE, CLOG_STR_WARN, debug_callback(), init_debug_layer(), LOG, and SNPRINTF.

Referenced by blender::gpu::GLContext::GLContext().

◆ messenger_callback()

static VKAPI_ATTR VkBool32 VKAPI_CALL blender::gpu::debug::messenger_callback ( VkDebugUtilsMessageSeverityFlagBitsEXT message_severity,
VkDebugUtilsMessageTypeFlagsEXT ,
const VkDebugUtilsMessengerCallbackDataEXT * callback_data,
void * user_data )
static

◆ mtl_debug_init()

void blender::gpu::debug::mtl_debug_init ( )

Definition at line 32 of file mtl_debug.mm.

References CLOG_ENSURE, and LOG.

Referenced by blender::gpu::MTLContext::MTLContext().

◆ object_label() [1/3]

◆ object_label() [2/3]

template<typename T >
void blender::gpu::debug::object_label ( T vk_object_type,
const char * name )

Definition at line 37 of file vk_debug.hh.

References G, G_DEBUG_GPU, label, object_label(), SNPRINTF, and blender::gpu::to_vk_object_type().

◆ object_label() [3/3]

void blender::gpu::debug::object_label ( VkObjectType vk_object_type,
uint64_t object_handle,
const char * name )

◆ raise_gl_error()

void blender::gpu::debug::raise_gl_error ( const char * info)

◆ raise_message()

void blender::gpu::debug::raise_message ( int32_t id_number,
VkDebugUtilsMessageSeverityFlagBitsEXT vk_severity_flag_bits,
const char * fmt,
... )

How to use:

debug::raise_message(0xB41ca2, VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT,
"This is a raise message. %llx", (uintptr_t)vk_object);
void raise_message(int32_t id_number, VkDebugUtilsMessageSeverityFlagBitsEXT vk_severity_flag_bits, const char *fmt,...) ATTR_PRINTF_FORMAT(3
_W64 unsigned int uintptr_t
Definition stdint.h:119

◆ to_str_prefix()

static const char * blender::gpu::debug::to_str_prefix ( GLenum type)
static

Definition at line 305 of file gl_debug.cc.

Referenced by object_label().

◆ to_str_suffix()

static const char * blender::gpu::debug::to_str_suffix ( GLenum type)
static

Definition at line 330 of file gl_debug.cc.

Referenced by object_label().

Variable Documentation

◆ LOG

CLG_LogRef blender::gpu::debug::LOG = {"gpu.debug.metal"}

Definition at line 30 of file mtl_debug.mm.

Referenced by debug_callback(), init_gl_callbacks(), and mtl_debug_init().