Blender  V3.3
Functions | Variables
blender::gpu::debug Namespace Reference

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)
 
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 UNUSED(source), GLenum type, GLuint UNUSED(id), GLenum severity, GLsizei UNUSED(length), const GLchar *message, const GLvoid *UNUSED(userParm))
 
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 181 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()

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

◆ debug_callback()

static void APIENTRY blender::gpu::debug::debug_callback ( GLenum   UNUSEDsource,
GLenum  type,
GLuint   UNUSEDid,
GLenum  severity,
GLsizei   UNUSEDlength,
const GLchar *  message,
const GLvoid *  UNUSEDuserParm 
)
static

◆ 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  ,
,
const GLuint *  ,
buffers   
)

◆ DEBUG_FUNC_DECLARE() [12/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLDELETEFRAMEBUFFERSPROC  ,
void  ,
glDeleteFramebuffers  ,
GLsizei  ,
,
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  ,
,
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  ,
,
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  ,
,
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  ,
,
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  ,
,
GLuint *  ,
framebuffers   
)

◆ DEBUG_FUNC_DECLARE() [34/44]

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

◆ DEBUG_FUNC_DECLARE() [35/44]

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

◆ DEBUG_FUNC_DECLARE() [36/44]

blender::gpu::debug::DEBUG_FUNC_DECLARE ( PFNGLGENVERTEXARRAYSPROC  ,
void  ,
glGenVertexArrays  ,
GLsizei  ,
,
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 92 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 134 of file gl_debug.cc.

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

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

◆ mtl_debug_init()

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

Definition at line 30 of file mtl_debug.mm.

References CLOG_ENSURE, and LOG.

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

◆ object_label()

void blender::gpu::debug::object_label ( GLenum  type,
GLuint  object,
const char *  name 
)

◆ raise_gl_error()

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

◆ to_str_prefix()

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

Definition at line 289 of file gl_debug.cc.

References type.

Referenced by object_label().

◆ to_str_suffix()

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

Definition at line 314 of file gl_debug.cc.

References type.

Referenced by object_label().

Variable Documentation

◆ LOG

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

Definition at line 28 of file mtl_debug.mm.

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