17 #define GPUvoidptr_set void *ret =
18 #define GPUvoidptr_ret return ret
20 #define GLboolean_set GLboolean ret =
21 #define GLboolean_ret return ret
26 #define DEBUG_FUNC_DECLARE(pfn, rtn_type, fn, ...) \
27 static pfn real_##fn; \
28 static rtn_type GLAPIENTRY debug_##fn(ARG_LIST(__VA_ARGS__)) \
30 debug::check_gl_error("generated before " #fn); \
31 rtn_type##_set real_##fn(ARG_LIST_CALL(__VA_ARGS__)); \
32 debug::check_gl_error("" #fn); \
45 DEBUG_FUNC_DECLARE(PFNGLBEGINTRANSFORMFEEDBACKPROC,
void, glBeginTransformFeedback, GLenum, primitiveMode);
48 DEBUG_FUNC_DECLARE(PFNGLBINDFRAMEBUFFERPROC,
void, glBindFramebuffer, GLenum, target, GLuint, framebuffer);
51 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);
52 DEBUG_FUNC_DECLARE(PFNGLBUFFERDATAPROC,
void, glBufferData, GLenum, target, GLsizeiptr,
size,
const void *,
data, GLenum, usage);
53 DEBUG_FUNC_DECLARE(PFNGLBUFFERSUBDATAPROC,
void, glBufferSubData, GLenum, target, GLintptr,
offset, GLsizeiptr,
size,
const void *,
data);
54 DEBUG_FUNC_DECLARE(PFNGLDELETEBUFFERSPROC,
void, glDeleteBuffers, GLsizei, n,
const GLuint *, buffers);
57 DEBUG_FUNC_DECLARE(PFNGLDELETEQUERIESPROC,
void, glDeleteQueries, GLsizei, n,
const GLuint *, ids);
61 DEBUG_FUNC_DECLARE(PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC,
void, glDrawArraysInstancedBaseInstance, GLenum, mode, GLint, first, GLsizei,
count, GLsizei, primcount, GLuint, baseinstance);
62 DEBUG_FUNC_DECLARE(PFNGLDRAWARRAYSINSTANCEDPROC,
void, glDrawArraysInstanced, GLenum, mode, GLint, first, GLsizei,
count, GLsizei, primcount);
64 DEBUG_FUNC_DECLARE(PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC,
void, glDrawElementsInstancedBaseVertexBaseInstance, GLenum, mode, GLsizei,
count, GLenum,
type,
const void *,
indices, GLsizei, primcount, GLint, basevertex, GLuint, baseinstance);
65 DEBUG_FUNC_DECLARE(PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC,
void, glDrawElementsInstancedBaseVertex, GLenum, mode, GLsizei,
count, GLenum,
type,
const void *,
indices, GLsizei, instancecount, GLint, basevertex);
67 DEBUG_FUNC_DECLARE(PFNGLDISPATCHCOMPUTEPROC,
void, glDispatchCompute, GLuint, num_groups_x, GLuint, num_groups_y, GLuint, num_groups_z);
68 DEBUG_FUNC_DECLARE(PFNGLDISPATCHCOMPUTEINDIRECTPROC,
void, glDispatchComputeIndirect, GLintptr, indirect);
70 DEBUG_FUNC_DECLARE(PFNGLFRAMEBUFFERTEXTURE2DPROC,
void, glFramebufferTexture2D, GLenum, target, GLenum, attachment, GLenum, textarget, GLuint, texture, GLint, level);
71 DEBUG_FUNC_DECLARE(PFNGLFRAMEBUFFERTEXTURELAYERPROC,
void, glFramebufferTextureLayer, GLenum, target, GLenum, attachment, GLuint, texture, GLint, level, GLint, layer);
72 DEBUG_FUNC_DECLARE(PFNGLFRAMEBUFFERTEXTUREPROC,
void, glFramebufferTexture, GLenum, target, GLenum, attachment, GLuint, texture, GLint, level);
75 DEBUG_FUNC_DECLARE(PFNGLGENERATETEXTUREMIPMAPPROC,
void, glGenerateTextureMipmap, GLuint, texture);
81 DEBUG_FUNC_DECLARE(PFNGLMAPBUFFERRANGEPROC,
GPUvoidptr, glMapBufferRange, GLenum, target, GLintptr,
offset, GLsizeiptr,
length, GLbitfield, access);
83 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);
84 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);
90 #undef DEBUG_FUNC_DECLARE
94 #define DEBUG_WRAP(function) \
96 real_##function = ::function; \
97 ::function = &debug_##function; \
120 DEBUG_WRAP(glDrawArraysInstancedBaseInstance);
122 DEBUG_WRAP(glDrawElementsInstancedBaseVertex);
123 DEBUG_WRAP(glDrawElementsInstancedBaseVertexBaseInstance);
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
#define DEBUG_WRAP(function)
GPUFrameBuffer * framebuffers[FRAMEBUFFER_STACK_DEPTH]
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
IconTextureDrawCall border
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_gpu_kernel_postfix int ccl_global int * indices
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
DEBUG_FUNC_DECLARE(PFNGLBEGINQUERYPROC, void, glBeginQuery, GLenum, target, GLuint, id)
T length(const vec_base< T, Size > &a)
static RawVector< RawArray< int64_t, 0 > > arrays