/*
* eglGetError dispatcher. id = 1
*/
-static void yagl_func_eglGetError(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglGetError(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLint ret = yagl_host_eglGetError();
YAGL_LOG_FUNC_EXIT_SPLIT(EGLint, ret);
yagl_marshal_put_EGLint(&in_buff, ret);
+ return out_buff;
}
/*
* eglGetDisplay dispatcher. id = 2
*/
-static void yagl_func_eglGetDisplay(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglGetDisplay(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
yagl_host_handle ret = yagl_host_eglGetDisplay(display_id);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, ret);
yagl_marshal_put_host_handle(&in_buff, ret);
+ return out_buff;
}
/*
* eglInitialize dispatcher. id = 3
*/
-static void yagl_func_eglInitialize(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglInitialize(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglInitialize(dpy, major, minor);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglTerminate dispatcher. id = 4
*/
-static void yagl_func_eglTerminate(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglTerminate(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglTerminate(dpy);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglGetConfigs dispatcher. id = 5
*/
-static void yagl_func_eglGetConfigs(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglGetConfigs(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglGetConfigs(dpy, configs, config_size, num_config);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglChooseConfig dispatcher. id = 6
*/
-static void yagl_func_eglChooseConfig(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglChooseConfig(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglChooseConfig(dpy, attrib_list, configs, config_size, num_config);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglGetConfigAttrib dispatcher. id = 7
*/
-static void yagl_func_eglGetConfigAttrib(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglGetConfigAttrib(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglGetConfigAttrib(dpy, config, attribute, value);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglDestroySurface dispatcher. id = 8
*/
-static void yagl_func_eglDestroySurface(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglDestroySurface(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglDestroySurface(dpy, surface);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglQuerySurface dispatcher. id = 9
*/
-static void yagl_func_eglQuerySurface(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglQuerySurface(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglQuerySurface(dpy, surface, attribute, value);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglBindAPI dispatcher. id = 10
*/
-static void yagl_func_eglBindAPI(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglBindAPI(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglBindAPI(api);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglQueryAPI dispatcher. id = 11
*/
-static void yagl_func_eglQueryAPI(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglQueryAPI(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLenum ret = yagl_host_eglQueryAPI();
YAGL_LOG_FUNC_EXIT_SPLIT(EGLenum, ret);
yagl_marshal_put_EGLenum(&in_buff, ret);
+ return out_buff;
}
/*
* eglWaitClient dispatcher. id = 12
*/
-static void yagl_func_eglWaitClient(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglWaitClient(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglWaitClient();
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglReleaseThread dispatcher. id = 13
*/
-static void yagl_func_eglReleaseThread(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglReleaseThread(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglReleaseThread();
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglCreatePbufferFromClientBuffer dispatcher. id = 14
*/
-static void yagl_func_eglCreatePbufferFromClientBuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglCreatePbufferFromClientBuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
yagl_host_handle ret = yagl_host_eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, ret);
yagl_marshal_put_host_handle(&in_buff, ret);
+ return out_buff;
}
/*
* eglSurfaceAttrib dispatcher. id = 15
*/
-static void yagl_func_eglSurfaceAttrib(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglSurfaceAttrib(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglSurfaceAttrib(dpy, surface, attribute, value);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglBindTexImage dispatcher. id = 16
*/
-static void yagl_func_eglBindTexImage(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglBindTexImage(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglBindTexImage(dpy, surface, buffer);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglReleaseTexImage dispatcher. id = 17
*/
-static void yagl_func_eglReleaseTexImage(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglReleaseTexImage(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglReleaseTexImage(dpy, surface, buffer);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglSwapInterval dispatcher. id = 18
*/
-static void yagl_func_eglSwapInterval(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglSwapInterval(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglSwapInterval(dpy, interval);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglCreateContext dispatcher. id = 19
*/
-static void yagl_func_eglCreateContext(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglCreateContext(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
yagl_host_handle ret = yagl_host_eglCreateContext(dpy, config, share_context, attrib_list);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, ret);
yagl_marshal_put_host_handle(&in_buff, ret);
+ return out_buff;
}
/*
* eglDestroyContext dispatcher. id = 20
*/
-static void yagl_func_eglDestroyContext(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglDestroyContext(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglDestroyContext(dpy, ctx);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglMakeCurrent dispatcher. id = 21
*/
-static void yagl_func_eglMakeCurrent(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglMakeCurrent(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglMakeCurrent(dpy, draw, read, ctx);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglQueryContext dispatcher. id = 22
*/
-static void yagl_func_eglQueryContext(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglQueryContext(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglQueryContext(dpy, ctx, attribute, value);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglWaitGL dispatcher. id = 23
*/
-static void yagl_func_eglWaitGL(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglWaitGL(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglWaitGL();
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglWaitNative dispatcher. id = 24
*/
-static void yagl_func_eglWaitNative(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglWaitNative(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglWaitNative(engine);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglSwapBuffers dispatcher. id = 25
*/
-static void yagl_func_eglSwapBuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglSwapBuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglSwapBuffers(dpy, surface);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglCopyBuffers dispatcher. id = 26
*/
-static void yagl_func_eglCopyBuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglCopyBuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglCopyBuffers(dpy, surface, target);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
/*
* eglCreateWindowSurfaceOffscreenYAGL dispatcher. id = 27
*/
-static void yagl_func_eglCreateWindowSurfaceOffscreenYAGL(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglCreateWindowSurfaceOffscreenYAGL(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
yagl_host_handle ret = yagl_host_eglCreateWindowSurfaceOffscreenYAGL(dpy, config, width, height, bpp, pixels, attrib_list);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, ret);
yagl_marshal_put_host_handle(&in_buff, ret);
+ return out_buff;
}
/*
* eglCreatePbufferSurfaceOffscreenYAGL dispatcher. id = 28
*/
-static void yagl_func_eglCreatePbufferSurfaceOffscreenYAGL(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglCreatePbufferSurfaceOffscreenYAGL(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
yagl_host_handle ret = yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(dpy, config, width, height, bpp, pixels, attrib_list);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, ret);
yagl_marshal_put_host_handle(&in_buff, ret);
+ return out_buff;
}
/*
* eglCreatePixmapSurfaceOffscreenYAGL dispatcher. id = 29
*/
-static void yagl_func_eglCreatePixmapSurfaceOffscreenYAGL(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglCreatePixmapSurfaceOffscreenYAGL(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
yagl_host_handle ret = yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(dpy, config, width, height, bpp, pixels, attrib_list);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, ret);
yagl_marshal_put_host_handle(&in_buff, ret);
+ return out_buff;
}
/*
* eglResizeOffscreenSurfaceYAGL dispatcher. id = 30
*/
-static void yagl_func_eglResizeOffscreenSurfaceYAGL(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_eglResizeOffscreenSurfaceYAGL(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
EGLBoolean ret = yagl_host_eglResizeOffscreenSurfaceYAGL(dpy, surface, width, height, bpp, pixels);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, ret);
yagl_marshal_put_EGLBoolean(&in_buff, ret);
+ return out_buff;
}
const uint32_t yagl_egl_api_num_funcs = 30;
/*
* glAlphaFunc dispatcher. id = 1
*/
-static void yagl_func_glAlphaFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glAlphaFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glAlphaFunc, GLenum, GLclampf, func, ref);
yagl_host_glAlphaFunc(func, ref);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearColor dispatcher. id = 2
*/
-static void yagl_func_glClearColor(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearColor(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glClearColor, GLclampf, GLclampf, GLclampf, GLclampf, red, green, blue, alpha);
yagl_host_glClearColor(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearDepthf dispatcher. id = 3
*/
-static void yagl_func_glClearDepthf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearDepthf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClearDepthf, GLclampf, depth);
yagl_host_glClearDepthf(depth);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClipPlanef dispatcher. id = 4
*/
-static void yagl_func_glClipPlanef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClipPlanef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glClipPlanef, GLenum, target_ulong, plane, equation);
yagl_host_glClipPlanef(plane, equation);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glColor4f dispatcher. id = 5
*/
-static void yagl_func_glColor4f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glColor4f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glColor4f, GLfloat, GLfloat, GLfloat, GLfloat, red, green, blue, alpha);
yagl_host_glColor4f(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthRangef dispatcher. id = 6
*/
-static void yagl_func_glDepthRangef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthRangef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDepthRangef, GLclampf, GLclampf, zNear, zFar);
yagl_host_glDepthRangef(zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFogf dispatcher. id = 7
*/
-static void yagl_func_glFogf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFogf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glFogf, GLenum, GLfloat, pname, param);
yagl_host_glFogf(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFogfv dispatcher. id = 8
*/
-static void yagl_func_glFogfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFogfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glFogfv, GLenum, target_ulong, pname, params);
yagl_host_glFogfv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFrustumf dispatcher. id = 9
*/
-static void yagl_func_glFrustumf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFrustumf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT6(ts->ps->id, ts->id, glFrustumf, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, left, right, bottom, top, zNear, zFar);
yagl_host_glFrustumf(left, right, bottom, top, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetClipPlanef dispatcher. id = 10
*/
-static void yagl_func_glGetClipPlanef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetClipPlanef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetClipPlanef, GLenum, target_ulong, pname, eqn);
yagl_host_glGetClipPlanef(pname, eqn);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetFloatv dispatcher. id = 11
*/
-static void yagl_func_glGetFloatv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetFloatv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetFloatv, GLenum, target_ulong, pname, params);
yagl_host_glGetFloatv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetLightfv dispatcher. id = 12
*/
-static void yagl_func_glGetLightfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetLightfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetLightfv, GLenum, GLenum, target_ulong, light, pname, params);
yagl_host_glGetLightfv(light, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetMaterialfv dispatcher. id = 13
*/
-static void yagl_func_glGetMaterialfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetMaterialfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetMaterialfv, GLenum, GLenum, target_ulong, face, pname, params);
yagl_host_glGetMaterialfv(face, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexEnvfv dispatcher. id = 14
*/
-static void yagl_func_glGetTexEnvfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexEnvfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexEnvfv, GLenum, GLenum, target_ulong, env, pname, params);
yagl_host_glGetTexEnvfv(env, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexParameterfv dispatcher. id = 15
*/
-static void yagl_func_glGetTexParameterfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexParameterfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexParameterfv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetTexParameterfv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightModelf dispatcher. id = 16
*/
-static void yagl_func_glLightModelf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightModelf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glLightModelf, GLenum, GLfloat, pname, param);
yagl_host_glLightModelf(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightModelfv dispatcher. id = 17
*/
-static void yagl_func_glLightModelfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightModelfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glLightModelfv, GLenum, target_ulong, pname, params);
yagl_host_glLightModelfv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightf dispatcher. id = 18
*/
-static void yagl_func_glLightf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glLightf, GLenum, GLenum, GLfloat, light, pname, param);
yagl_host_glLightf(light, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightfv dispatcher. id = 19
*/
-static void yagl_func_glLightfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glLightfv, GLenum, GLenum, target_ulong, light, pname, params);
yagl_host_glLightfv(light, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLineWidth dispatcher. id = 20
*/
-static void yagl_func_glLineWidth(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLineWidth(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLineWidth, GLfloat, width);
yagl_host_glLineWidth(width);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLoadMatrixf dispatcher. id = 21
*/
-static void yagl_func_glLoadMatrixf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLoadMatrixf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLoadMatrixf, target_ulong, m);
yagl_host_glLoadMatrixf(m);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMaterialf dispatcher. id = 22
*/
-static void yagl_func_glMaterialf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMaterialf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glMaterialf, GLenum, GLenum, GLfloat, face, pname, param);
yagl_host_glMaterialf(face, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMaterialfv dispatcher. id = 23
*/
-static void yagl_func_glMaterialfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMaterialfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glMaterialfv, GLenum, GLenum, target_ulong, face, pname, params);
yagl_host_glMaterialfv(face, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMultMatrixf dispatcher. id = 24
*/
-static void yagl_func_glMultMatrixf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMultMatrixf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glMultMatrixf, target_ulong, m);
yagl_host_glMultMatrixf(m);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMultiTexCoord4f dispatcher. id = 25
*/
-static void yagl_func_glMultiTexCoord4f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMultiTexCoord4f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glMultiTexCoord4f, GLenum, GLfloat, GLfloat, GLfloat, GLfloat, target, s, t, r, q);
yagl_host_glMultiTexCoord4f(target, s, t, r, q);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glNormal3f dispatcher. id = 26
*/
-static void yagl_func_glNormal3f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glNormal3f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glNormal3f, GLfloat, GLfloat, GLfloat, nx, ny, nz);
yagl_host_glNormal3f(nx, ny, nz);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glOrthof dispatcher. id = 27
*/
-static void yagl_func_glOrthof(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glOrthof(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT6(ts->ps->id, ts->id, glOrthof, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, left, right, bottom, top, zNear, zFar);
yagl_host_glOrthof(left, right, bottom, top, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPointParameterf dispatcher. id = 28
*/
-static void yagl_func_glPointParameterf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPointParameterf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPointParameterf, GLenum, GLfloat, pname, param);
yagl_host_glPointParameterf(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPointParameterfv dispatcher. id = 29
*/
-static void yagl_func_glPointParameterfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPointParameterfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPointParameterfv, GLenum, target_ulong, pname, params);
yagl_host_glPointParameterfv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPointSize dispatcher. id = 30
*/
-static void yagl_func_glPointSize(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPointSize(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glPointSize, GLfloat, size);
yagl_host_glPointSize(size);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPolygonOffset dispatcher. id = 31
*/
-static void yagl_func_glPolygonOffset(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPolygonOffset(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPolygonOffset, GLfloat, GLfloat, factor, units);
yagl_host_glPolygonOffset(factor, units);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glRotatef dispatcher. id = 32
*/
-static void yagl_func_glRotatef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glRotatef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glRotatef, GLfloat, GLfloat, GLfloat, GLfloat, angle, x, y, z);
yagl_host_glRotatef(angle, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glScalef dispatcher. id = 33
*/
-static void yagl_func_glScalef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glScalef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glScalef, GLfloat, GLfloat, GLfloat, x, y, z);
yagl_host_glScalef(x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexEnvf dispatcher. id = 34
*/
-static void yagl_func_glTexEnvf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexEnvf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexEnvf, GLenum, GLenum, GLfloat, target, pname, param);
yagl_host_glTexEnvf(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexEnvfv dispatcher. id = 35
*/
-static void yagl_func_glTexEnvfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexEnvfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexEnvfv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexEnvfv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameterf dispatcher. id = 36
*/
-static void yagl_func_glTexParameterf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameterf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameterf, GLenum, GLenum, GLfloat, target, pname, param);
yagl_host_glTexParameterf(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameterfv dispatcher. id = 37
*/
-static void yagl_func_glTexParameterfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameterfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameterfv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexParameterfv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTranslatef dispatcher. id = 38
*/
-static void yagl_func_glTranslatef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTranslatef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTranslatef, GLfloat, GLfloat, GLfloat, x, y, z);
yagl_host_glTranslatef(x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glActiveTexture dispatcher. id = 39
*/
-static void yagl_func_glActiveTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glActiveTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glActiveTexture, GLenum, texture);
yagl_host_glActiveTexture(texture);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glAlphaFuncx dispatcher. id = 40
*/
-static void yagl_func_glAlphaFuncx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glAlphaFuncx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glAlphaFuncx, GLenum, GLclampx, func, ref);
yagl_host_glAlphaFuncx(func, ref);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindBuffer dispatcher. id = 41
*/
-static void yagl_func_glBindBuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindBuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBindBuffer, GLenum, GLuint, target, buffer);
yagl_host_glBindBuffer(target, buffer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindTexture dispatcher. id = 42
*/
-static void yagl_func_glBindTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBindTexture, GLenum, GLuint, target, texture);
yagl_host_glBindTexture(target, texture);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBlendFunc dispatcher. id = 43
*/
-static void yagl_func_glBlendFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBlendFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBlendFunc, GLenum, GLenum, sfactor, dfactor);
yagl_host_glBlendFunc(sfactor, dfactor);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBufferData dispatcher. id = 44
*/
-static void yagl_func_glBufferData(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBufferData(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glBufferData, GLenum, GLsizeiptr, target_ulong, GLenum, target, size, data, usage);
yagl_host_glBufferData(target, size, data, usage);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBufferSubData dispatcher. id = 45
*/
-static void yagl_func_glBufferSubData(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBufferSubData(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glBufferSubData, GLenum, GLintptr, GLsizeiptr, target_ulong, target, offset, size, data);
yagl_host_glBufferSubData(target, offset, size, data);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClear dispatcher. id = 46
*/
-static void yagl_func_glClear(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClear(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClear, GLbitfield, mask);
yagl_host_glClear(mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearColorx dispatcher. id = 47
*/
-static void yagl_func_glClearColorx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearColorx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glClearColorx, GLclampx, GLclampx, GLclampx, GLclampx, red, green, blue, alpha);
yagl_host_glClearColorx(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearDepthx dispatcher. id = 48
*/
-static void yagl_func_glClearDepthx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearDepthx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClearDepthx, GLclampx, depth);
yagl_host_glClearDepthx(depth);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearStencil dispatcher. id = 49
*/
-static void yagl_func_glClearStencil(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearStencil(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClearStencil, GLint, s);
yagl_host_glClearStencil(s);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClientActiveTexture dispatcher. id = 50
*/
-static void yagl_func_glClientActiveTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClientActiveTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClientActiveTexture, GLenum, texture);
yagl_host_glClientActiveTexture(texture);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClipPlanex dispatcher. id = 51
*/
-static void yagl_func_glClipPlanex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClipPlanex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glClipPlanex, GLenum, target_ulong, plane, equation);
yagl_host_glClipPlanex(plane, equation);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glColor4ub dispatcher. id = 52
*/
-static void yagl_func_glColor4ub(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glColor4ub(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glColor4ub, GLubyte, GLubyte, GLubyte, GLubyte, red, green, blue, alpha);
yagl_host_glColor4ub(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glColor4x dispatcher. id = 53
*/
-static void yagl_func_glColor4x(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glColor4x(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glColor4x, GLfixed, GLfixed, GLfixed, GLfixed, red, green, blue, alpha);
yagl_host_glColor4x(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glColorMask dispatcher. id = 54
*/
-static void yagl_func_glColorMask(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glColorMask(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glColorMask, GLboolean, GLboolean, GLboolean, GLboolean, red, green, blue, alpha);
yagl_host_glColorMask(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glColorPointer dispatcher. id = 55
*/
-static void yagl_func_glColorPointer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glColorPointer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glColorPointer, GLint, GLenum, GLsizei, target_ulong, size, type, stride, pointer);
yagl_host_glColorPointer(size, type, stride, pointer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCompressedTexImage2D dispatcher. id = 56
*/
-static void yagl_func_glCompressedTexImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCompressedTexImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT8(ts->ps->id, ts->id, glCompressedTexImage2D, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, target_ulong, target, level, internalformat, width, height, border, imageSize, data);
yagl_host_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCompressedTexSubImage2D dispatcher. id = 57
*/
-static void yagl_func_glCompressedTexSubImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCompressedTexSubImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT9(ts->ps->id, ts->id, glCompressedTexSubImage2D, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, target_ulong, target, level, xoffset, yoffset, width, height, format, imageSize, data);
yagl_host_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCopyTexImage2D dispatcher. id = 58
*/
-static void yagl_func_glCopyTexImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCopyTexImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT8(ts->ps->id, ts->id, glCopyTexImage2D, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, target, level, internalformat, x, y, width, height, border);
yagl_host_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCopyTexSubImage2D dispatcher. id = 59
*/
-static void yagl_func_glCopyTexSubImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCopyTexSubImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT8(ts->ps->id, ts->id, glCopyTexSubImage2D, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, target, level, xoffset, yoffset, x, y, width, height);
yagl_host_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCullFace dispatcher. id = 60
*/
-static void yagl_func_glCullFace(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCullFace(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glCullFace, GLenum, mode);
yagl_host_glCullFace(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteBuffers dispatcher. id = 61
*/
-static void yagl_func_glDeleteBuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteBuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDeleteBuffers, GLsizei, target_ulong, n, buffers);
yagl_host_glDeleteBuffers(n, buffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteTextures dispatcher. id = 62
*/
-static void yagl_func_glDeleteTextures(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteTextures(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDeleteTextures, GLsizei, target_ulong, n, textures);
yagl_host_glDeleteTextures(n, textures);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthFunc dispatcher. id = 63
*/
-static void yagl_func_glDepthFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDepthFunc, GLenum, func);
yagl_host_glDepthFunc(func);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthMask dispatcher. id = 64
*/
-static void yagl_func_glDepthMask(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthMask(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDepthMask, GLboolean, flag);
yagl_host_glDepthMask(flag);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthRangex dispatcher. id = 65
*/
-static void yagl_func_glDepthRangex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthRangex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDepthRangex, GLclampx, GLclampx, zNear, zFar);
yagl_host_glDepthRangex(zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDisable dispatcher. id = 66
*/
-static void yagl_func_glDisable(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDisable(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDisable, GLenum, cap);
yagl_host_glDisable(cap);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDisableClientState dispatcher. id = 67
*/
-static void yagl_func_glDisableClientState(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDisableClientState(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDisableClientState, GLenum, array);
yagl_host_glDisableClientState(array);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDrawArrays dispatcher. id = 68
*/
-static void yagl_func_glDrawArrays(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDrawArrays(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glDrawArrays, GLenum, GLint, GLsizei, mode, first, count);
yagl_host_glDrawArrays(mode, first, count);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDrawElements dispatcher. id = 69
*/
-static void yagl_func_glDrawElements(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDrawElements(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glDrawElements, GLenum, GLsizei, GLenum, target_ulong, mode, count, type, indices);
yagl_host_glDrawElements(mode, count, type, indices);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glEnable dispatcher. id = 70
*/
-static void yagl_func_glEnable(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glEnable(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glEnable, GLenum, cap);
yagl_host_glEnable(cap);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glEnableClientState dispatcher. id = 71
*/
-static void yagl_func_glEnableClientState(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glEnableClientState(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glEnableClientState, GLenum, array);
yagl_host_glEnableClientState(array);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFinish dispatcher. id = 72
*/
-static void yagl_func_glFinish(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFinish(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glFinish);
yagl_host_glFinish();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFlush dispatcher. id = 73
*/
-static void yagl_func_glFlush(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFlush(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glFlush);
yagl_host_glFlush();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFogx dispatcher. id = 74
*/
-static void yagl_func_glFogx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFogx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glFogx, GLenum, GLfixed, pname, param);
yagl_host_glFogx(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFogxv dispatcher. id = 75
*/
-static void yagl_func_glFogxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFogxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glFogxv, GLenum, target_ulong, pname, params);
yagl_host_glFogxv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFrontFace dispatcher. id = 76
*/
-static void yagl_func_glFrontFace(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFrontFace(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glFrontFace, GLenum, mode);
yagl_host_glFrontFace(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFrustumx dispatcher. id = 77
*/
-static void yagl_func_glFrustumx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFrustumx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT6(ts->ps->id, ts->id, glFrustumx, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, left, right, bottom, top, zNear, zFar);
yagl_host_glFrustumx(left, right, bottom, top, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetBooleanv dispatcher. id = 78
*/
-static void yagl_func_glGetBooleanv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetBooleanv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetBooleanv, GLenum, target_ulong, pname, params);
yagl_host_glGetBooleanv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetBufferParameteriv dispatcher. id = 79
*/
-static void yagl_func_glGetBufferParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetBufferParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetBufferParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetBufferParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetClipPlanex dispatcher. id = 80
*/
-static void yagl_func_glGetClipPlanex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetClipPlanex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetClipPlanex, GLenum, target_ulong, pname, eqn);
yagl_host_glGetClipPlanex(pname, eqn);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenBuffers dispatcher. id = 81
*/
-static void yagl_func_glGenBuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenBuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGenBuffers, GLsizei, target_ulong, n, buffers);
yagl_host_glGenBuffers(n, buffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenTextures dispatcher. id = 82
*/
-static void yagl_func_glGenTextures(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenTextures(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGenTextures, GLsizei, target_ulong, n, textures);
yagl_host_glGenTextures(n, textures);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetError dispatcher. id = 83
*/
-static void yagl_func_glGetError(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetError(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLenum ret = yagl_host_glGetError();
YAGL_LOG_FUNC_EXIT_SPLIT(GLenum, ret);
yagl_marshal_put_GLenum(&in_buff, ret);
+ return out_buff;
}
/*
* glGetFixedv dispatcher. id = 84
*/
-static void yagl_func_glGetFixedv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetFixedv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetFixedv, GLenum, target_ulong, pname, params);
yagl_host_glGetFixedv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetIntegerv dispatcher. id = 85
*/
-static void yagl_func_glGetIntegerv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetIntegerv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetIntegerv, GLenum, target_ulong, pname, params);
yagl_host_glGetIntegerv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetLightxv dispatcher. id = 86
*/
-static void yagl_func_glGetLightxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetLightxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetLightxv, GLenum, GLenum, target_ulong, light, pname, params);
yagl_host_glGetLightxv(light, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetMaterialxv dispatcher. id = 87
*/
-static void yagl_func_glGetMaterialxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetMaterialxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetMaterialxv, GLenum, GLenum, target_ulong, face, pname, params);
yagl_host_glGetMaterialxv(face, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetPointerv dispatcher. id = 88
*/
-static void yagl_func_glGetPointerv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetPointerv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetPointerv, GLenum, target_ulong, pname, params);
yagl_host_glGetPointerv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexEnviv dispatcher. id = 89
*/
-static void yagl_func_glGetTexEnviv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexEnviv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexEnviv, GLenum, GLenum, target_ulong, env, pname, params);
yagl_host_glGetTexEnviv(env, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexEnvxv dispatcher. id = 90
*/
-static void yagl_func_glGetTexEnvxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexEnvxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexEnvxv, GLenum, GLenum, target_ulong, env, pname, params);
yagl_host_glGetTexEnvxv(env, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexParameteriv dispatcher. id = 91
*/
-static void yagl_func_glGetTexParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetTexParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexParameterxv dispatcher. id = 92
*/
-static void yagl_func_glGetTexParameterxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexParameterxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexParameterxv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetTexParameterxv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glHint dispatcher. id = 93
*/
-static void yagl_func_glHint(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glHint(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glHint, GLenum, GLenum, target, mode);
yagl_host_glHint(target, mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glIsBuffer dispatcher. id = 94
*/
-static void yagl_func_glIsBuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsBuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsBuffer(buffer);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsEnabled dispatcher. id = 95
*/
-static void yagl_func_glIsEnabled(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsEnabled(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsEnabled(cap);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsTexture dispatcher. id = 96
*/
-static void yagl_func_glIsTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsTexture(texture);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glLightModelx dispatcher. id = 97
*/
-static void yagl_func_glLightModelx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightModelx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glLightModelx, GLenum, GLfixed, pname, param);
yagl_host_glLightModelx(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightModelxv dispatcher. id = 98
*/
-static void yagl_func_glLightModelxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightModelxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glLightModelxv, GLenum, target_ulong, pname, params);
yagl_host_glLightModelxv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightx dispatcher. id = 99
*/
-static void yagl_func_glLightx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glLightx, GLenum, GLenum, GLfixed, light, pname, param);
yagl_host_glLightx(light, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLightxv dispatcher. id = 100
*/
-static void yagl_func_glLightxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLightxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glLightxv, GLenum, GLenum, target_ulong, light, pname, params);
yagl_host_glLightxv(light, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLineWidthx dispatcher. id = 101
*/
-static void yagl_func_glLineWidthx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLineWidthx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLineWidthx, GLfixed, width);
yagl_host_glLineWidthx(width);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLoadIdentity dispatcher. id = 102
*/
-static void yagl_func_glLoadIdentity(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLoadIdentity(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glLoadIdentity);
yagl_host_glLoadIdentity();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLoadMatrixx dispatcher. id = 103
*/
-static void yagl_func_glLoadMatrixx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLoadMatrixx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLoadMatrixx, target_ulong, m);
yagl_host_glLoadMatrixx(m);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLogicOp dispatcher. id = 104
*/
-static void yagl_func_glLogicOp(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLogicOp(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLogicOp, GLenum, opcode);
yagl_host_glLogicOp(opcode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMaterialx dispatcher. id = 105
*/
-static void yagl_func_glMaterialx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMaterialx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glMaterialx, GLenum, GLenum, GLfixed, face, pname, param);
yagl_host_glMaterialx(face, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMaterialxv dispatcher. id = 106
*/
-static void yagl_func_glMaterialxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMaterialxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glMaterialxv, GLenum, GLenum, target_ulong, face, pname, params);
yagl_host_glMaterialxv(face, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMatrixMode dispatcher. id = 107
*/
-static void yagl_func_glMatrixMode(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMatrixMode(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glMatrixMode, GLenum, mode);
yagl_host_glMatrixMode(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMultMatrixx dispatcher. id = 108
*/
-static void yagl_func_glMultMatrixx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMultMatrixx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glMultMatrixx, target_ulong, m);
yagl_host_glMultMatrixx(m);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glMultiTexCoord4x dispatcher. id = 109
*/
-static void yagl_func_glMultiTexCoord4x(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glMultiTexCoord4x(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glMultiTexCoord4x, GLenum, GLfixed, GLfixed, GLfixed, GLfixed, target, s, t, r, q);
yagl_host_glMultiTexCoord4x(target, s, t, r, q);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glNormal3x dispatcher. id = 110
*/
-static void yagl_func_glNormal3x(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glNormal3x(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glNormal3x, GLfixed, GLfixed, GLfixed, nx, ny, nz);
yagl_host_glNormal3x(nx, ny, nz);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glNormalPointer dispatcher. id = 111
*/
-static void yagl_func_glNormalPointer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glNormalPointer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glNormalPointer, GLenum, GLsizei, target_ulong, type, stride, pointer);
yagl_host_glNormalPointer(type, stride, pointer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glOrthox dispatcher. id = 112
*/
-static void yagl_func_glOrthox(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glOrthox(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT6(ts->ps->id, ts->id, glOrthox, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, GLfixed, left, right, bottom, top, zNear, zFar);
yagl_host_glOrthox(left, right, bottom, top, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPixelStorei dispatcher. id = 113
*/
-static void yagl_func_glPixelStorei(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPixelStorei(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPixelStorei, GLenum, GLint, pname, param);
yagl_host_glPixelStorei(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPointParameterx dispatcher. id = 114
*/
-static void yagl_func_glPointParameterx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPointParameterx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPointParameterx, GLenum, GLfixed, pname, param);
yagl_host_glPointParameterx(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPointParameterxv dispatcher. id = 115
*/
-static void yagl_func_glPointParameterxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPointParameterxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPointParameterxv, GLenum, target_ulong, pname, params);
yagl_host_glPointParameterxv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPointSizex dispatcher. id = 116
*/
-static void yagl_func_glPointSizex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPointSizex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glPointSizex, GLfixed, size);
yagl_host_glPointSizex(size);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPolygonOffsetx dispatcher. id = 117
*/
-static void yagl_func_glPolygonOffsetx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPolygonOffsetx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPolygonOffsetx, GLfixed, GLfixed, factor, units);
yagl_host_glPolygonOffsetx(factor, units);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPopMatrix dispatcher. id = 118
*/
-static void yagl_func_glPopMatrix(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPopMatrix(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glPopMatrix);
yagl_host_glPopMatrix();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPushMatrix dispatcher. id = 119
*/
-static void yagl_func_glPushMatrix(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPushMatrix(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glPushMatrix);
yagl_host_glPushMatrix();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glReadPixels dispatcher. id = 120
*/
-static void yagl_func_glReadPixels(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glReadPixels(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT7(ts->ps->id, ts->id, glReadPixels, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, target_ulong, x, y, width, height, format, type, pixels);
yagl_host_glReadPixels(x, y, width, height, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glRotatex dispatcher. id = 121
*/
-static void yagl_func_glRotatex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glRotatex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glRotatex, GLfixed, GLfixed, GLfixed, GLfixed, angle, x, y, z);
yagl_host_glRotatex(angle, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glSampleCoverage dispatcher. id = 122
*/
-static void yagl_func_glSampleCoverage(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glSampleCoverage(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glSampleCoverage, GLclampf, GLboolean, value, invert);
yagl_host_glSampleCoverage(value, invert);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glSampleCoveragex dispatcher. id = 123
*/
-static void yagl_func_glSampleCoveragex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glSampleCoveragex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glSampleCoveragex, GLclampx, GLboolean, value, invert);
yagl_host_glSampleCoveragex(value, invert);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glScalex dispatcher. id = 124
*/
-static void yagl_func_glScalex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glScalex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glScalex, GLfixed, GLfixed, GLfixed, x, y, z);
yagl_host_glScalex(x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glScissor dispatcher. id = 125
*/
-static void yagl_func_glScissor(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glScissor(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glScissor, GLint, GLint, GLsizei, GLsizei, x, y, width, height);
yagl_host_glScissor(x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glShadeModel dispatcher. id = 126
*/
-static void yagl_func_glShadeModel(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glShadeModel(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glShadeModel, GLenum, mode);
yagl_host_glShadeModel(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilFunc dispatcher. id = 127
*/
-static void yagl_func_glStencilFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glStencilFunc, GLenum, GLint, GLuint, func, ref, mask);
yagl_host_glStencilFunc(func, ref, mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilMask dispatcher. id = 128
*/
-static void yagl_func_glStencilMask(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilMask(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glStencilMask, GLuint, mask);
yagl_host_glStencilMask(mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilOp dispatcher. id = 129
*/
-static void yagl_func_glStencilOp(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilOp(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glStencilOp, GLenum, GLenum, GLenum, fail, zfail, zpass);
yagl_host_glStencilOp(fail, zfail, zpass);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexCoordPointer dispatcher. id = 130
*/
-static void yagl_func_glTexCoordPointer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexCoordPointer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glTexCoordPointer, GLint, GLenum, GLsizei, target_ulong, size, type, stride, pointer);
yagl_host_glTexCoordPointer(size, type, stride, pointer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexEnvi dispatcher. id = 131
*/
-static void yagl_func_glTexEnvi(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexEnvi(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexEnvi, GLenum, GLenum, GLint, target, pname, param);
yagl_host_glTexEnvi(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexEnvx dispatcher. id = 132
*/
-static void yagl_func_glTexEnvx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexEnvx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexEnvx, GLenum, GLenum, GLfixed, target, pname, param);
yagl_host_glTexEnvx(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexEnviv dispatcher. id = 133
*/
-static void yagl_func_glTexEnviv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexEnviv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexEnviv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexEnviv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexEnvxv dispatcher. id = 134
*/
-static void yagl_func_glTexEnvxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexEnvxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexEnvxv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexEnvxv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexImage2D dispatcher. id = 135
*/
-static void yagl_func_glTexImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT9(ts->ps->id, ts->id, glTexImage2D, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, target_ulong, target, level, internalformat, width, height, border, format, type, pixels);
yagl_host_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameteri dispatcher. id = 136
*/
-static void yagl_func_glTexParameteri(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameteri(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameteri, GLenum, GLenum, GLint, target, pname, param);
yagl_host_glTexParameteri(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameterx dispatcher. id = 137
*/
-static void yagl_func_glTexParameterx(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameterx(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameterx, GLenum, GLenum, GLfixed, target, pname, param);
yagl_host_glTexParameterx(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameteriv dispatcher. id = 138
*/
-static void yagl_func_glTexParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameterxv dispatcher. id = 139
*/
-static void yagl_func_glTexParameterxv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameterxv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameterxv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexParameterxv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexSubImage2D dispatcher. id = 140
*/
-static void yagl_func_glTexSubImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexSubImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT9(ts->ps->id, ts->id, glTexSubImage2D, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, target_ulong, target, level, xoffset, yoffset, width, height, format, type, pixels);
yagl_host_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTranslatex dispatcher. id = 141
*/
-static void yagl_func_glTranslatex(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTranslatex(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTranslatex, GLfixed, GLfixed, GLfixed, x, y, z);
yagl_host_glTranslatex(x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexPointer dispatcher. id = 142
*/
-static void yagl_func_glVertexPointer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexPointer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glVertexPointer, GLint, GLenum, GLsizei, target_ulong, size, type, stride, pointer);
yagl_host_glVertexPointer(size, type, stride, pointer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glViewport dispatcher. id = 143
*/
-static void yagl_func_glViewport(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glViewport(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glViewport, GLint, GLint, GLsizei, GLsizei, x, y, width, height);
yagl_host_glViewport(x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
const uint32_t yagl_gles1_api_num_funcs = 143;
/*
* glActiveTexture dispatcher. id = 1
*/
-static void yagl_func_glActiveTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glActiveTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glActiveTexture, GLenum, texture);
yagl_host_glActiveTexture(texture);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glAttachShader dispatcher. id = 2
*/
-static void yagl_func_glAttachShader(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glAttachShader(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glAttachShader, GLuint, GLuint, program, shader);
yagl_host_glAttachShader(program, shader);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindAttribLocation dispatcher. id = 3
*/
-static void yagl_func_glBindAttribLocation(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindAttribLocation(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glBindAttribLocation, GLuint, GLuint, target_ulong, program, index, name);
yagl_host_glBindAttribLocation(program, index, name);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindBuffer dispatcher. id = 4
*/
-static void yagl_func_glBindBuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindBuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBindBuffer, GLenum, GLuint, target, buffer);
yagl_host_glBindBuffer(target, buffer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindFramebuffer dispatcher. id = 5
*/
-static void yagl_func_glBindFramebuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindFramebuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBindFramebuffer, GLenum, GLuint, target, framebuffer);
yagl_host_glBindFramebuffer(target, framebuffer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindRenderbuffer dispatcher. id = 6
*/
-static void yagl_func_glBindRenderbuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindRenderbuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBindRenderbuffer, GLenum, GLuint, target, renderbuffer);
yagl_host_glBindRenderbuffer(target, renderbuffer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBindTexture dispatcher. id = 7
*/
-static void yagl_func_glBindTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBindTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBindTexture, GLenum, GLuint, target, texture);
yagl_host_glBindTexture(target, texture);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBlendColor dispatcher. id = 8
*/
-static void yagl_func_glBlendColor(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBlendColor(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glBlendColor, GLclampf, GLclampf, GLclampf, GLclampf, red, green, blue, alpha);
yagl_host_glBlendColor(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBlendEquation dispatcher. id = 9
*/
-static void yagl_func_glBlendEquation(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBlendEquation(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glBlendEquation, GLenum, mode);
yagl_host_glBlendEquation(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBlendEquationSeparate dispatcher. id = 10
*/
-static void yagl_func_glBlendEquationSeparate(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBlendEquationSeparate(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBlendEquationSeparate, GLenum, GLenum, modeRGB, modeAlpha);
yagl_host_glBlendEquationSeparate(modeRGB, modeAlpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBlendFunc dispatcher. id = 11
*/
-static void yagl_func_glBlendFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBlendFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glBlendFunc, GLenum, GLenum, sfactor, dfactor);
yagl_host_glBlendFunc(sfactor, dfactor);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBlendFuncSeparate dispatcher. id = 12
*/
-static void yagl_func_glBlendFuncSeparate(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBlendFuncSeparate(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glBlendFuncSeparate, GLenum, GLenum, GLenum, GLenum, srcRGB, dstRGB, srcAlpha, dstAlpha);
yagl_host_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBufferData dispatcher. id = 13
*/
-static void yagl_func_glBufferData(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBufferData(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glBufferData, GLenum, GLsizeiptr, target_ulong, GLenum, target, size, data, usage);
yagl_host_glBufferData(target, size, data, usage);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glBufferSubData dispatcher. id = 14
*/
-static void yagl_func_glBufferSubData(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glBufferSubData(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glBufferSubData, GLenum, GLintptr, GLsizeiptr, target_ulong, target, offset, size, data);
yagl_host_glBufferSubData(target, offset, size, data);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCheckFramebufferStatus dispatcher. id = 15
*/
-static void yagl_func_glCheckFramebufferStatus(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCheckFramebufferStatus(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLenum ret = yagl_host_glCheckFramebufferStatus(target);
YAGL_LOG_FUNC_EXIT_SPLIT(GLenum, ret);
yagl_marshal_put_GLenum(&in_buff, ret);
+ return out_buff;
}
/*
* glClear dispatcher. id = 16
*/
-static void yagl_func_glClear(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClear(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClear, GLbitfield, mask);
yagl_host_glClear(mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearColor dispatcher. id = 17
*/
-static void yagl_func_glClearColor(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearColor(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glClearColor, GLclampf, GLclampf, GLclampf, GLclampf, red, green, blue, alpha);
yagl_host_glClearColor(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearDepthf dispatcher. id = 18
*/
-static void yagl_func_glClearDepthf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearDepthf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClearDepthf, GLclampf, depth);
yagl_host_glClearDepthf(depth);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glClearStencil dispatcher. id = 19
*/
-static void yagl_func_glClearStencil(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glClearStencil(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glClearStencil, GLint, s);
yagl_host_glClearStencil(s);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glColorMask dispatcher. id = 20
*/
-static void yagl_func_glColorMask(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glColorMask(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glColorMask, GLboolean, GLboolean, GLboolean, GLboolean, red, green, blue, alpha);
yagl_host_glColorMask(red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCompileShader dispatcher. id = 21
*/
-static void yagl_func_glCompileShader(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCompileShader(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glCompileShader, GLuint, shader);
yagl_host_glCompileShader(shader);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCompressedTexImage2D dispatcher. id = 22
*/
-static void yagl_func_glCompressedTexImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCompressedTexImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT8(ts->ps->id, ts->id, glCompressedTexImage2D, GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, target_ulong, target, level, internalformat, width, height, border, imageSize, data);
yagl_host_glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCompressedTexSubImage2D dispatcher. id = 23
*/
-static void yagl_func_glCompressedTexSubImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCompressedTexSubImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT9(ts->ps->id, ts->id, glCompressedTexSubImage2D, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, target_ulong, target, level, xoffset, yoffset, width, height, format, imageSize, data);
yagl_host_glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCopyTexImage2D dispatcher. id = 24
*/
-static void yagl_func_glCopyTexImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCopyTexImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT8(ts->ps->id, ts->id, glCopyTexImage2D, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, target, level, internalformat, x, y, width, height, border);
yagl_host_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCopyTexSubImage2D dispatcher. id = 25
*/
-static void yagl_func_glCopyTexSubImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCopyTexSubImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT8(ts->ps->id, ts->id, glCopyTexSubImage2D, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, target, level, xoffset, yoffset, x, y, width, height);
yagl_host_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glCreateProgram dispatcher. id = 26
*/
-static void yagl_func_glCreateProgram(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCreateProgram(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLuint ret = yagl_host_glCreateProgram();
YAGL_LOG_FUNC_EXIT_SPLIT(GLuint, ret);
yagl_marshal_put_GLuint(&in_buff, ret);
+ return out_buff;
}
/*
* glCreateShader dispatcher. id = 27
*/
-static void yagl_func_glCreateShader(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCreateShader(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLuint ret = yagl_host_glCreateShader(type);
YAGL_LOG_FUNC_EXIT_SPLIT(GLuint, ret);
yagl_marshal_put_GLuint(&in_buff, ret);
+ return out_buff;
}
/*
* glCullFace dispatcher. id = 28
*/
-static void yagl_func_glCullFace(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glCullFace(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glCullFace, GLenum, mode);
yagl_host_glCullFace(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteBuffers dispatcher. id = 29
*/
-static void yagl_func_glDeleteBuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteBuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDeleteBuffers, GLsizei, target_ulong, n, buffers);
yagl_host_glDeleteBuffers(n, buffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteFramebuffers dispatcher. id = 30
*/
-static void yagl_func_glDeleteFramebuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteFramebuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDeleteFramebuffers, GLsizei, target_ulong, n, framebuffers);
yagl_host_glDeleteFramebuffers(n, framebuffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteProgram dispatcher. id = 31
*/
-static void yagl_func_glDeleteProgram(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteProgram(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDeleteProgram, GLuint, program);
yagl_host_glDeleteProgram(program);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteRenderbuffers dispatcher. id = 32
*/
-static void yagl_func_glDeleteRenderbuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteRenderbuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDeleteRenderbuffers, GLsizei, target_ulong, n, renderbuffers);
yagl_host_glDeleteRenderbuffers(n, renderbuffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteShader dispatcher. id = 33
*/
-static void yagl_func_glDeleteShader(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteShader(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDeleteShader, GLuint, shader);
yagl_host_glDeleteShader(shader);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDeleteTextures dispatcher. id = 34
*/
-static void yagl_func_glDeleteTextures(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDeleteTextures(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDeleteTextures, GLsizei, target_ulong, n, textures);
yagl_host_glDeleteTextures(n, textures);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthFunc dispatcher. id = 35
*/
-static void yagl_func_glDepthFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDepthFunc, GLenum, func);
yagl_host_glDepthFunc(func);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthMask dispatcher. id = 36
*/
-static void yagl_func_glDepthMask(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthMask(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDepthMask, GLboolean, flag);
yagl_host_glDepthMask(flag);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDepthRangef dispatcher. id = 37
*/
-static void yagl_func_glDepthRangef(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDepthRangef(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDepthRangef, GLclampf, GLclampf, zNear, zFar);
yagl_host_glDepthRangef(zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDetachShader dispatcher. id = 38
*/
-static void yagl_func_glDetachShader(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDetachShader(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glDetachShader, GLuint, GLuint, program, shader);
yagl_host_glDetachShader(program, shader);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDisable dispatcher. id = 39
*/
-static void yagl_func_glDisable(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDisable(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDisable, GLenum, cap);
yagl_host_glDisable(cap);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDisableVertexAttribArray dispatcher. id = 40
*/
-static void yagl_func_glDisableVertexAttribArray(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDisableVertexAttribArray(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glDisableVertexAttribArray, GLuint, index);
yagl_host_glDisableVertexAttribArray(index);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDrawArrays dispatcher. id = 41
*/
-static void yagl_func_glDrawArrays(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDrawArrays(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glDrawArrays, GLenum, GLint, GLsizei, mode, first, count);
yagl_host_glDrawArrays(mode, first, count);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glDrawElements dispatcher. id = 42
*/
-static void yagl_func_glDrawElements(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glDrawElements(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glDrawElements, GLenum, GLsizei, GLenum, target_ulong, mode, count, type, indices);
yagl_host_glDrawElements(mode, count, type, indices);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glEnable dispatcher. id = 43
*/
-static void yagl_func_glEnable(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glEnable(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glEnable, GLenum, cap);
yagl_host_glEnable(cap);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glEnableVertexAttribArray dispatcher. id = 44
*/
-static void yagl_func_glEnableVertexAttribArray(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glEnableVertexAttribArray(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glEnableVertexAttribArray, GLuint, index);
yagl_host_glEnableVertexAttribArray(index);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFinish dispatcher. id = 45
*/
-static void yagl_func_glFinish(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFinish(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glFinish);
yagl_host_glFinish();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFlush dispatcher. id = 46
*/
-static void yagl_func_glFlush(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFlush(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glFlush);
yagl_host_glFlush();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFramebufferRenderbuffer dispatcher. id = 47
*/
-static void yagl_func_glFramebufferRenderbuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFramebufferRenderbuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glFramebufferRenderbuffer, GLenum, GLenum, GLenum, GLuint, target, attachment, renderbuffertarget, renderbuffer);
yagl_host_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFramebufferTexture2D dispatcher. id = 48
*/
-static void yagl_func_glFramebufferTexture2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFramebufferTexture2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glFramebufferTexture2D, GLenum, GLenum, GLenum, GLuint, GLint, target, attachment, textarget, texture, level);
yagl_host_glFramebufferTexture2D(target, attachment, textarget, texture, level);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glFrontFace dispatcher. id = 49
*/
-static void yagl_func_glFrontFace(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glFrontFace(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glFrontFace, GLenum, mode);
yagl_host_glFrontFace(mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenBuffers dispatcher. id = 50
*/
-static void yagl_func_glGenBuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenBuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGenBuffers, GLsizei, target_ulong, n, buffers);
yagl_host_glGenBuffers(n, buffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenerateMipmap dispatcher. id = 51
*/
-static void yagl_func_glGenerateMipmap(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenerateMipmap(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glGenerateMipmap, GLenum, target);
yagl_host_glGenerateMipmap(target);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenFramebuffers dispatcher. id = 52
*/
-static void yagl_func_glGenFramebuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenFramebuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGenFramebuffers, GLsizei, target_ulong, n, framebuffers);
yagl_host_glGenFramebuffers(n, framebuffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenRenderbuffers dispatcher. id = 53
*/
-static void yagl_func_glGenRenderbuffers(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenRenderbuffers(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGenRenderbuffers, GLsizei, target_ulong, n, renderbuffers);
yagl_host_glGenRenderbuffers(n, renderbuffers);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGenTextures dispatcher. id = 54
*/
-static void yagl_func_glGenTextures(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGenTextures(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGenTextures, GLsizei, target_ulong, n, textures);
yagl_host_glGenTextures(n, textures);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetActiveAttrib dispatcher. id = 55
*/
-static void yagl_func_glGetActiveAttrib(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetActiveAttrib(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT7(ts->ps->id, ts->id, glGetActiveAttrib, GLuint, GLuint, GLsizei, target_ulong, target_ulong, target_ulong, target_ulong, program, index, bufsize, length, size, type, name);
yagl_host_glGetActiveAttrib(program, index, bufsize, length, size, type, name);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetActiveUniform dispatcher. id = 56
*/
-static void yagl_func_glGetActiveUniform(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetActiveUniform(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT7(ts->ps->id, ts->id, glGetActiveUniform, GLuint, GLuint, GLsizei, target_ulong, target_ulong, target_ulong, target_ulong, program, index, bufsize, length, size, type, name);
yagl_host_glGetActiveUniform(program, index, bufsize, length, size, type, name);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetAttachedShaders dispatcher. id = 57
*/
-static void yagl_func_glGetAttachedShaders(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetAttachedShaders(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glGetAttachedShaders, GLuint, GLsizei, target_ulong, target_ulong, program, maxcount, count, shaders);
yagl_host_glGetAttachedShaders(program, maxcount, count, shaders);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetAttribLocation dispatcher. id = 58
*/
-static void yagl_func_glGetAttribLocation(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetAttribLocation(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
int ret = yagl_host_glGetAttribLocation(program, name);
YAGL_LOG_FUNC_EXIT_SPLIT(int, ret);
yagl_marshal_put_int(&in_buff, ret);
+ return out_buff;
}
/*
* glGetBooleanv dispatcher. id = 59
*/
-static void yagl_func_glGetBooleanv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetBooleanv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetBooleanv, GLenum, target_ulong, pname, params);
yagl_host_glGetBooleanv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetBufferParameteriv dispatcher. id = 60
*/
-static void yagl_func_glGetBufferParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetBufferParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetBufferParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetBufferParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetError dispatcher. id = 61
*/
-static void yagl_func_glGetError(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetError(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLenum ret = yagl_host_glGetError();
YAGL_LOG_FUNC_EXIT_SPLIT(GLenum, ret);
yagl_marshal_put_GLenum(&in_buff, ret);
+ return out_buff;
}
/*
* glGetFloatv dispatcher. id = 62
*/
-static void yagl_func_glGetFloatv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetFloatv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetFloatv, GLenum, target_ulong, pname, params);
yagl_host_glGetFloatv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetFramebufferAttachmentParameteriv dispatcher. id = 63
*/
-static void yagl_func_glGetFramebufferAttachmentParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetFramebufferAttachmentParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glGetFramebufferAttachmentParameteriv, GLenum, GLenum, GLenum, target_ulong, target, attachment, pname, params);
yagl_host_glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetIntegerv dispatcher. id = 64
*/
-static void yagl_func_glGetIntegerv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetIntegerv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glGetIntegerv, GLenum, target_ulong, pname, params);
yagl_host_glGetIntegerv(pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetProgramiv dispatcher. id = 65
*/
-static void yagl_func_glGetProgramiv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetProgramiv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetProgramiv, GLuint, GLenum, target_ulong, program, pname, params);
yagl_host_glGetProgramiv(program, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetProgramInfoLog dispatcher. id = 66
*/
-static void yagl_func_glGetProgramInfoLog(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetProgramInfoLog(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glGetProgramInfoLog, GLuint, GLsizei, target_ulong, target_ulong, program, bufsize, length, infolog);
yagl_host_glGetProgramInfoLog(program, bufsize, length, infolog);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetRenderbufferParameteriv dispatcher. id = 67
*/
-static void yagl_func_glGetRenderbufferParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetRenderbufferParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetRenderbufferParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetRenderbufferParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetShaderiv dispatcher. id = 68
*/
-static void yagl_func_glGetShaderiv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetShaderiv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetShaderiv, GLuint, GLenum, target_ulong, shader, pname, params);
yagl_host_glGetShaderiv(shader, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetShaderInfoLog dispatcher. id = 69
*/
-static void yagl_func_glGetShaderInfoLog(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetShaderInfoLog(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glGetShaderInfoLog, GLuint, GLsizei, target_ulong, target_ulong, shader, bufsize, length, infolog);
yagl_host_glGetShaderInfoLog(shader, bufsize, length, infolog);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetShaderPrecisionFormat dispatcher. id = 70
*/
-static void yagl_func_glGetShaderPrecisionFormat(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetShaderPrecisionFormat(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glGetShaderPrecisionFormat, GLenum, GLenum, target_ulong, target_ulong, shadertype, precisiontype, range, precision);
yagl_host_glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetShaderSource dispatcher. id = 71
*/
-static void yagl_func_glGetShaderSource(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetShaderSource(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glGetShaderSource, GLuint, GLsizei, target_ulong, target_ulong, shader, bufsize, length, source);
yagl_host_glGetShaderSource(shader, bufsize, length, source);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexParameterfv dispatcher. id = 72
*/
-static void yagl_func_glGetTexParameterfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexParameterfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexParameterfv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetTexParameterfv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetTexParameteriv dispatcher. id = 73
*/
-static void yagl_func_glGetTexParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetTexParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetTexParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glGetTexParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetUniformfv dispatcher. id = 74
*/
-static void yagl_func_glGetUniformfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetUniformfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetUniformfv, GLuint, GLint, target_ulong, program, location, params);
yagl_host_glGetUniformfv(program, location, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetUniformiv dispatcher. id = 75
*/
-static void yagl_func_glGetUniformiv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetUniformiv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetUniformiv, GLuint, GLint, target_ulong, program, location, params);
yagl_host_glGetUniformiv(program, location, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetUniformLocation dispatcher. id = 76
*/
-static void yagl_func_glGetUniformLocation(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetUniformLocation(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
int ret = yagl_host_glGetUniformLocation(program, name);
YAGL_LOG_FUNC_EXIT_SPLIT(int, ret);
yagl_marshal_put_int(&in_buff, ret);
+ return out_buff;
}
/*
* glGetVertexAttribfv dispatcher. id = 77
*/
-static void yagl_func_glGetVertexAttribfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetVertexAttribfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetVertexAttribfv, GLuint, GLenum, target_ulong, index, pname, params);
yagl_host_glGetVertexAttribfv(index, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetVertexAttribiv dispatcher. id = 78
*/
-static void yagl_func_glGetVertexAttribiv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetVertexAttribiv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetVertexAttribiv, GLuint, GLenum, target_ulong, index, pname, params);
yagl_host_glGetVertexAttribiv(index, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glGetVertexAttribPointerv dispatcher. id = 79
*/
-static void yagl_func_glGetVertexAttribPointerv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glGetVertexAttribPointerv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glGetVertexAttribPointerv, GLuint, GLenum, target_ulong, index, pname, pointer);
yagl_host_glGetVertexAttribPointerv(index, pname, pointer);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glHint dispatcher. id = 80
*/
-static void yagl_func_glHint(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glHint(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glHint, GLenum, GLenum, target, mode);
yagl_host_glHint(target, mode);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glIsBuffer dispatcher. id = 81
*/
-static void yagl_func_glIsBuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsBuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsBuffer(buffer);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsEnabled dispatcher. id = 82
*/
-static void yagl_func_glIsEnabled(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsEnabled(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsEnabled(cap);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsFramebuffer dispatcher. id = 83
*/
-static void yagl_func_glIsFramebuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsFramebuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsFramebuffer(framebuffer);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsProgram dispatcher. id = 84
*/
-static void yagl_func_glIsProgram(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsProgram(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsProgram(program);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsRenderbuffer dispatcher. id = 85
*/
-static void yagl_func_glIsRenderbuffer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsRenderbuffer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsRenderbuffer(renderbuffer);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsShader dispatcher. id = 86
*/
-static void yagl_func_glIsShader(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsShader(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsShader(shader);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glIsTexture dispatcher. id = 87
*/
-static void yagl_func_glIsTexture(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glIsTexture(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
GLboolean ret = yagl_host_glIsTexture(texture);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, ret);
yagl_marshal_put_GLboolean(&in_buff, ret);
+ return out_buff;
}
/*
* glLineWidth dispatcher. id = 88
*/
-static void yagl_func_glLineWidth(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLineWidth(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLineWidth, GLfloat, width);
yagl_host_glLineWidth(width);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glLinkProgram dispatcher. id = 89
*/
-static void yagl_func_glLinkProgram(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glLinkProgram(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glLinkProgram, GLuint, program);
yagl_host_glLinkProgram(program);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPixelStorei dispatcher. id = 90
*/
-static void yagl_func_glPixelStorei(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPixelStorei(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPixelStorei, GLenum, GLint, pname, param);
yagl_host_glPixelStorei(pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glPolygonOffset dispatcher. id = 91
*/
-static void yagl_func_glPolygonOffset(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glPolygonOffset(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glPolygonOffset, GLfloat, GLfloat, factor, units);
yagl_host_glPolygonOffset(factor, units);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glReadPixels dispatcher. id = 92
*/
-static void yagl_func_glReadPixels(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glReadPixels(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT7(ts->ps->id, ts->id, glReadPixels, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, target_ulong, x, y, width, height, format, type, pixels);
yagl_host_glReadPixels(x, y, width, height, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glReleaseShaderCompiler dispatcher. id = 93
*/
-static void yagl_func_glReleaseShaderCompiler(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glReleaseShaderCompiler(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT0(ts->ps->id, ts->id, glReleaseShaderCompiler);
yagl_host_glReleaseShaderCompiler();
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glRenderbufferStorage dispatcher. id = 94
*/
-static void yagl_func_glRenderbufferStorage(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glRenderbufferStorage(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glRenderbufferStorage, GLenum, GLenum, GLsizei, GLsizei, target, internalformat, width, height);
yagl_host_glRenderbufferStorage(target, internalformat, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glSampleCoverage dispatcher. id = 95
*/
-static void yagl_func_glSampleCoverage(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glSampleCoverage(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glSampleCoverage, GLclampf, GLboolean, value, invert);
yagl_host_glSampleCoverage(value, invert);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glScissor dispatcher. id = 96
*/
-static void yagl_func_glScissor(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glScissor(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glScissor, GLint, GLint, GLsizei, GLsizei, x, y, width, height);
yagl_host_glScissor(x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glShaderBinary dispatcher. id = 97
*/
-static void yagl_func_glShaderBinary(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glShaderBinary(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glShaderBinary, GLsizei, target_ulong, GLenum, target_ulong, GLsizei, n, shaders, binaryformat, binary, length);
yagl_host_glShaderBinary(n, shaders, binaryformat, binary, length);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glShaderSource dispatcher. id = 98
*/
-static void yagl_func_glShaderSource(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glShaderSource(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glShaderSource, GLuint, GLsizei, target_ulong, target_ulong, shader, count, string, length);
yagl_host_glShaderSource(shader, count, string, length);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilFunc dispatcher. id = 99
*/
-static void yagl_func_glStencilFunc(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilFunc(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glStencilFunc, GLenum, GLint, GLuint, func, ref, mask);
yagl_host_glStencilFunc(func, ref, mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilFuncSeparate dispatcher. id = 100
*/
-static void yagl_func_glStencilFuncSeparate(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilFuncSeparate(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glStencilFuncSeparate, GLenum, GLenum, GLint, GLuint, face, func, ref, mask);
yagl_host_glStencilFuncSeparate(face, func, ref, mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilMask dispatcher. id = 101
*/
-static void yagl_func_glStencilMask(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilMask(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glStencilMask, GLuint, mask);
yagl_host_glStencilMask(mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilMaskSeparate dispatcher. id = 102
*/
-static void yagl_func_glStencilMaskSeparate(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilMaskSeparate(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glStencilMaskSeparate, GLenum, GLuint, face, mask);
yagl_host_glStencilMaskSeparate(face, mask);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilOp dispatcher. id = 103
*/
-static void yagl_func_glStencilOp(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilOp(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glStencilOp, GLenum, GLenum, GLenum, fail, zfail, zpass);
yagl_host_glStencilOp(fail, zfail, zpass);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glStencilOpSeparate dispatcher. id = 104
*/
-static void yagl_func_glStencilOpSeparate(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glStencilOpSeparate(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glStencilOpSeparate, GLenum, GLenum, GLenum, GLenum, face, fail, zfail, zpass);
yagl_host_glStencilOpSeparate(face, fail, zfail, zpass);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexImage2D dispatcher. id = 105
*/
-static void yagl_func_glTexImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT9(ts->ps->id, ts->id, glTexImage2D, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, target_ulong, target, level, internalformat, width, height, border, format, type, pixels);
yagl_host_glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameterf dispatcher. id = 106
*/
-static void yagl_func_glTexParameterf(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameterf(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameterf, GLenum, GLenum, GLfloat, target, pname, param);
yagl_host_glTexParameterf(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameterfv dispatcher. id = 107
*/
-static void yagl_func_glTexParameterfv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameterfv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameterfv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexParameterfv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameteri dispatcher. id = 108
*/
-static void yagl_func_glTexParameteri(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameteri(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameteri, GLenum, GLenum, GLint, target, pname, param);
yagl_host_glTexParameteri(target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexParameteriv dispatcher. id = 109
*/
-static void yagl_func_glTexParameteriv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexParameteriv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glTexParameteriv, GLenum, GLenum, target_ulong, target, pname, params);
yagl_host_glTexParameteriv(target, pname, params);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glTexSubImage2D dispatcher. id = 110
*/
-static void yagl_func_glTexSubImage2D(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glTexSubImage2D(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT9(ts->ps->id, ts->id, glTexSubImage2D, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, target_ulong, target, level, xoffset, yoffset, width, height, format, type, pixels);
yagl_host_glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform1f dispatcher. id = 111
*/
-static void yagl_func_glUniform1f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform1f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glUniform1f, GLint, GLfloat, location, x);
yagl_host_glUniform1f(location, x);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform1fv dispatcher. id = 112
*/
-static void yagl_func_glUniform1fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform1fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform1fv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform1fv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform1i dispatcher. id = 113
*/
-static void yagl_func_glUniform1i(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform1i(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glUniform1i, GLint, GLint, location, x);
yagl_host_glUniform1i(location, x);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform1iv dispatcher. id = 114
*/
-static void yagl_func_glUniform1iv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform1iv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform1iv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform1iv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform2f dispatcher. id = 115
*/
-static void yagl_func_glUniform2f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform2f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform2f, GLint, GLfloat, GLfloat, location, x, y);
yagl_host_glUniform2f(location, x, y);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform2fv dispatcher. id = 116
*/
-static void yagl_func_glUniform2fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform2fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform2fv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform2fv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform2i dispatcher. id = 117
*/
-static void yagl_func_glUniform2i(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform2i(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform2i, GLint, GLint, GLint, location, x, y);
yagl_host_glUniform2i(location, x, y);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform2iv dispatcher. id = 118
*/
-static void yagl_func_glUniform2iv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform2iv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform2iv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform2iv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform3f dispatcher. id = 119
*/
-static void yagl_func_glUniform3f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform3f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glUniform3f, GLint, GLfloat, GLfloat, GLfloat, location, x, y, z);
yagl_host_glUniform3f(location, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform3fv dispatcher. id = 120
*/
-static void yagl_func_glUniform3fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform3fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform3fv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform3fv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform3i dispatcher. id = 121
*/
-static void yagl_func_glUniform3i(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform3i(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glUniform3i, GLint, GLint, GLint, GLint, location, x, y, z);
yagl_host_glUniform3i(location, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform3iv dispatcher. id = 122
*/
-static void yagl_func_glUniform3iv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform3iv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform3iv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform3iv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform4f dispatcher. id = 123
*/
-static void yagl_func_glUniform4f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform4f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glUniform4f, GLint, GLfloat, GLfloat, GLfloat, GLfloat, location, x, y, z, w);
yagl_host_glUniform4f(location, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform4fv dispatcher. id = 124
*/
-static void yagl_func_glUniform4fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform4fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform4fv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform4fv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform4i dispatcher. id = 125
*/
-static void yagl_func_glUniform4i(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform4i(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glUniform4i, GLint, GLint, GLint, GLint, GLint, location, x, y, z, w);
yagl_host_glUniform4i(location, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniform4iv dispatcher. id = 126
*/
-static void yagl_func_glUniform4iv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniform4iv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glUniform4iv, GLint, GLsizei, target_ulong, location, count, v);
yagl_host_glUniform4iv(location, count, v);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniformMatrix2fv dispatcher. id = 127
*/
-static void yagl_func_glUniformMatrix2fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniformMatrix2fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glUniformMatrix2fv, GLint, GLsizei, GLboolean, target_ulong, location, count, transpose, value);
yagl_host_glUniformMatrix2fv(location, count, transpose, value);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniformMatrix3fv dispatcher. id = 128
*/
-static void yagl_func_glUniformMatrix3fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniformMatrix3fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glUniformMatrix3fv, GLint, GLsizei, GLboolean, target_ulong, location, count, transpose, value);
yagl_host_glUniformMatrix3fv(location, count, transpose, value);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUniformMatrix4fv dispatcher. id = 129
*/
-static void yagl_func_glUniformMatrix4fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUniformMatrix4fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glUniformMatrix4fv, GLint, GLsizei, GLboolean, target_ulong, location, count, transpose, value);
yagl_host_glUniformMatrix4fv(location, count, transpose, value);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glUseProgram dispatcher. id = 130
*/
-static void yagl_func_glUseProgram(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glUseProgram(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glUseProgram, GLuint, program);
yagl_host_glUseProgram(program);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glValidateProgram dispatcher. id = 131
*/
-static void yagl_func_glValidateProgram(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glValidateProgram(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT1(ts->ps->id, ts->id, glValidateProgram, GLuint, program);
yagl_host_glValidateProgram(program);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib1f dispatcher. id = 132
*/
-static void yagl_func_glVertexAttrib1f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib1f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glVertexAttrib1f, GLuint, GLfloat, indx, x);
yagl_host_glVertexAttrib1f(indx, x);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib1fv dispatcher. id = 133
*/
-static void yagl_func_glVertexAttrib1fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib1fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glVertexAttrib1fv, GLuint, target_ulong, indx, values);
yagl_host_glVertexAttrib1fv(indx, values);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib2f dispatcher. id = 134
*/
-static void yagl_func_glVertexAttrib2f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib2f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT3(ts->ps->id, ts->id, glVertexAttrib2f, GLuint, GLfloat, GLfloat, indx, x, y);
yagl_host_glVertexAttrib2f(indx, x, y);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib2fv dispatcher. id = 135
*/
-static void yagl_func_glVertexAttrib2fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib2fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glVertexAttrib2fv, GLuint, target_ulong, indx, values);
yagl_host_glVertexAttrib2fv(indx, values);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib3f dispatcher. id = 136
*/
-static void yagl_func_glVertexAttrib3f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib3f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glVertexAttrib3f, GLuint, GLfloat, GLfloat, GLfloat, indx, x, y, z);
yagl_host_glVertexAttrib3f(indx, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib3fv dispatcher. id = 137
*/
-static void yagl_func_glVertexAttrib3fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib3fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glVertexAttrib3fv, GLuint, target_ulong, indx, values);
yagl_host_glVertexAttrib3fv(indx, values);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib4f dispatcher. id = 138
*/
-static void yagl_func_glVertexAttrib4f(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib4f(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT5(ts->ps->id, ts->id, glVertexAttrib4f, GLuint, GLfloat, GLfloat, GLfloat, GLfloat, indx, x, y, z, w);
yagl_host_glVertexAttrib4f(indx, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttrib4fv dispatcher. id = 139
*/
-static void yagl_func_glVertexAttrib4fv(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttrib4fv(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT2(ts->ps->id, ts->id, glVertexAttrib4fv, GLuint, target_ulong, indx, values);
yagl_host_glVertexAttrib4fv(indx, values);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glVertexAttribPointer dispatcher. id = 140
*/
-static void yagl_func_glVertexAttribPointer(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glVertexAttribPointer(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT6(ts->ps->id, ts->id, glVertexAttribPointer, GLuint, GLint, GLenum, GLboolean, GLsizei, target_ulong, indx, size, type, normalized, stride, ptr);
yagl_host_glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
/*
* glViewport dispatcher. id = 141
*/
-static void yagl_func_glViewport(struct yagl_thread_state *ts,
+static uint8_t* yagl_func_glViewport(struct yagl_thread_state *ts,
uint8_t *out_buff,
uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_SPLIT4(ts->ps->id, ts->id, glViewport, GLint, GLint, GLsizei, GLsizei, x, y, width, height);
yagl_host_glViewport(x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
+ return out_buff;
}
const uint32_t yagl_gles2_api_num_funcs = 141;
#define YAGL_MEM_SIZE 0x1000
+#define YAGL_BUFF_SIZE 0x1000
+
#define YAGL_MAX_USERS (YAGL_MEM_SIZE / YAGL_REGS_SIZE)
struct yagl_user
struct yagl_user users[YAGL_MAX_USERS];
/*
- * TARGET_PAGE_SIZE byte buffer to hold the response since we can't
- * 'cpu_physical_memory_map' for both read and write.
+ * YAGL_MARSHAL_MAX_RESPONSE byte buffer to hold the response.
*/
uint8_t *in_buff;
} YaGLState;
{
yagl_pid target_pid;
yagl_tid target_tid;
- target_phys_addr_t buff_len = TARGET_PAGE_SIZE;
+ target_phys_addr_t buff_len = YAGL_BUFF_SIZE;
uint8_t *buff = NULL, *tmp = NULL;
YAGL_LOG_FUNC_ENTER_NPT(yagl_device_operate,
buff = cpu_physical_memory_map(buff_pa, &buff_len, false);
- if (!buff || (buff_len != TARGET_PAGE_SIZE)) {
+ if (!buff || (buff_len != YAGL_BUFF_SIZE)) {
YAGL_LOG_CRITICAL("cpu_physical_memory_map(read) failed for user %d, buff_ptr = 0x%X",
user_index,
(uint32_t)buff_pa);
buff,
s->in_buff)) {
cpu_physical_memory_unmap(buff,
- TARGET_PAGE_SIZE,
+ YAGL_BUFF_SIZE,
0,
- TARGET_PAGE_SIZE);
+ YAGL_BUFF_SIZE);
buff = cpu_physical_memory_map(buff_pa, &buff_len, true);
- if (!buff || (buff_len != TARGET_PAGE_SIZE)) {
+ if (!buff || (buff_len != YAGL_BUFF_SIZE)) {
YAGL_LOG_CRITICAL("cpu_physical_memory_map(write) failed for user %d, buff_ptr = 0x%X",
user_index,
(uint32_t)buff_pa);
out:
if (buff) {
cpu_physical_memory_unmap(buff,
- TARGET_PAGE_SIZE,
+ YAGL_BUFF_SIZE,
0,
- TARGET_PAGE_SIZE);
+ YAGL_BUFF_SIZE);
}
YAGL_LOG_FUNC_EXIT(NULL);
static void yagl_device_trigger(YaGLState *s, int user_index)
{
- target_phys_addr_t buff_len = TARGET_PAGE_SIZE;
+ target_phys_addr_t buff_len = YAGL_BUFF_SIZE;
uint8_t *buff = NULL;
+ uint8_t *current_buff;
YAGL_LOG_FUNC_ENTER_NPT(yagl_device_trigger, "%d", user_index);
&buff_len,
false);
- if (!buff || (buff_len != TARGET_PAGE_SIZE)) {
+ if (!buff || (buff_len != YAGL_BUFF_SIZE)) {
YAGL_LOG_CRITICAL("cpu_physical_memory_map(read) failed for user %d, buff_ptr = 0x%X",
user_index,
(uint32_t)s->users[user_index].buff_pa);
goto out;
}
- yagl_server_dispatch(s->ss,
- s->users[user_index].process_id,
- s->users[user_index].thread_id,
- buff,
- s->in_buff);
+ current_buff = buff;
- cpu_physical_memory_unmap(buff,
- TARGET_PAGE_SIZE,
- 0,
- TARGET_PAGE_SIZE);
+ while (true) {
+ uint8_t *tmp;
- buff = cpu_physical_memory_map(s->users[user_index].buff_pa,
- &buff_len,
- true);
+ if (current_buff >= (buff + YAGL_BUFF_SIZE)) {
+ YAGL_LOG_CRITICAL("batch passes the end of buffer, protocol error");
- if (!buff || (buff_len != TARGET_PAGE_SIZE)) {
- YAGL_LOG_CRITICAL("cpu_physical_memory_map(write) failed for user %d, buff_ptr = 0x%X",
- user_index,
- (uint32_t)s->users[user_index].buff_pa);
- goto out;
+ memset(s->in_buff, 0, YAGL_MARSHAL_MAX_RESPONSE);
+
+ break;
+ }
+
+ current_buff = yagl_server_dispatch(s->ss,
+ s->users[user_index].process_id,
+ s->users[user_index].thread_id,
+ current_buff,
+ s->in_buff);
+
+ if (!current_buff) {
+ /*
+ * Error occured.
+ */
+
+ break;
+ }
+
+ tmp = current_buff;
+
+ /*
+ * Take a peak to see if there's a batch terminator.
+ */
+
+ if (!yagl_marshal_get_uint32(&tmp)) {
+ break;
+ }
}
memcpy(buff, s->in_buff, YAGL_MARSHAL_MAX_RESPONSE);
out:
if (buff) {
cpu_physical_memory_unmap(buff,
- TARGET_PAGE_SIZE,
+ YAGL_BUFF_SIZE,
0,
- TARGET_PAGE_SIZE);
+ YAGL_BUFF_SIZE);
}
YAGL_LOG_FUNC_EXIT(NULL);
return -1;
}
- s->in_buff = g_malloc(TARGET_PAGE_SIZE);
+ s->in_buff = g_malloc(YAGL_MARSHAL_MAX_RESPONSE);
pci_register_bar(&s->dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->iomem);
#include "yagl_types.h"
#include "exec-memory.h"
-typedef enum
-{
- yagl_command_id_call = 1,
- yagl_command_id_ret = 2,
-} yagl_command_id;
-
/*
* All marshalling/unmarshalling must be done with 8-byte alignment,
* since this is the maximum alignment possible. This way we can
/*
* Each marshalled value is aligned
* at 8-byte boundary and there may be maximum
- * 3 values returned (yagl_command_id_ret response)
+ * 2 values returned (status and return value)
*/
-#define YAGL_MARSHAL_MAX_RESPONSE (8 * 3)
+#define YAGL_MARSHAL_MAX_RESPONSE (8 * 2)
static __inline int yagl_marshal_skip(uint8_t** buff)
{
#define yagl_marshal_get_uint32_t(buff) yagl_marshal_get_uint32(buff)
#define yagl_marshal_put_int(buff, value) yagl_marshal_put_int32(buff, (value))
#define yagl_marshal_get_int(buff) yagl_marshal_get_int32(buff)
-#define yagl_marshal_get_command_id(buff) yagl_marshal_get_uint32(buff)
#define yagl_marshal_get_pid(buff) yagl_marshal_get_uint32(buff)
#define yagl_marshal_get_tid(buff) yagl_marshal_get_uint32(buff)
#define yagl_marshal_get_api_id(buff) yagl_marshal_get_uint32(buff)
return NULL;
}
-/*
- * call command out_buff is:
- * (yagl_api_id) api_id
- * (yagl_func_id) func_id
- * ... api_id/func_id dependent
- * in_buff must be:
- * (uint32_t) 0 - call error
- * or
- * (uint32_t) 1 - call ok
- * (uint32_t) 0 - not ready yet
- * or
- * (uint32_t) 1 - call ok
- * (uint32_t) 1 - ready
- * ... api_id/func_id dependent
- */
-static void yagl_server_handle_call(struct yagl_server_state *ss,
- yagl_pid target_pid,
- yagl_tid target_tid,
- uint8_t *out_buff,
- uint8_t *in_buff)
-{
- yagl_api_id api_id = yagl_marshal_get_api_id(&out_buff);
- yagl_func_id func_id = yagl_marshal_get_func_id(&out_buff);
- struct yagl_api* api;
- struct yagl_thread_state *ts;
- uint32_t returned = 0;
- uint8_t *in_buff_ret;
-
- YAGL_LOG_FUNC_ENTER(target_pid,
- target_tid,
- yagl_server_handle_call,
- "api_id = %u, func_id = %u",
- api_id,
- func_id);
-
- ts = yagl_server_find_thread(ss, target_pid, target_tid);
-
- if (!ts) {
- YAGL_LOG_CRITICAL(
- "process/thread %u/%u not found",
- target_pid, target_tid);
-
- yagl_marshal_put_uint32(&in_buff, 0);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-
- return;
- }
-
- if ((api_id <= 0) || (api_id > YAGL_NUM_APIS)) {
- YAGL_LOG_CRITICAL(
- "target-host protocol error, bad api_id - %u", api_id);
-
- yagl_marshal_put_uint32(&in_buff, 0);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-
- return;
- }
-
- api = ss->apis[api_id - 1];
-
- if (!api) {
- YAGL_LOG_CRITICAL(
- "uninitialized api - %u. host logic error", api_id);
-
- yagl_marshal_put_uint32(&in_buff, 0);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-
- return;
- }
-
- in_buff_ret = in_buff;
-
- yagl_marshal_skip(&in_buff);
- yagl_marshal_skip(&in_buff);
-
- if (yagl_thread_call(ts, api_id, func_id, out_buff, in_buff, &returned)) {
- yagl_marshal_put_uint32(&in_buff_ret, 1);
- yagl_marshal_put_uint32(&in_buff_ret, returned);
- } else {
- yagl_marshal_put_uint32(&in_buff_ret, 0);
- }
-
- YAGL_LOG_FUNC_EXIT(NULL);
-}
-
-/*
- * in_buff must be:
- * (uint32_t) 0 - ret error
- * or
- * (uint32_t) 1 - ret ok
- * (uint32_t) 0 - not ready yet
- * or
- * (uint32_t) 1 - ret ok
- * (uint32_t) 1 - ready
- * ... api_id/func_id dependent
- */
-static void yagl_server_handle_ret(struct yagl_server_state *ss,
- yagl_pid target_pid,
- yagl_tid target_tid,
- uint8_t *in_buff)
-{
- uint8_t *in_buff_ret;
- struct yagl_thread_state *ts;
- uint32_t returned = 0;
-
- YAGL_LOG_FUNC_ENTER(target_pid,
- target_tid,
- yagl_server_handle_ret,
- NULL);
-
- ts = yagl_server_find_thread(ss, target_pid, target_tid);
-
- if (!ts) {
- YAGL_LOG_CRITICAL(
- "process/thread %u/%u not found",
- target_pid, target_tid);
-
- yagl_marshal_put_uint32(&in_buff, 0);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-
- return;
- }
-
- in_buff_ret = in_buff;
-
- yagl_marshal_skip(&in_buff);
- yagl_marshal_skip(&in_buff);
-
- if (yagl_thread_try_return(ts, in_buff, &returned)) {
- yagl_marshal_put_uint32(&in_buff_ret, 1);
- yagl_marshal_put_uint32(&in_buff_ret, returned);
- } else {
- yagl_marshal_put_uint32(&in_buff_ret, 0);
- }
-
- YAGL_LOG_FUNC_EXIT("%u", returned);
-}
-
struct yagl_server_state *yagl_server_state_create(void)
{
int i;
}
}
-void yagl_server_dispatch(struct yagl_server_state *ss,
- yagl_pid target_pid,
- yagl_tid target_tid,
- uint8_t *out_buff,
- uint8_t *in_buff)
+/*
+ * out_buff is:
+ * (yagl_api_id) api_id
+ * (yagl_func_id) func_id
+ * ... api_id/func_id dependent
+ * in_buff must be:
+ * (uint32_t) 1/0 - call ok/failed
+ * ... api_id/func_id dependent
+ */
+uint8_t *yagl_server_dispatch(struct yagl_server_state *ss,
+ yagl_pid target_pid,
+ yagl_tid target_tid,
+ uint8_t *out_buff,
+ uint8_t *in_buff)
{
- yagl_command_id command_id = yagl_marshal_get_command_id(&out_buff);
-
- YAGL_LOG_FUNC_ENTER_NPT(yagl_server_dispatch, NULL);
-
- switch (command_id) {
- case yagl_command_id_call:
- yagl_server_handle_call(ss, target_pid, target_tid, out_buff, in_buff);
- break;
- case yagl_command_id_ret:
- yagl_server_handle_ret(ss, target_pid, target_tid, in_buff);
- break;
- default:
+ yagl_api_id api_id = yagl_marshal_get_api_id(&out_buff);
+ yagl_func_id func_id = yagl_marshal_get_func_id(&out_buff);
+ struct yagl_api* api;
+ struct yagl_thread_state *ts;
+ uint8_t *in_buff_ret;
+
+ YAGL_LOG_FUNC_ENTER(target_pid,
+ target_tid,
+ yagl_server_dispatch,
+ "api_id = %u, func_id = %u",
+ api_id,
+ func_id);
+
+ ts = yagl_server_find_thread(ss, target_pid, target_tid);
+
+ if (!ts) {
+ YAGL_LOG_CRITICAL(
+ "process/thread %u/%u not found",
+ target_pid, target_tid);
+
+ yagl_marshal_put_uint32(&in_buff, 0);
+
+ YAGL_LOG_FUNC_EXIT(NULL);
+
+ return NULL;
+ }
+
+ if ((api_id <= 0) || (api_id > YAGL_NUM_APIS)) {
+ YAGL_LOG_CRITICAL(
+ "target-host protocol error, bad api_id - %u", api_id);
+
+ yagl_marshal_put_uint32(&in_buff, 0);
+
+ YAGL_LOG_FUNC_EXIT(NULL);
+
+ return NULL;
+ }
+
+ api = ss->apis[api_id - 1];
+
+ if (!api) {
YAGL_LOG_CRITICAL(
- "target-host protocol error, unknown command id - %d\n", command_id);
- memset(in_buff, 0, TARGET_PAGE_SIZE);
+ "uninitialized api - %u. host logic error", api_id);
+
+ yagl_marshal_put_uint32(&in_buff, 0);
+
+ YAGL_LOG_FUNC_EXIT(NULL);
+
+ return NULL;
}
+ in_buff_ret = in_buff;
+
+ yagl_marshal_skip(&in_buff);
+
+ out_buff = yagl_thread_call(ts, api_id, func_id, out_buff, in_buff);
+
+ yagl_marshal_put_uint32(&in_buff_ret, (out_buff ? 1 : 0));
+
YAGL_LOG_FUNC_EXIT(NULL);
+
+ return out_buff;
}
void yagl_server_dispatch_exit(struct yagl_server_state *ss,
void yagl_server_reset(struct yagl_server_state *ss);
/*
- * This is called for first YaGL call. 'buff' is guaranteed to be one
- * target page long, server code should not read/write more.
+ * This is called for first YaGL call.
*/
bool yagl_server_dispatch_init(struct yagl_server_state *ss,
yagl_pid target_pid,
uint8_t *in_buff);
/*
- * This is called for each host YaGL call. 'buff' is guaranteed to be one
- * target page long, server code should not read/write more.
+ * This is called for each host YaGL call. Returns new
+ * position of 'out_buff' on success and NULL on failure.
*/
-void yagl_server_dispatch(struct yagl_server_state *ss,
- yagl_pid target_pid,
- yagl_tid target_tid,
- uint8_t *out_buff,
- uint8_t *in_buff);
+uint8_t *yagl_server_dispatch(struct yagl_server_state *ss,
+ yagl_pid target_pid,
+ yagl_tid target_tid,
+ uint8_t *out_buff,
+ uint8_t *in_buff);
/*
* This is called for last YaGL call.
break;
}
- /*
- * At this point we should have api id, func id and out buffer.
- */
-
- assert(ts->current_api);
- assert(ts->current_func);
- assert(ts->current_out_buff);
-
YAGL_LOG_TRACE("calling (api = %u, func = %u)",
ts->current_api,
ts->current_func);
api_ps = ts->ps->api_states[ts->current_api - 1];
assert(api_ps);
- /*
- * Only here we can reset return events, since it's guaranteed that
- * the caller and host thread are in sync at this point.
- */
-
- yagl_event_reset(&ts->return_event);
- yagl_event_reset(&ts->return_processed_event);
-
func = api_ps->get_func(api_ps, ts->current_func);
- ts->call_was_processed = false;
-
if (!func) {
api_ps->bad_call();
+ ts->current_out_buff = NULL;
} else {
- func(ts, ts->current_out_buff, ts->in_buff);
+ ts->current_out_buff = func(ts,
+ ts->current_out_buff,
+ ts->current_in_buff);
}
- assert(ts->call_was_processed || !ts->can_return);
-
- YAGL_LOG_TRACE("returned");
-
- if (!yagl_event_is_set(&ts->return_processed_event)) {
- /*
- * 'YAGL_BARRIER_ARG_NORET' was not called, that's the most common
- * case.
- */
- if (ts->call_was_processed) {
- /*
- * 'func' did call 'YAGL_BARRIER_ARG'. This is
- * slow path.
- */
-
- /*
- * In case it didn't call 'YAGL_BARRIER_RET'.
- */
- if (!yagl_thread_wait_return(ts)) {
- break;
- }
-
- /*
- * At this point caller is waiting for return.
- */
- assert(ts->current_in_buff);
-
- memcpy(ts->current_in_buff,
- ts->in_buff,
- YAGL_MARSHAL_MAX_RESPONSE);
-
- ts->current_env = NULL;
- yagl_event_set(&ts->return_processed_event);
- } else {
- /*
- * 'func' didn't call neither 'YAGL_BARRIER_ARG' nor
- * 'YAGL_BARRIER_XXX_RET', this is fast path.
- */
- assert(!ts->can_return);
-
- /*
- * We can't be in destroying state cause we know for sure
- * we're in 'yagl_thread_call'.
- */
- assert(!ts->destroying);
-
- /*
- * And we know for sure that buffer is available at
- * this point.
- */
- assert(ts->current_in_buff);
-
- memcpy(ts->current_in_buff,
- ts->in_buff,
- YAGL_MARSHAL_MAX_RESPONSE);
-
- ts->call_was_processed = true;
- ts->can_return = true;
- ts->current_env = NULL;
- yagl_event_set(&ts->call_processed_event);
- yagl_event_set(&ts->return_processed_event);
- }
- }
+ yagl_event_set(&ts->call_processed_event);
}
/*
yagl_event_init(&ts->call_event, 0, 0);
yagl_event_init(&ts->call_processed_event, 0, 0);
- yagl_event_init(&ts->return_event, 1, 0);
- yagl_event_init(&ts->return_processed_event, 1, 0);
-
- ts->in_buff = g_malloc0(TARGET_PAGE_SIZE);
-
qemu_thread_create(&ts->host_thread,
yagl_thread_func,
ts,
{
ts->destroying = true;
yagl_event_set(&ts->call_event);
- yagl_event_set(&ts->return_event);
qemu_thread_join(&ts->host_thread);
- g_free(ts->in_buff);
-
- yagl_event_cleanup(&ts->return_processed_event);
- yagl_event_cleanup(&ts->return_event);
-
yagl_event_cleanup(&ts->call_processed_event);
yagl_event_cleanup(&ts->call_event);
g_free(ts);
}
-bool yagl_thread_call(struct yagl_thread_state *ts,
- yagl_api_id api_id,
- yagl_func_id func_id,
- uint8_t *out_buff,
- uint8_t *in_buff,
- uint32_t* returned)
+uint8_t *yagl_thread_call(struct yagl_thread_state *ts,
+ yagl_api_id api_id,
+ yagl_func_id func_id,
+ uint8_t *out_buff,
+ uint8_t *in_buff)
{
YAGL_LOG_FUNC_ENTER_TS(ts,
yagl_thread_call,
api_id,
func_id);
- *returned = 0;
-
- if (ts->current_api || ts->current_func) {
- YAGL_LOG_CRITICAL(
- "another call (api = %u, func = %u) is already in progress, not scheduling (api = %u, func = %u)",
- ts->current_api, ts->current_func,
- api_id, func_id);
-
- YAGL_LOG_FUNC_EXIT(NULL);
-
- return false;
- }
-
assert(cpu_single_env);
ts->current_api = api_id;
ts->current_in_buff = in_buff;
ts->current_env = cpu_single_env;
- YAGL_LOG_TRACE("calling to (api = %u, func = %u)",
+ YAGL_LOG_TRACE("calling (api = %u, func = %u)",
ts->current_api,
ts->current_func);
yagl_event_set(&ts->call_event);
yagl_event_wait(&ts->call_processed_event);
- assert(!ts->current_env);
-
- if (ts->can_return) {
- /*
- * Fast path, we can return immediately.
- */
-
- /*
- * We need to set 'current_env' again for the case
- * when working thread has already called
- * 'YAGL_BARRIER_ARG/YAGL_BARRIER_RET' sequence.
- */
- ts->current_env = cpu_single_env;
-
- yagl_event_set(&ts->return_event);
- yagl_event_wait(&ts->return_processed_event);
-
- /*
- * We'll have to reset ourselves since the thread
- * might have issued 'ts->current_env = NULL' before
- * our 'ts->current_env = cpu_single_env'
- */
- ts->current_env = NULL;
-
- ts->current_api = 0;
- ts->current_func = 0;
- ts->can_return = false;
-
- *returned = 1;
- }
-
- ts->current_out_buff = NULL;
- ts->current_in_buff = NULL;
-
YAGL_LOG_FUNC_EXIT(NULL);
- return true;
-}
-
-bool yagl_thread_try_return(struct yagl_thread_state *ts,
- uint8_t *in_buff,
- uint32_t* returned)
-{
- YAGL_LOG_FUNC_ENTER_TS(ts, yagl_thread_try_return, NULL);
-
- *returned = 0;
-
- if (!ts->current_api || !ts->current_func) {
- YAGL_LOG_CRITICAL("no call in progress");
-
- YAGL_LOG_FUNC_EXIT("false");
-
- return false;
- }
-
- if (!ts->can_return) {
- YAGL_LOG_TRACE("still in progress (api = %u, func = %u)",
- ts->current_api,
- ts->current_func);
-
- YAGL_LOG_FUNC_EXIT("true");
-
- return true;
- }
-
- YAGL_LOG_TRACE("returning from (api = %u, func = %u)",
- ts->current_api,
- ts->current_func);
-
- assert(cpu_single_env);
-
- ts->current_in_buff = in_buff;
- ts->current_env = cpu_single_env;
-
- yagl_cpu_synchronize_state(ts->ps);
-
- yagl_event_set(&ts->return_event);
- yagl_event_wait(&ts->return_processed_event);
-
- /*
- * We'll have to reset ourselves since the thread
- * might have issued 'ts->current_env = NULL' before
- * our 'ts->current_env = cpu_single_env'
- */
- ts->current_env = NULL;
-
- ts->current_api = 0;
- ts->current_func = 0;
- ts->current_in_buff = NULL;
- ts->can_return = false;
-
- *returned = 1;
-
- YAGL_LOG_FUNC_EXIT("true");
-
- return true;
-}
-
-void yagl_thread_call_processed_willwait(struct yagl_thread_state *ts)
-{
- ts->call_was_processed = true;
- ts->current_env = NULL;
- yagl_event_set(&ts->call_processed_event);
-}
-
-void yagl_thread_call_processed_nowait(struct yagl_thread_state *ts)
-{
- ts->call_was_processed = true;
- ts->can_return = true;
- ts->current_env = NULL;
- yagl_event_set(&ts->call_processed_event);
- yagl_event_set(&ts->return_processed_event);
-}
-
-bool yagl_thread_wait_return(struct yagl_thread_state *ts)
-{
- ts->can_return = true;
- yagl_event_wait(&ts->return_event);
- return !ts->destroying;
+ return ts->current_out_buff;
}
* @}
*/
- /*
- * And these are manual reset.
- * @{
- */
- struct yagl_event return_event; /* Set whenever target wants return */
- struct yagl_event return_processed_event; /* Set whenever host processed target return */
- /*
- * @}
- */
-
- /*
- * Indicates that host thread processed the call. This is needed in order to
- * detect functions that do not set 'call_processed_event' due to errors for
- * example and set it ourselves in thread body.
- */
- volatile bool call_was_processed;
-
- volatile bool can_return; /* Indicates that host thread is ready to return the value */
-
volatile yagl_api_id current_api;
volatile yagl_func_id current_func;
/*
- * TARGET_PAGE_SIZE buffers, enough to marshal/unmarshal arguments.
- */
-
- /*
- * Allocated by the caller of yagl_thread_call/yagl_thread_try_return,
+ * Allocated by the caller of yagl_thread_call,
* invalidated after function return.
*/
uint8_t * volatile current_out_buff;
uint8_t * volatile current_in_buff;
/*
- * Set by the caller of yagl_thread_call/yagl_thread_try_return for
+ * Set by the caller of yagl_thread_call for
* the time of call. This is the time when host thread can
* read/write target memory.
*/
CPUArchState * volatile current_env;
-
- /*
- * Allocated here, copied to 'current_in_buff' when needed.
- */
- uint8_t *in_buff;
};
struct yagl_thread_state
void yagl_thread_state_destroy(struct yagl_thread_state *ts);
-bool yagl_thread_call(struct yagl_thread_state *ts,
- yagl_api_id api_id,
- yagl_func_id func_id,
- uint8_t *out_buff,
- uint8_t *in_buff,
- uint32_t* returned);
-
-bool yagl_thread_try_return(struct yagl_thread_state *ts,
- uint8_t *in_buff,
- uint32_t* returned);
-
-/*
- * Function below should only be called by API dispatch functions.
- * @{
- */
-
-/*
- * Specifies that a call was processed and the caller can return.
- * You should call 'yagl_thread_wait_return' at some point later.
- * If you don't call 'yagl_thread_wait_return' then it'll be called
- * automatically for you.
- */
-void yagl_thread_call_processed_willwait(struct yagl_thread_state *ts);
-
-/*
- * Specifies that a call was processed and the caller can return.
- * You should not call 'yagl_thread_wait_return'.
- */
-void yagl_thread_call_processed_nowait(struct yagl_thread_state *ts);
-
/*
- * Waits for the caller to query for return. If return value is false then
- * the target thread terminated and you should return as soon as possible.
+ * Returns new position of 'out_buff' on success and NULL on failure.
*/
-bool yagl_thread_wait_return(struct yagl_thread_state *ts);
-
-/*
- * @}
- */
-
-#define YAGL_BARRIER_ARG(ts) yagl_thread_call_processed_willwait(ts)
-#define YAGL_BARRIER_RET(ts) yagl_thread_wait_return(ts)
-#define YAGL_BARRIER_ARG_NORET(ts) yagl_thread_call_processed_nowait(ts)
+uint8_t *yagl_thread_call(struct yagl_thread_state *ts,
+ yagl_api_id api_id,
+ yagl_func_id func_id,
+ uint8_t *out_buff,
+ uint8_t *in_buff);
+
+#define YAGL_BARRIER_ARG(ts)
+#define YAGL_BARRIER_RET(ts) 1
+#define YAGL_BARRIER_ARG_NORET(ts)
#endif
struct yagl_thread_state;
-typedef void (*yagl_api_func)(struct yagl_thread_state */*ts*/,
- uint8_t */*out_buff*/,
- uint8_t */*in_buff*/);
+typedef uint8_t *(*yagl_api_func)(struct yagl_thread_state */*ts*/,
+ uint8_t */*out_buff*/,
+ uint8_t */*in_buff*/);
#endif
/*
* Whenever protocol changes be sure to bump this.
*/
-#define YAGL_VERSION 2
+#define YAGL_VERSION 3
#endif