35 #define GPUvoidptr_set void *ret =
36 #define GPUvoidptr_ret return ret
38 #define GLboolean_set GLboolean ret =
39 #define GLboolean_ret return ret
44 #define DEBUG_FUNC_DECLARE(pfn, rtn_type, fn, ...) \
45 static pfn real_##fn; \
46 static rtn_type GLAPIENTRY debug_##fn(ARG_LIST(__VA_ARGS__)) \
48 debug::check_gl_error("generated before " #fn); \
49 rtn_type##_set real_##fn(ARG_LIST_CALL(__VA_ARGS__)); \
50 debug::check_gl_error("" #fn); \
63 DEBUG_FUNC_DECLARE(PFNGLBEGINTRANSFORMFEEDBACKPROC,
void, glBeginTransformFeedback, GLenum, primitiveMode);
66 DEBUG_FUNC_DECLARE(PFNGLBINDFRAMEBUFFERPROC,
void, glBindFramebuffer, GLenum, target, GLuint, framebuffer);
69 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);
70 DEBUG_FUNC_DECLARE(PFNGLBUFFERDATAPROC,
void, glBufferData, GLenum, target, GLsizeiptr,
size,
const void *,
data, GLenum, usage);
71 DEBUG_FUNC_DECLARE(PFNGLBUFFERSUBDATAPROC,
void, glBufferSubData, GLenum, target, GLintptr, offset, GLsizeiptr,
size,
const void *,
data);
72 DEBUG_FUNC_DECLARE(PFNGLDELETEBUFFERSPROC,
void, glDeleteBuffers, GLsizei, n,
const GLuint *, buffers);
75 DEBUG_FUNC_DECLARE(PFNGLDELETEQUERIESPROC,
void, glDeleteQueries, GLsizei, n,
const GLuint *, ids);
79 DEBUG_FUNC_DECLARE(PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC,
void, glDrawArraysInstancedBaseInstance, GLenum, mode, GLint, first, GLsizei,
count, GLsizei, primcount, GLuint, baseinstance);
80 DEBUG_FUNC_DECLARE(PFNGLDRAWARRAYSINSTANCEDPROC,
void, glDrawArraysInstanced, GLenum, mode, GLint, first, GLsizei,
count, GLsizei, primcount);
82 DEBUG_FUNC_DECLARE(PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC,
void, glDrawElementsInstancedBaseVertexBaseInstance, GLenum, mode, GLsizei,
count, GLenum,
type,
const void *,
indices, GLsizei, primcount, GLint, basevertex, GLuint, baseinstance);
83 DEBUG_FUNC_DECLARE(PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC,
void, glDrawElementsInstancedBaseVertex, GLenum, mode, GLsizei,
count, GLenum,
type,
const void *,
indices, GLsizei, instancecount, GLint, basevertex);
86 DEBUG_FUNC_DECLARE(PFNGLFRAMEBUFFERTEXTURE2DPROC,
void, glFramebufferTexture2D, GLenum, target, GLenum, attachment, GLenum, textarget, GLuint,
texture, GLint, level);
87 DEBUG_FUNC_DECLARE(PFNGLFRAMEBUFFERTEXTURELAYERPROC,
void, glFramebufferTextureLayer, GLenum, target, GLenum, attachment, GLuint,
texture, GLint, level, GLint, layer);
88 DEBUG_FUNC_DECLARE(PFNGLFRAMEBUFFERTEXTUREPROC,
void, glFramebufferTexture, GLenum, target, GLenum, attachment, GLuint,
texture, GLint, level);
97 DEBUG_FUNC_DECLARE(PFNGLMAPBUFFERRANGEPROC,
GPUvoidptr, glMapBufferRange, GLenum, target, GLintptr, offset, GLsizeiptr,
length, GLbitfield, access);
99 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);
100 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);
106 #undef DEBUG_FUNC_DECLARE
115 #define DEBUG_WRAP(function) \
117 real_##function = ::function; \
118 ::function = &debug_##function; \
139 DEBUG_WRAP(glDrawArraysInstancedBaseInstance);
141 DEBUG_WRAP(glDrawElementsInstancedBaseVertex);
142 DEBUG_WRAP(glDrawElementsInstancedBaseVertexBaseInstance);
_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
_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 height
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
#define DEBUG_WRAP(function)
GPUFrameBuffer * framebuffers[FRAMEBUFFER_STACK_DEPTH]
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
IconTextureDrawCall border
void KERNEL_FUNCTION_FULL_NAME() shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int filter, int i, int offset, int sample)
__kernel void ccl_constant KernelData ccl_global void ccl_global char ccl_global int ccl_global char ccl_global unsigned int ccl_global float * buffer
void init_debug_layer(void)
DEBUG_FUNC_DECLARE(PFNGLBEGINQUERYPROC, void, glBeginQuery, GLenum, target, GLuint, id)
static RawVector< RawArray< int64_t, 0 > > arrays
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)