{
struct yagl_api *api;
- void (*thread_init)(struct yagl_api_ps */*api_ps*/);
+ void (*thread_init)(struct yagl_thread_state */*ts*/, struct yagl_api_ps */*api_ps*/);
- void (*batch_start)(struct yagl_api_ps */*api_ps*/);
+ void (*batch_start)(struct yagl_thread_state */*ts*/, struct yagl_api_ps */*api_ps*/);
yagl_api_func (*get_func)(struct yagl_api_ps */*api_ps*/,
uint32_t /*func_id*/);
- void (*batch_end)(struct yagl_api_ps */*api_ps*/);
+ void (*batch_end)(struct yagl_thread_state */*ts*/, struct yagl_api_ps */*api_ps*/);
- void (*thread_fini)(struct yagl_api_ps */*api_ps*/);
+ void (*thread_fini)(struct yagl_thread_state */*ts*/, struct yagl_api_ps */*api_ps*/);
- void (*destroy)(struct yagl_api_ps */*api_ps*/);
+ void (*destroy)(struct yagl_thread_state */*ts*/, struct yagl_api_ps */*api_ps*/);
};
void yagl_api_ps_init(struct yagl_api_ps *api_ps,
struct yagl_api
{
- struct yagl_api_ps *(*process_init)(struct yagl_api */*api*/);
+ struct yagl_api_ps *(*process_init)(struct yagl_process_state *ps, struct yagl_api */*api*/);
void (*destroy)(struct yagl_api */*api*/);
};
egl_api_ps->backend = backend;
egl_api_ps->egl_iface = egl_iface;
- yagl_process_register_egl_interface(cur_ts->ps, egl_api_ps->egl_iface);
-
QLIST_INIT(&egl_api_ps->displays);
}
}
assert(QLIST_EMPTY(&egl_api_ps->displays));
-
- yagl_process_unregister_egl_interface(cur_ts->ps);
}
struct yagl_egl_display *yagl_egl_api_ps_display_get(struct yagl_egl_api_ps *egl_api_ps,
return NULL;
}
-struct yagl_egl_display *yagl_egl_api_ps_display_add(struct yagl_egl_api_ps *egl_api_ps,
+struct yagl_egl_display *yagl_egl_api_ps_display_add(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_api_ps *egl_api_ps,
uint32_t display_id)
{
struct yagl_egl_display *dpy;
}
}
- dpy = yagl_egl_display_create(egl_api_ps->backend, display_id);
+ dpy = yagl_egl_display_create(cur_ts, egl_api_ps->backend, display_id);
if (!dpy) {
return NULL;
struct yagl_egl_display *yagl_egl_api_ps_display_get(struct yagl_egl_api_ps *egl_api_ps,
yagl_host_handle handle);
-struct yagl_egl_display *yagl_egl_api_ps_display_add(struct yagl_egl_api_ps *egl_api_ps,
+struct yagl_egl_display *yagl_egl_api_ps_display_add(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_api_ps *egl_api_ps,
uint32_t display_id);
#endif
#include "yagl_eglb_context.h"
#include "yagl_egl_backend.h"
-void yagl_egl_api_ts_init(struct yagl_egl_api_ts *egl_api_ts,
+void yagl_egl_api_ts_init(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_api_ts *egl_api_ts,
struct yagl_egl_api_ps *api_ps)
{
egl_api_ts->api_ps = api_ps;
yagl_egl_api_ts_reset(egl_api_ts);
}
-void yagl_egl_api_ts_cleanup(struct yagl_egl_api_ts *egl_api_ts)
+void yagl_egl_api_ts_cleanup(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_api_ts *egl_api_ts)
{
if (egl_api_ts->context) {
/*
* Force release current.
*/
- egl_api_ts->backend->release_current(egl_api_ts->backend, true);
+ egl_api_ts->backend->release_current(cur_ts, egl_api_ts->backend, true);
yagl_egl_context_update_surfaces(egl_api_ts->context, NULL, NULL);
}
struct yagl_egl_context *context;
};
-void yagl_egl_api_ts_init(struct yagl_egl_api_ts *egl_api_ts,
+void yagl_egl_api_ts_init(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_api_ts *egl_api_ts,
struct yagl_egl_api_ps *api_ps);
-void yagl_egl_api_ts_cleanup(struct yagl_egl_api_ts *egl_api_ts);
+void yagl_egl_api_ts_cleanup(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_api_ts *egl_api_ts);
void yagl_egl_api_ts_update_context(struct yagl_egl_api_ts *egl_api_ts,
struct yagl_egl_context *ctx);
*/
static void yagl_func_eglGetDisplay(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
uint32_t display_id;
EGLint *error;
yagl_host_handle *retval;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(eglGetDisplay, uint32_t, void*, display_id, error);
- *retval = yagl_host_eglGetDisplay(display_id, error);
+ *retval = yagl_host_eglGetDisplay(cur_ts, display_id, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglInitialize(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
EGLint *major;
EGLint *minor;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT4(eglInitialize, yagl_host_handle, void*, void*, void*, dpy, major, minor, error);
- *retval = yagl_host_eglInitialize(dpy, major, minor, error);
+ *retval = yagl_host_eglInitialize(cur_ts, dpy, major, minor, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglTerminate(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
EGLint *error;
EGLBoolean *retval;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(eglTerminate, yagl_host_handle, void*, dpy, error);
- *retval = yagl_host_eglTerminate(dpy, error);
+ *retval = yagl_host_eglTerminate(cur_ts, dpy, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglGetConfigs(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle *configs;
int32_t configs_maxcount;
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT3(eglGetConfigs, yagl_host_handle, void*, void*, dpy, configs, error);
*configs_count = 0;
- *retval = yagl_host_eglGetConfigs(dpy, configs, configs_maxcount, configs_count, error);
+ *retval = yagl_host_eglGetConfigs(cur_ts, dpy, configs, configs_maxcount, configs_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglChooseConfig(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
const EGLint *attrib_list;
int32_t attrib_list_count;
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT4(eglChooseConfig, yagl_host_handle, void*, void*, void*, dpy, attrib_list, configs, error);
*configs_count = 0;
- *retval = yagl_host_eglChooseConfig(dpy, attrib_list, attrib_list_count, configs, configs_maxcount, configs_count, error);
+ *retval = yagl_host_eglChooseConfig(cur_ts, dpy, attrib_list, attrib_list_count, configs, configs_maxcount, configs_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglGetConfigAttrib(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
EGLint attribute;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglGetConfigAttrib, yagl_host_handle, yagl_host_handle, EGLint, void*, void*, dpy, config, attribute, value, error);
- *retval = yagl_host_eglGetConfigAttrib(dpy, config, attribute, value, error);
+ *retval = yagl_host_eglGetConfigAttrib(cur_ts, dpy, config, attribute, value, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglDestroySurface(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
EGLint *error;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT3(eglDestroySurface, yagl_host_handle, yagl_host_handle, void*, dpy, surface, error);
- *retval = yagl_host_eglDestroySurface(dpy, surface, error);
+ *retval = yagl_host_eglDestroySurface(cur_ts, dpy, surface, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglQuerySurface(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
EGLint attribute;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglQuerySurface, yagl_host_handle, yagl_host_handle, EGLint, void*, void*, dpy, surface, attribute, value, error);
- *retval = yagl_host_eglQuerySurface(dpy, surface, attribute, value, error);
+ *retval = yagl_host_eglQuerySurface(cur_ts, dpy, surface, attribute, value, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglBindAPI(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
EGLenum api;
api = yagl_transport_get_out_EGLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(eglBindAPI, EGLenum, api);
*/
static void yagl_func_eglWaitClient(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(eglWaitClient);
- (void)yagl_host_eglWaitClient();
+ (void)yagl_host_eglWaitClient(t->ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_eglReleaseThread(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
EGLint *error;
EGLBoolean *retval;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT1(eglReleaseThread, void*, error);
- *retval = yagl_host_eglReleaseThread(error);
+ *retval = yagl_host_eglReleaseThread(t->ts, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglSurfaceAttrib(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
EGLint attribute;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglSurfaceAttrib, yagl_host_handle, yagl_host_handle, EGLint, EGLint, void*, dpy, surface, attribute, value, error);
- *retval = yagl_host_eglSurfaceAttrib(dpy, surface, attribute, value, error);
+ *retval = yagl_host_eglSurfaceAttrib(cur_ts, dpy, surface, attribute, value, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglCreateContext(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
yagl_host_handle share_context;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglCreateContext, yagl_host_handle, yagl_host_handle, yagl_host_handle, void*, void*, dpy, config, share_context, attrib_list, error);
- *retval = yagl_host_eglCreateContext(dpy, config, share_context, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreateContext(cur_ts, dpy, config, share_context, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglDestroyContext(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle ctx;
EGLint *error;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT3(eglDestroyContext, yagl_host_handle, yagl_host_handle, void*, dpy, ctx, error);
- *retval = yagl_host_eglDestroyContext(dpy, ctx, error);
+ *retval = yagl_host_eglDestroyContext(cur_ts, dpy, ctx, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglMakeCurrent(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle draw;
yagl_host_handle read;
read = yagl_transport_get_out_yagl_host_handle(t);
ctx = yagl_transport_get_out_yagl_host_handle(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(eglMakeCurrent, yagl_host_handle, yagl_host_handle, yagl_host_handle, yagl_host_handle, dpy, draw, read, ctx);
- (void)yagl_host_eglMakeCurrent(dpy, draw, read, ctx);
+ (void)yagl_host_eglMakeCurrent(cur_ts, dpy, draw, read, ctx);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_eglQueryContext(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle ctx;
EGLint attribute;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglQueryContext, yagl_host_handle, yagl_host_handle, EGLint, void*, void*, dpy, ctx, attribute, value, error);
- *retval = yagl_host_eglQueryContext(dpy, ctx, attribute, value, error);
+ *retval = yagl_host_eglQueryContext(cur_ts, dpy, ctx, attribute, value, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglSwapBuffers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
dpy = yagl_transport_get_out_yagl_host_handle(t);
surface = yagl_transport_get_out_yagl_host_handle(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(eglSwapBuffers, yagl_host_handle, yagl_host_handle, dpy, surface);
- (void)yagl_host_eglSwapBuffers(dpy, surface);
+ (void)yagl_host_eglSwapBuffers(cur_ts, dpy, surface);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_eglCopyBuffers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
dpy = yagl_transport_get_out_yagl_host_handle(t);
surface = yagl_transport_get_out_yagl_host_handle(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(eglCopyBuffers, yagl_host_handle, yagl_host_handle, dpy, surface);
- (void)yagl_host_eglCopyBuffers(dpy, surface);
+ (void)yagl_host_eglCopyBuffers(cur_ts, dpy, surface);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_eglCreateWindowSurfaceOffscreenYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
uint32_t width;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT8(eglCreateWindowSurfaceOffscreenYAGL, yagl_host_handle, yagl_host_handle, uint32_t, uint32_t, uint32_t, target_ulong, void*, void*, dpy, config, width, height, bpp, pixels, attrib_list, error);
- *retval = yagl_host_eglCreateWindowSurfaceOffscreenYAGL(dpy, config, width, height, bpp, pixels, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreateWindowSurfaceOffscreenYAGL(cur_ts, dpy, config, width, height, bpp, pixels, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglCreatePbufferSurfaceOffscreenYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
uint32_t width;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT8(eglCreatePbufferSurfaceOffscreenYAGL, yagl_host_handle, yagl_host_handle, uint32_t, uint32_t, uint32_t, target_ulong, void*, void*, dpy, config, width, height, bpp, pixels, attrib_list, error);
- *retval = yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(dpy, config, width, height, bpp, pixels, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(cur_ts, dpy, config, width, height, bpp, pixels, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglCreatePixmapSurfaceOffscreenYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
uint32_t width;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT8(eglCreatePixmapSurfaceOffscreenYAGL, yagl_host_handle, yagl_host_handle, uint32_t, uint32_t, uint32_t, target_ulong, void*, void*, dpy, config, width, height, bpp, pixels, attrib_list, error);
- *retval = yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(dpy, config, width, height, bpp, pixels, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(cur_ts, dpy, config, width, height, bpp, pixels, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglResizeOffscreenSurfaceYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
uint32_t width;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT7(eglResizeOffscreenSurfaceYAGL, yagl_host_handle, yagl_host_handle, uint32_t, uint32_t, uint32_t, target_ulong, void*, dpy, surface, width, height, bpp, pixels, error);
- *retval = yagl_host_eglResizeOffscreenSurfaceYAGL(dpy, surface, width, height, bpp, pixels, error);
+ *retval = yagl_host_eglResizeOffscreenSurfaceYAGL(cur_ts, dpy, surface, width, height, bpp, pixels, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
*/
static void yagl_func_eglCreateWindowSurfaceOnscreenYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
yagl_winsys_id win;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglCreateWindowSurfaceOnscreenYAGL, yagl_host_handle, yagl_host_handle, yagl_winsys_id, void*, void*, dpy, config, win, attrib_list, error);
- *retval = yagl_host_eglCreateWindowSurfaceOnscreenYAGL(dpy, config, win, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreateWindowSurfaceOnscreenYAGL(cur_ts, dpy, config, win, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglCreatePbufferSurfaceOnscreenYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
yagl_winsys_id buffer;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglCreatePbufferSurfaceOnscreenYAGL, yagl_host_handle, yagl_host_handle, yagl_winsys_id, void*, void*, dpy, config, buffer, attrib_list, error);
- *retval = yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(dpy, config, buffer, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(cur_ts, dpy, config, buffer, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglCreatePixmapSurfaceOnscreenYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle config;
yagl_winsys_id pixmap;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT5(eglCreatePixmapSurfaceOnscreenYAGL, yagl_host_handle, yagl_host_handle, yagl_winsys_id, void*, void*, dpy, config, pixmap, attrib_list, error);
- *retval = yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(dpy, config, pixmap, attrib_list, attrib_list_count, error);
+ *retval = yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(cur_ts, dpy, config, pixmap, attrib_list, attrib_list_count, error);
YAGL_LOG_FUNC_EXIT_SPLIT(yagl_host_handle, *retval);
}
*/
static void yagl_func_eglInvalidateOnscreenSurfaceYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
yagl_host_handle dpy;
yagl_host_handle surface;
yagl_winsys_id buffer;
surface = yagl_transport_get_out_yagl_host_handle(t);
buffer = yagl_transport_get_out_yagl_winsys_id(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(eglInvalidateOnscreenSurfaceYAGL, yagl_host_handle, yagl_host_handle, yagl_winsys_id, dpy, surface, buffer);
- (void)yagl_host_eglInvalidateOnscreenSurfaceYAGL(dpy, surface, buffer);
+ (void)yagl_host_eglInvalidateOnscreenSurfaceYAGL(cur_ts, dpy, surface, buffer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_eglCreateImageYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
uint32_t texture;
yagl_host_handle dpy;
yagl_winsys_id buffer;
yagl_transport_get_in_arg(t, (void**)&error);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT4(eglCreateImageYAGL, uint32_t, yagl_host_handle, yagl_winsys_id, void*, texture, dpy, buffer, error);
- *retval = yagl_host_eglCreateImageYAGL(texture, dpy, buffer, error);
+ *retval = yagl_host_eglCreateImageYAGL(cur_ts, texture, dpy, buffer, error);
YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, *retval);
}
}
struct yagl_egl_context
- *yagl_egl_context_create(struct yagl_egl_display *dpy,
+ *yagl_egl_context_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_display *dpy,
struct yagl_egl_config *cfg,
struct yagl_eglb_context *backend_share_ctx,
int version)
struct yagl_eglb_context *backend_ctx;
struct yagl_egl_context *ctx;
- backend_ctx = dpy->backend_dpy->create_context(dpy->backend_dpy,
+ backend_ctx = dpy->backend_dpy->create_context(cur_ts,
+ dpy->backend_dpy,
&cfg->native,
backend_share_ctx,
version);
* Takes ownership of 'client_ctx'.
*/
struct yagl_egl_context
- *yagl_egl_context_create(struct yagl_egl_display *dpy,
+ *yagl_egl_context_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_display *dpy,
struct yagl_egl_config *cfg,
struct yagl_eglb_context *backend_share_ctx,
int version);
#include "yagl_handle_gen.h"
struct yagl_egl_display
- *yagl_egl_display_create(struct yagl_egl_backend *backend,
+ *yagl_egl_display_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend,
uint32_t display_id)
{
struct yagl_eglb_display *backend_dpy;
g_free(dpy);
}
-void yagl_egl_display_initialize(struct yagl_egl_display *dpy)
+void yagl_egl_display_initialize(struct yagl_thread_state *cur_ts, struct yagl_egl_display *dpy)
{
struct yagl_egl_config **cfgs;
int i, num_configs = 0;
};
struct yagl_egl_display
- *yagl_egl_display_create(struct yagl_egl_backend *backend,
+ *yagl_egl_display_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend,
uint32_t display_id);
void yagl_egl_display_destroy(struct yagl_egl_display *dpy);
-void yagl_egl_display_initialize(struct yagl_egl_display *dpy);
+void yagl_egl_display_initialize(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_display *dpy);
bool yagl_egl_display_is_initialized(struct yagl_egl_display *dpy);
struct yagl_egl_backend *backend;
};
+// TODO remove and pass via argument
static YAGL_DEFINE_TLS(struct yagl_egl_api_ts*, egl_api_ts);
static uint32_t yagl_egl_get_ctx_id(struct yagl_egl_interface *iface)
}
}
-static __inline bool yagl_validate_display(yagl_host_handle dpy_,
+static __inline bool yagl_validate_display(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
struct yagl_egl_display **dpy,
EGLint *error)
{
return true;
}
-static __inline bool yagl_validate_config(struct yagl_egl_display *dpy,
+static __inline bool yagl_validate_config(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_display *dpy,
yagl_host_handle cfg_,
struct yagl_egl_config **cfg,
EGLint *error)
return true;
}
-static __inline bool yagl_validate_surface(struct yagl_egl_display *dpy,
+static __inline bool yagl_validate_surface(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_display *dpy,
yagl_host_handle sfc_,
struct yagl_egl_surface **sfc,
EGLint *error)
return true;
}
-static __inline bool yagl_validate_context(struct yagl_egl_display *dpy,
+static __inline bool yagl_validate_context(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_display *dpy,
yagl_host_handle ctx_,
struct yagl_egl_context **ctx,
EGLint *error)
return true;
}
-static bool yagl_egl_release_current_context(struct yagl_egl_display *dpy)
+static bool yagl_egl_release_current_context(struct yagl_thread_state *cur_ts, struct yagl_egl_display *dpy)
{
if (!egl_api_ts->context) {
return true;
}
- if (!egl_api_ts->backend->release_current(egl_api_ts->backend, false)) {
+ if (!egl_api_ts->backend->release_current(cur_ts, egl_api_ts->backend, false)) {
return false;
}
}
}
-static void yagl_host_egl_thread_init(struct yagl_api_ps *api_ps)
+static void yagl_host_egl_thread_init(struct yagl_thread_state *cur_ts, struct yagl_api_ps *api_ps)
{
struct yagl_egl_api_ps *egl_api_ps = (struct yagl_egl_api_ps*)api_ps;
YAGL_LOG_FUNC_ENTER(yagl_host_egl_thread_init, NULL);
- egl_api_ps->backend->thread_init(egl_api_ps->backend);
+ egl_api_ps->backend->thread_init(cur_ts, egl_api_ps->backend);
egl_api_ts = g_malloc0(sizeof(*egl_api_ts));
- yagl_egl_api_ts_init(egl_api_ts, egl_api_ps);
+ yagl_egl_api_ts_init(cur_ts, egl_api_ts, egl_api_ps);
cur_ts->egl_api_ts = egl_api_ts;
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_host_egl_batch_start(struct yagl_api_ps *api_ps)
+static void yagl_host_egl_batch_start(struct yagl_thread_state *cur_ts, struct yagl_api_ps *api_ps)
{
struct yagl_egl_api_ps *egl_api_ps = (struct yagl_egl_api_ps*)api_ps;
+ // TODO also remove
egl_api_ts = cur_ts->egl_api_ts;
- egl_api_ps->backend->batch_start(egl_api_ps->backend);
+ egl_api_ps->backend->batch_start(cur_ts, egl_api_ps->backend);
}
-static void yagl_host_egl_batch_end(struct yagl_api_ps *api_ps)
+static void yagl_host_egl_batch_end(struct yagl_thread_state *cur_ts, struct yagl_api_ps *api_ps)
{
struct yagl_egl_api_ps *egl_api_ps = (struct yagl_egl_api_ps*)api_ps;
- egl_api_ps->backend->batch_end(egl_api_ps->backend);
+ egl_api_ps->backend->batch_end(cur_ts, egl_api_ps->backend);
}
-static void yagl_host_egl_thread_fini(struct yagl_api_ps *api_ps)
+static void yagl_host_egl_thread_fini(struct yagl_thread_state *cur_ts, struct yagl_api_ps *api_ps)
{
struct yagl_egl_api_ps *egl_api_ps = (struct yagl_egl_api_ps*)api_ps;
YAGL_LOG_FUNC_ENTER(yagl_host_egl_thread_fini, NULL);
+ // TODO also remove
egl_api_ts = cur_ts->egl_api_ts;
- egl_api_ps->backend->batch_start(egl_api_ps->backend);
+ egl_api_ps->backend->batch_start(cur_ts, egl_api_ps->backend);
- yagl_egl_api_ts_cleanup(egl_api_ts);
+ yagl_egl_api_ts_cleanup(cur_ts, egl_api_ts);
g_free(egl_api_ts);
egl_api_ts = cur_ts->egl_api_ts = NULL;
- egl_api_ps->backend->batch_end(egl_api_ps->backend);
- egl_api_ps->backend->thread_fini(egl_api_ps->backend);
+ egl_api_ps->backend->batch_end(cur_ts, egl_api_ps->backend);
+ egl_api_ps->backend->thread_fini(cur_ts, egl_api_ps->backend);
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_host_egl_process_destroy(struct yagl_api_ps *api_ps)
+static void yagl_host_egl_process_destroy(struct yagl_thread_state *cur_ts, struct yagl_api_ps *api_ps)
{
struct yagl_egl_api_ps *egl_api_ps = (struct yagl_egl_api_ps*)api_ps;
yagl_egl_api_ps_cleanup(egl_api_ps);
+ yagl_process_unregister_egl_interface(cur_ts->ps);
+
g_free(egl_api_ps->egl_iface);
yagl_api_ps_cleanup(&egl_api_ps->base);
YAGL_LOG_FUNC_EXIT(NULL);
}
-struct yagl_api_ps *yagl_host_egl_process_init(struct yagl_api *api)
+struct yagl_api_ps *yagl_host_egl_process_init(struct yagl_process_state *ps, struct yagl_api *api)
{
struct yagl_egl_api *egl_api = (struct yagl_egl_api*)api;
struct yagl_egl_interface_impl *egl_iface;
struct yagl_egl_api_ps *egl_api_ps;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_host_egl_process_init, NULL);
yagl_egl_api_ps_init(egl_api_ps, egl_api->backend, &egl_iface->base);
+ yagl_process_register_egl_interface(ps, egl_api_ps->egl_iface);
+
YAGL_LOG_FUNC_EXIT(NULL);
return &egl_api_ps->base;
}
-yagl_host_handle yagl_host_eglGetDisplay(uint32_t display_id,
+yagl_host_handle yagl_host_eglGetDisplay(struct yagl_thread_state *cur_ts,
+ uint32_t display_id,
EGLint *error)
{
struct yagl_egl_display *dpy;
- dpy = yagl_egl_api_ps_display_add(egl_api_ts->api_ps, display_id);
+ dpy = yagl_egl_api_ps_display_add(cur_ts, egl_api_ts->api_ps, display_id);
return (dpy ? dpy->handle : 0);
}
-EGLBoolean yagl_host_eglInitialize(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglInitialize(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
EGLint *major,
EGLint *minor,
EGLint *error)
return EGL_FALSE;
}
- yagl_egl_display_initialize(dpy);
+ yagl_egl_display_initialize(cur_ts, dpy);
if (major) {
*major = YAGL_EGL_VERSION_MAJOR;
return EGL_TRUE;
}
-EGLBoolean yagl_host_eglTerminate(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglTerminate(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
EGLint *error)
{
struct yagl_egl_display *dpy = NULL;
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
return EGL_FALSE;
}
return EGL_TRUE;
}
-EGLBoolean yagl_host_eglGetConfigs(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglGetConfigs(struct yagl_thread_state *cur_ts, yagl_host_handle dpy_,
yagl_host_handle *configs, int32_t configs_maxcount, int32_t *configs_count,
EGLint *error)
{
struct yagl_egl_display *dpy = NULL;
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
return EGL_FALSE;
}
return EGL_TRUE;
}
-EGLBoolean yagl_host_eglChooseConfig(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglChooseConfig(struct yagl_thread_state *cur_ts, yagl_host_handle dpy_,
const EGLint *attrib_list, int32_t attrib_list_count,
yagl_host_handle *configs, int32_t configs_maxcount, int32_t *configs_count,
EGLint *error)
yagl_egl_native_config_init(&dummy);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
return res;
}
-EGLBoolean yagl_host_eglGetConfigAttrib(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglGetConfigAttrib(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
EGLint attribute,
EGLint *value,
YAGL_LOG_FUNC_SET(eglGetConfigAttrib);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
return res;
}
-EGLBoolean yagl_host_eglDestroySurface(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglDestroySurface(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_,
EGLint *error)
{
YAGL_LOG_FUNC_SET(eglDestroySurface);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, error)) {
goto out;
}
return res;
}
-EGLBoolean yagl_host_eglQuerySurface(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglQuerySurface(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_,
EGLint attribute,
EGLint *value,
YAGL_LOG_FUNC_SET(eglQuerySurface);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, error)) {
goto out;
}
}
break;
default:
- if (!surface->backend_sfc->query(surface->backend_sfc,
+ if (!surface->backend_sfc->query(cur_ts,
+ surface->backend_sfc,
attribute,
&tmp)) {
YAGL_SET_ERR(EGL_BAD_ATTRIBUTE);
egl_api_ts->api = api;
}
-void yagl_host_eglWaitClient(void)
+void yagl_host_eglWaitClient(struct yagl_thread_state *cur_ts)
{
struct yagl_egl_surface *sfc = NULL;
return;
}
- sfc->backend_sfc->wait_gl(sfc->backend_sfc);
+ sfc->backend_sfc->wait_gl(cur_ts,
+ sfc->backend_sfc);
}
-EGLBoolean yagl_host_eglReleaseThread(EGLint *error)
+EGLBoolean yagl_host_eglReleaseThread(struct yagl_thread_state *cur_ts, EGLint *error)
{
EGLBoolean res = EGL_FALSE;
YAGL_LOG_FUNC_SET(eglReleaseThread);
if (egl_api_ts->context) {
- if (!yagl_egl_release_current_context(egl_api_ts->context->dpy)) {
+ if (!yagl_egl_release_current_context(cur_ts, egl_api_ts->context->dpy)) {
YAGL_SET_ERR(EGL_BAD_ACCESS);
goto out;
}
return res;
}
-EGLBoolean yagl_host_eglSurfaceAttrib(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglSurfaceAttrib(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_,
EGLint attribute,
EGLint value,
struct yagl_egl_display *dpy = NULL;
struct yagl_egl_surface *surface = NULL;
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, error)) {
goto out;
}
return res;
}
-yagl_host_handle yagl_host_eglCreateContext(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreateContext(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
yagl_host_handle share_context_,
const EGLint *attrib_list, int32_t attrib_list_count,
YAGL_LOG_FUNC_SET(eglCreateContext);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
}
if (share_context_) {
- if (!yagl_validate_context(dpy, share_context_, &share_context, error)) {
+ if (!yagl_validate_context(cur_ts, dpy, share_context_, &share_context, error)) {
goto out;
}
}
- ctx = yagl_egl_context_create(dpy,
+ ctx = yagl_egl_context_create(cur_ts,
+ dpy,
config,
(share_context ? share_context->backend_ctx
: NULL),
return res;
}
-EGLBoolean yagl_host_eglDestroyContext(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglDestroyContext(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle ctx_,
EGLint *error)
{
YAGL_LOG_FUNC_SET(eglDestroyContext);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_context(dpy, ctx_, &ctx, error)) {
+ if (!yagl_validate_context(cur_ts, dpy, ctx_, &ctx, error)) {
goto out;
}
return res;
}
-void yagl_host_eglMakeCurrent(yagl_host_handle dpy_,
+void yagl_host_eglMakeCurrent(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle draw_,
yagl_host_handle read_,
yagl_host_handle ctx_)
YAGL_LOG_FUNC_SET(eglMakeCurrent);
- if (!yagl_validate_display(dpy_, &dpy, &error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, &error)) {
goto out;
}
yagl_egl_context_acquire(prev_ctx);
if (release_context) {
- if (!yagl_egl_release_current_context(dpy)) {
+ if (!yagl_egl_release_current_context(cur_ts, dpy)) {
YAGL_LOG_ERROR("cannot release current context");
goto out;
}
} else {
- if (!yagl_validate_context(dpy, ctx_, &ctx, &error)) {
+ if (!yagl_validate_context(cur_ts, dpy, ctx_, &ctx, &error)) {
goto out;
}
- if (draw_ && !yagl_validate_surface(dpy, draw_, &draw, &error)) {
+ if (draw_ && !yagl_validate_surface(cur_ts, dpy, draw_, &draw, &error)) {
goto out;
}
- if (read_ && !yagl_validate_surface(dpy, read_, &read, &error)) {
+ if (read_ && !yagl_validate_surface(cur_ts, dpy, read_, &read, &error)) {
goto out;
}
release_context = true;
}
- if (!egl_api_ts->backend->make_current(egl_api_ts->backend,
+ if (!egl_api_ts->backend->make_current(cur_ts,
+ egl_api_ts->backend,
dpy->backend_dpy,
ctx->backend_ctx,
(draw ? draw->backend_sfc : NULL),
yagl_egl_context_release(prev_ctx);
}
-EGLBoolean yagl_host_eglQueryContext(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglQueryContext(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle ctx_,
EGLint attribute,
EGLint *value,
YAGL_LOG_FUNC_SET(eglQueryContext);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_context(dpy, ctx_, &ctx, error)) {
+ if (!yagl_validate_context(cur_ts, dpy, ctx_, &ctx, error)) {
goto out;
}
return res;
}
-void yagl_host_eglSwapBuffers(yagl_host_handle dpy_,
+void yagl_host_eglSwapBuffers(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_)
{
EGLint error = 0;
struct yagl_egl_display *dpy = NULL;
struct yagl_egl_surface *surface = NULL;
- if (!yagl_validate_display(dpy_, &dpy, &error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, &error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, &error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, &error)) {
goto out;
}
- surface->backend_sfc->swap_buffers(surface->backend_sfc);
+ surface->backend_sfc->swap_buffers(cur_ts, surface->backend_sfc);
out:
yagl_egl_surface_release(surface);
}
-void yagl_host_eglCopyBuffers(yagl_host_handle dpy_,
+void yagl_host_eglCopyBuffers(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_)
{
EGLint error = 0;
struct yagl_egl_display *dpy = NULL;
struct yagl_egl_surface *surface = NULL;
- if (!yagl_validate_display(dpy_, &dpy, &error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, &error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, &error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, &error)) {
goto out;
}
- surface->backend_sfc->copy_buffers(surface->backend_sfc);
+ surface->backend_sfc->copy_buffers(cur_ts, surface->backend_sfc);
out:
yagl_egl_surface_release(surface);
}
-yagl_host_handle yagl_host_eglCreateWindowSurfaceOffscreenYAGL(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreateWindowSurfaceOffscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
uint32_t width,
uint32_t height,
}
}
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_offscreen_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_offscreen_surface(cur_ts,
+ dpy->backend_dpy,
&config->native,
EGL_WINDOW_BIT,
&attribs,
return res;
}
-yagl_host_handle yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
uint32_t width,
uint32_t height,
}
}
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_offscreen_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_offscreen_surface(cur_ts,
+ dpy->backend_dpy,
&config->native,
EGL_PBUFFER_BIT,
&attribs,
return res;
}
-yagl_host_handle yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
uint32_t width,
uint32_t height,
goto out;
}
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_offscreen_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_offscreen_surface(cur_ts,
+ dpy->backend_dpy,
&config->native,
EGL_PIXMAP_BIT,
&attribs,
return res;
}
-EGLBoolean yagl_host_eglResizeOffscreenSurfaceYAGL(yagl_host_handle dpy_,
+EGLBoolean yagl_host_eglResizeOffscreenSurfaceYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_,
uint32_t width,
uint32_t height,
YAGL_LOG_FUNC_SET(eglResizeOffscreenSurfaceYAGL);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_offscreen_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_offscreen_surface(cur_ts,
+ dpy->backend_dpy,
&surface->cfg->native,
surface->backend_sfc->type,
&surface->backend_sfc->attribs,
}
}
- if (!egl_api_ts->backend->make_current(egl_api_ts->backend,
+ if (!egl_api_ts->backend->make_current(cur_ts,
+ egl_api_ts->backend,
dpy->backend_dpy,
egl_api_ts->context->backend_ctx,
draw_sfc,
goto out;
}
- surface->backend_sfc->replace(surface->backend_sfc, backend_sfc);
+ surface->backend_sfc->replace(cur_ts, surface->backend_sfc, backend_sfc);
backend_sfc = NULL;
return res;
}
-yagl_host_handle yagl_host_eglCreateWindowSurfaceOnscreenYAGL(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreateWindowSurfaceOnscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
yagl_winsys_id win,
const EGLint *attrib_list, int32_t attrib_list_count,
}
}
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_onscreen_window_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_onscreen_window_surface(cur_ts,
+ dpy->backend_dpy,
&config->native,
&attribs,
win);
return res;
}
-yagl_host_handle yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
yagl_winsys_id buffer,
const EGLint *attrib_list, int32_t attrib_list_count,
}
}
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_onscreen_pbuffer_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_onscreen_pbuffer_surface(cur_ts,
+ dpy->backend_dpy,
&config->native,
&attribs,
buffer);
return res;
}
-yagl_host_handle yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(yagl_host_handle dpy_,
+yagl_host_handle yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle config_,
yagl_winsys_id pixmap,
const EGLint *attrib_list, int32_t attrib_list_count,
goto out;
}
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- if (!yagl_validate_config(dpy, config_, &config, error)) {
+ if (!yagl_validate_config(cur_ts, dpy, config_, &config, error)) {
goto out;
}
goto out;
}
- backend_sfc = dpy->backend_dpy->create_onscreen_pixmap_surface(dpy->backend_dpy,
+ backend_sfc = dpy->backend_dpy->create_onscreen_pixmap_surface(cur_ts,
+ dpy->backend_dpy,
&config->native,
&attribs,
pixmap);
return res;
}
-void yagl_host_eglInvalidateOnscreenSurfaceYAGL(yagl_host_handle dpy_,
+void yagl_host_eglInvalidateOnscreenSurfaceYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy_,
yagl_host_handle surface_,
yagl_winsys_id buffer)
{
struct yagl_egl_display *dpy = NULL;
struct yagl_egl_surface *surface = NULL;
- if (!yagl_validate_display(dpy_, &dpy, &error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, &error)) {
goto out;
}
- if (!yagl_validate_surface(dpy, surface_, &surface, &error)) {
+ if (!yagl_validate_surface(cur_ts, dpy, surface_, &surface, &error)) {
goto out;
}
- surface->backend_sfc->invalidate(surface->backend_sfc, buffer);
+ surface->backend_sfc->invalidate(cur_ts, surface->backend_sfc, buffer);
out:
yagl_egl_surface_release(surface);
}
-EGLBoolean yagl_host_eglCreateImageYAGL(uint32_t texture,
+EGLBoolean yagl_host_eglCreateImageYAGL(struct yagl_thread_state *cur_ts,
+ uint32_t texture,
yagl_host_handle dpy_,
yagl_winsys_id buffer,
EGLint *error)
YAGL_LOG_FUNC_SET(eglCreateImageYAGL);
- if (!yagl_validate_display(dpy_, &dpy, error)) {
+ if (!yagl_validate_display(cur_ts, dpy_, &dpy, error)) {
goto out;
}
- image = dpy->backend_dpy->create_image(dpy->backend_dpy, buffer);
+ image = dpy->backend_dpy->create_image(cur_ts, dpy->backend_dpy, buffer);
if (!image) {
YAGL_SET_ERR(EGL_BAD_ALLOC);
#include "yagl_api.h"
#include <EGL/egl.h>
-struct yagl_api_ps *yagl_host_egl_process_init(struct yagl_api *api);
+struct yagl_api_ps *yagl_host_egl_process_init(struct yagl_process_state *ps, struct yagl_api *api);
-yagl_host_handle yagl_host_eglGetDisplay(uint32_t display_id,
+yagl_host_handle yagl_host_eglGetDisplay(struct yagl_thread_state *cur_ts,
+ uint32_t display_id,
EGLint *error);
-EGLBoolean yagl_host_eglInitialize(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglInitialize(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
EGLint *major,
EGLint *minor,
EGLint *error);
-EGLBoolean yagl_host_eglTerminate(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglTerminate(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
EGLint *error);
-EGLBoolean yagl_host_eglGetConfigs(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglGetConfigs(struct yagl_thread_state *cur_ts, yagl_host_handle dpy,
yagl_host_handle *configs, int32_t configs_maxcount, int32_t *configs_count,
EGLint *error);
-EGLBoolean yagl_host_eglChooseConfig(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglChooseConfig(struct yagl_thread_state *cur_ts, yagl_host_handle dpy,
const EGLint *attrib_list, int32_t attrib_list_count,
yagl_host_handle *configs, int32_t configs_maxcount, int32_t *configs_count,
EGLint *error);
-EGLBoolean yagl_host_eglGetConfigAttrib(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglGetConfigAttrib(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
EGLint attribute,
EGLint *value,
EGLint *error);
-EGLBoolean yagl_host_eglDestroySurface(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglDestroySurface(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface,
EGLint *error);
-EGLBoolean yagl_host_eglQuerySurface(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglQuerySurface(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface,
EGLint attribute,
EGLint *value,
EGLint *error);
void yagl_host_eglBindAPI(EGLenum api);
-void yagl_host_eglWaitClient(void);
-EGLBoolean yagl_host_eglReleaseThread(EGLint *error);
-EGLBoolean yagl_host_eglSurfaceAttrib(yagl_host_handle dpy,
+void yagl_host_eglWaitClient(struct yagl_thread_state *cur_ts);
+EGLBoolean yagl_host_eglReleaseThread(struct yagl_thread_state *cur_ts, EGLint *error);
+EGLBoolean yagl_host_eglSurfaceAttrib(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface,
EGLint attribute,
EGLint value,
EGLint *error);
-yagl_host_handle yagl_host_eglCreateContext(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreateContext(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
yagl_host_handle share_context,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-EGLBoolean yagl_host_eglDestroyContext(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglDestroyContext(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle ctx,
EGLint *error);
-void yagl_host_eglMakeCurrent(yagl_host_handle dpy,
+void yagl_host_eglMakeCurrent(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle draw,
yagl_host_handle read,
yagl_host_handle ctx);
-EGLBoolean yagl_host_eglQueryContext(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglQueryContext(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle ctx,
EGLint attribute,
EGLint *value,
EGLint *error);
-void yagl_host_eglSwapBuffers(yagl_host_handle dpy,
+void yagl_host_eglSwapBuffers(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface);
-void yagl_host_eglCopyBuffers(yagl_host_handle dpy,
+void yagl_host_eglCopyBuffers(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface);
-yagl_host_handle yagl_host_eglCreateWindowSurfaceOffscreenYAGL(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreateWindowSurfaceOffscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
uint32_t width,
uint32_t height,
target_ulong pixels,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-yagl_host_handle yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreatePbufferSurfaceOffscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
uint32_t width,
uint32_t height,
target_ulong pixels,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-yagl_host_handle yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreatePixmapSurfaceOffscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
uint32_t width,
uint32_t height,
target_ulong pixels,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-EGLBoolean yagl_host_eglResizeOffscreenSurfaceYAGL(yagl_host_handle dpy,
+EGLBoolean yagl_host_eglResizeOffscreenSurfaceYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface,
uint32_t width,
uint32_t height,
uint32_t bpp,
target_ulong pixels,
EGLint *error);
-yagl_host_handle yagl_host_eglCreateWindowSurfaceOnscreenYAGL(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreateWindowSurfaceOnscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
yagl_winsys_id win,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-yagl_host_handle yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreatePbufferSurfaceOnscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
yagl_winsys_id buffer,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-yagl_host_handle yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(yagl_host_handle dpy,
+yagl_host_handle yagl_host_eglCreatePixmapSurfaceOnscreenYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle config,
yagl_winsys_id pixmap,
const EGLint *attrib_list, int32_t attrib_list_count,
EGLint *error);
-void yagl_host_eglInvalidateOnscreenSurfaceYAGL(yagl_host_handle dpy,
+void yagl_host_eglInvalidateOnscreenSurfaceYAGL(struct yagl_thread_state *cur_ts,
+ yagl_host_handle dpy,
yagl_host_handle surface,
yagl_winsys_id buffer);
-EGLBoolean yagl_host_eglCreateImageYAGL(uint32_t texture,
+EGLBoolean yagl_host_eglCreateImageYAGL(struct yagl_thread_state *cur_ts,
+ uint32_t texture,
yagl_host_handle dpy,
yagl_winsys_id buffer,
EGLint *error);
#include "yagl_thread.h"
#include "yagl_log.h"
-static GLuint yagl_gles_api_ts_create_shader(struct yagl_gles_driver *driver,
+static GLuint yagl_gles_api_ts_create_shader(struct yagl_thread_state *cur_ts,
+ struct yagl_gles_driver *driver,
const char *source,
GLenum type)
{
* To (partially) work around the problem we must patch
* index lookups by UB name.
*/
-static bool yagl_gles_api_ts_broken_ubo_test(struct yagl_gles_driver *driver)
+static bool yagl_gles_api_ts_broken_ubo_test(struct yagl_thread_state *cur_ts,
+ struct yagl_gles_driver *driver)
{
static const char *vs_source_es3 =
"#version 300 es\n\n"
YAGL_LOG_FUNC_SET(yagl_gles_api_ts_broken_ubo_test);
- vs = yagl_gles_api_ts_create_shader(driver,
+ vs = yagl_gles_api_ts_create_shader(cur_ts, driver,
((driver->gl_version == yagl_gl_3_1_es3) ? vs_source_es3 : vs_source_3_2),
GL_VERTEX_SHADER);
goto out1;
}
- fs = yagl_gles_api_ts_create_shader(driver,
+ fs = yagl_gles_api_ts_create_shader(cur_ts, driver,
((driver->gl_version == yagl_gl_3_1_es3) ? fs_source_es3 : fs_source_3_2),
GL_FRAGMENT_SHADER);
return res;
}
-void yagl_gles_api_ts_init(struct yagl_gles_api_ts *gles_api_ts,
+void yagl_gles_api_ts_init(struct yagl_thread_state *cur_ts,
+ struct yagl_gles_api_ts *gles_api_ts,
struct yagl_gles_driver *driver,
struct yagl_gles_api_ps *ps)
{
return;
}
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(cur_ts->ps, 0);
if (driver->gl_version > yagl_gl_2) {
gles_api_ts->api->use_map_buffer_range = true;
}
if (driver->gl_version >= yagl_gl_3_1_es3) {
- gles_api_ts->api->broken_ubo = yagl_gles_api_ts_broken_ubo_test(driver);
+ gles_api_ts->api->broken_ubo = yagl_gles_api_ts_broken_ubo_test(cur_ts, driver);
} else {
gles_api_ts->api->broken_ubo = false;
}
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(cur_ts->ps, 0);
gles_api_ts->api->checked = true;
}
-void yagl_gles_api_ts_cleanup(struct yagl_gles_api_ts *gles_api_ts)
+void yagl_gles_api_ts_cleanup(struct yagl_thread_state *cur_ts,
+ struct yagl_gles_api_ts *gles_api_ts)
{
if (gles_api_ts->num_arrays > 0) {
uint32_t i;
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(cur_ts->ps, 0);
if (gles_api_ts->ebo) {
gles_api_ts->driver->DeleteBuffers(1, &gles_api_ts->ebo);
&gles_api_ts->arrays[i].vbo);
}
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(cur_ts->ps, 0);
}
g_free(gles_api_ts->arrays);
uint32_t ebo_size;
};
-void yagl_gles_api_ts_init(struct yagl_gles_api_ts *gles_api_ts,
+void yagl_gles_api_ts_init(struct yagl_thread_state *cur_ts,
+ struct yagl_gles_api_ts *gles_api_ts,
struct yagl_gles_driver *driver,
struct yagl_gles_api_ps *ps);
-void yagl_gles_api_ts_cleanup(struct yagl_gles_api_ts *gles_api_ts);
+void yagl_gles_api_ts_cleanup(struct yagl_thread_state *cur_ts,
+ struct yagl_gles_api_ts *gles_api_ts);
#endif
*/
static void yagl_func_glDrawArrays(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
GLint first;
GLsizei count;
first = yagl_transport_get_out_GLint(t);
count = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glDrawArrays, GLenum, GLint, GLsizei, mode, first, count);
- (void)yagl_host_glDrawArrays(mode, first, count);
+ (void)yagl_host_glDrawArrays(cur_ts, mode, first, count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDrawElements(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
GLsizei count;
GLenum type;
type = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, 1, (const void**)&indices, &indices_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glDrawElements, GLenum, GLsizei, GLenum, void*, mode, count, type, indices);
- (void)yagl_host_glDrawElements(mode, count, type, indices, indices_count);
+ (void)yagl_host_glDrawElements(cur_ts, mode, count, type, indices, indices_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glReadPixelsData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint x;
GLint y;
GLsizei width;
yagl_transport_get_in_array(t, 1, (void**)&pixels, &pixels_maxcount, &pixels_count);
YAGL_LOG_FUNC_ENTER_SPLIT7(glReadPixelsData, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void*, x, y, width, height, format, type, pixels);
*pixels_count = 0;
- (void)yagl_host_glReadPixelsData(x, y, width, height, format, type, pixels, pixels_maxcount, pixels_count);
+ (void)yagl_host_glReadPixelsData(cur_ts, x, y, width, height, format, type, pixels, pixels_maxcount, pixels_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glReadPixelsOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint x;
GLint y;
GLsizei width;
type = yagl_transport_get_out_GLenum(t);
pixels = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT7(glReadPixelsOffset, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, uintptr_t, x, y, width, height, format, type, pixels);
- (void)yagl_host_glReadPixelsOffset(x, y, width, height, format, type, pixels);
+ (void)yagl_host_glReadPixelsOffset(cur_ts, x, y, width, height, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDrawArraysInstanced(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
GLint start;
GLsizei count;
count = yagl_transport_get_out_GLsizei(t);
primcount = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glDrawArraysInstanced, GLenum, GLint, GLsizei, GLsizei, mode, start, count, primcount);
- (void)yagl_host_glDrawArraysInstanced(mode, start, count, primcount);
+ (void)yagl_host_glDrawArraysInstanced(cur_ts, mode, start, count, primcount);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDrawElementsInstanced(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
GLsizei count;
GLenum type;
yagl_transport_get_out_array(t, 1, (const void**)&indices, &indices_count);
primcount = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glDrawElementsInstanced, GLenum, GLsizei, GLenum, void*, GLsizei, mode, count, type, indices, primcount);
- (void)yagl_host_glDrawElementsInstanced(mode, count, type, indices, indices_count, primcount);
+ (void)yagl_host_glDrawElementsInstanced(cur_ts, mode, count, type, indices, indices_count, primcount);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDrawRangeElements(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
GLuint start;
GLuint end;
type = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, 1, (const void**)&indices, &indices_count);
YAGL_LOG_FUNC_ENTER_SPLIT6(glDrawRangeElements, GLenum, GLuint, GLuint, GLsizei, GLenum, void*, mode, start, end, count, type, indices);
- (void)yagl_host_glDrawRangeElements(mode, start, end, count, type, indices, indices_count);
+ (void)yagl_host_glDrawRangeElements(cur_ts, mode, start, end, count, type, indices, indices_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenVertexArrays(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *arrays;
int32_t arrays_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&arrays, &arrays_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenVertexArrays, void*, arrays);
- (void)yagl_host_glGenVertexArrays(arrays, arrays_count);
+ (void)yagl_host_glGenVertexArrays(cur_ts, arrays, arrays_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindVertexArray(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint array;
array = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glBindVertexArray, GLuint, array);
- (void)yagl_host_glBindVertexArray(array);
+ (void)yagl_host_glBindVertexArray(cur_ts, array);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDisableVertexAttribArray(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
index = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDisableVertexAttribArray, GLuint, index);
- (void)yagl_host_glDisableVertexAttribArray(index);
+ (void)yagl_host_glDisableVertexAttribArray(cur_ts, index);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glEnableVertexAttribArray(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
index = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glEnableVertexAttribArray, GLuint, index);
- (void)yagl_host_glEnableVertexAttribArray(index);
+ (void)yagl_host_glEnableVertexAttribArray(cur_ts, index);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribPointerData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
GLint size;
GLenum type;
first = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT7(glVertexAttribPointerData, GLuint, GLint, GLenum, GLboolean, GLsizei, GLint, void*, indx, size, type, normalized, stride, first, data);
- (void)yagl_host_glVertexAttribPointerData(indx, size, type, normalized, stride, first, data, data_count);
+ (void)yagl_host_glVertexAttribPointerData(cur_ts, indx, size, type, normalized, stride, first, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribPointerOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
GLint size;
GLenum type;
stride = yagl_transport_get_out_GLsizei(t);
offset = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glVertexAttribPointerOffset, GLuint, GLint, GLenum, GLboolean, GLsizei, uintptr_t, indx, size, type, normalized, stride, offset);
- (void)yagl_host_glVertexAttribPointerOffset(indx, size, type, normalized, stride, offset);
+ (void)yagl_host_glVertexAttribPointerOffset(cur_ts, indx, size, type, normalized, stride, offset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexPointerData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint size;
GLenum type;
GLsizei stride;
first = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT5(glVertexPointerData, GLint, GLenum, GLsizei, GLint, void*, size, type, stride, first, data);
- (void)yagl_host_glVertexPointerData(size, type, stride, first, data, data_count);
+ (void)yagl_host_glVertexPointerData(cur_ts, size, type, stride, first, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexPointerOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint size;
GLenum type;
GLsizei stride;
stride = yagl_transport_get_out_GLsizei(t);
offset = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glVertexPointerOffset, GLint, GLenum, GLsizei, uintptr_t, size, type, stride, offset);
- (void)yagl_host_glVertexPointerOffset(size, type, stride, offset);
+ (void)yagl_host_glVertexPointerOffset(cur_ts, size, type, stride, offset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glNormalPointerData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum type;
GLsizei stride;
GLint first;
first = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glNormalPointerData, GLenum, GLsizei, GLint, void*, type, stride, first, data);
- (void)yagl_host_glNormalPointerData(type, stride, first, data, data_count);
+ (void)yagl_host_glNormalPointerData(cur_ts, type, stride, first, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glNormalPointerOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum type;
GLsizei stride;
uintptr_t offset;
stride = yagl_transport_get_out_GLsizei(t);
offset = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glNormalPointerOffset, GLenum, GLsizei, uintptr_t, type, stride, offset);
- (void)yagl_host_glNormalPointerOffset(type, stride, offset);
+ (void)yagl_host_glNormalPointerOffset(cur_ts, type, stride, offset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glColorPointerData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint size;
GLenum type;
GLsizei stride;
first = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT5(glColorPointerData, GLint, GLenum, GLsizei, GLint, void*, size, type, stride, first, data);
- (void)yagl_host_glColorPointerData(size, type, stride, first, data, data_count);
+ (void)yagl_host_glColorPointerData(cur_ts, size, type, stride, first, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glColorPointerOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint size;
GLenum type;
GLsizei stride;
stride = yagl_transport_get_out_GLsizei(t);
offset = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glColorPointerOffset, GLint, GLenum, GLsizei, uintptr_t, size, type, stride, offset);
- (void)yagl_host_glColorPointerOffset(size, type, stride, offset);
+ (void)yagl_host_glColorPointerOffset(cur_ts, size, type, stride, offset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexCoordPointerData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint tex_id;
GLint size;
GLenum type;
first = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT6(glTexCoordPointerData, GLint, GLint, GLenum, GLsizei, GLint, void*, tex_id, size, type, stride, first, data);
- (void)yagl_host_glTexCoordPointerData(tex_id, size, type, stride, first, data, data_count);
+ (void)yagl_host_glTexCoordPointerData(cur_ts, tex_id, size, type, stride, first, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexCoordPointerOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint size;
GLenum type;
GLsizei stride;
stride = yagl_transport_get_out_GLsizei(t);
offset = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glTexCoordPointerOffset, GLint, GLenum, GLsizei, uintptr_t, size, type, stride, offset);
- (void)yagl_host_glTexCoordPointerOffset(size, type, stride, offset);
+ (void)yagl_host_glTexCoordPointerOffset(cur_ts, size, type, stride, offset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDisableClientState(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum array;
array = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDisableClientState, GLenum, array);
- (void)yagl_host_glDisableClientState(array);
+ (void)yagl_host_glDisableClientState(cur_ts, array);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glEnableClientState(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum array;
array = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glEnableClientState, GLenum, array);
- (void)yagl_host_glEnableClientState(array);
+ (void)yagl_host_glEnableClientState(cur_ts, array);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribDivisor(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLuint divisor;
index = yagl_transport_get_out_GLuint(t);
divisor = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttribDivisor, GLuint, GLuint, index, divisor);
- (void)yagl_host_glVertexAttribDivisor(index, divisor);
+ (void)yagl_host_glVertexAttribDivisor(cur_ts, index, divisor);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribIPointerData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLint size;
GLenum type;
first = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT6(glVertexAttribIPointerData, GLuint, GLint, GLenum, GLsizei, GLint, void*, index, size, type, stride, first, data);
- (void)yagl_host_glVertexAttribIPointerData(index, size, type, stride, first, data, data_count);
+ (void)yagl_host_glVertexAttribIPointerData(cur_ts, index, size, type, stride, first, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribIPointerOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLint size;
GLenum type;
stride = yagl_transport_get_out_GLsizei(t);
offset = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glVertexAttribIPointerOffset, GLuint, GLint, GLenum, GLsizei, uintptr_t, index, size, type, stride, offset);
- (void)yagl_host_glVertexAttribIPointerOffset(index, size, type, stride, offset);
+ (void)yagl_host_glVertexAttribIPointerOffset(cur_ts, index, size, type, stride, offset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenBuffers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *buffers;
int32_t buffers_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&buffers, &buffers_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenBuffers, void*, buffers);
- (void)yagl_host_glGenBuffers(buffers, buffers_count);
+ (void)yagl_host_glGenBuffers(cur_ts, buffers, buffers_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindBuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint buffer;
target = yagl_transport_get_out_GLenum(t);
buffer = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBindBuffer, GLenum, GLuint, target, buffer);
- (void)yagl_host_glBindBuffer(target, buffer);
+ (void)yagl_host_glBindBuffer(cur_ts, target, buffer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBufferData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
const GLvoid *data;
int32_t data_count;
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
usage = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glBufferData, GLenum, void*, GLenum, target, data, usage);
- (void)yagl_host_glBufferData(target, data, data_count, usage);
+ (void)yagl_host_glBufferData(cur_ts, target, data, data_count, usage);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBufferSubData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLsizei offset;
const GLvoid *data;
offset = yagl_transport_get_out_GLsizei(t);
yagl_transport_get_out_array(t, 1, (const void**)&data, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glBufferSubData, GLenum, GLsizei, void*, target, offset, data);
- (void)yagl_host_glBufferSubData(target, offset, data, data_count);
+ (void)yagl_host_glBufferSubData(cur_ts, target, offset, data, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindBufferBase(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint index;
GLuint buffer;
index = yagl_transport_get_out_GLuint(t);
buffer = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glBindBufferBase, GLenum, GLuint, GLuint, target, index, buffer);
- (void)yagl_host_glBindBufferBase(target, index, buffer);
+ (void)yagl_host_glBindBufferBase(cur_ts, target, index, buffer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindBufferRange(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint index;
GLuint buffer;
offset = yagl_transport_get_out_GLint(t);
size = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glBindBufferRange, GLenum, GLuint, GLuint, GLint, GLsizei, target, index, buffer, offset, size);
- (void)yagl_host_glBindBufferRange(target, index, buffer, offset, size);
+ (void)yagl_host_glBindBufferRange(cur_ts, target, index, buffer, offset, size);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glMapBuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint buffer;
const GLuint *ranges;
int32_t ranges_count;
yagl_transport_get_in_array(t, 1, (void**)&data, &data_maxcount, &data_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glMapBuffer, GLuint, void*, void*, buffer, ranges, data);
*data_count = 0;
- (void)yagl_host_glMapBuffer(buffer, ranges, ranges_count, data, data_maxcount, data_count);
+ (void)yagl_host_glMapBuffer(cur_ts, buffer, ranges, ranges_count, data, data_maxcount, data_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCopyBufferSubData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum readTarget;
GLenum writeTarget;
GLintptr readOffset;
writeOffset = yagl_transport_get_out_GLintptr(t);
size = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glCopyBufferSubData, GLenum, GLenum, GLintptr, GLintptr, GLsizei, readTarget, writeTarget, readOffset, writeOffset, size);
- (void)yagl_host_glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+ (void)yagl_host_glCopyBufferSubData(cur_ts, readTarget, writeTarget, readOffset, writeOffset, size);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenTextures(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *textures;
int32_t textures_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&textures, &textures_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenTextures, void*, textures);
- (void)yagl_host_glGenTextures(textures, textures_count);
+ (void)yagl_host_glGenTextures(cur_ts, textures, textures_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindTexture(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint texture;
target = yagl_transport_get_out_GLenum(t);
texture = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBindTexture, GLenum, GLuint, target, texture);
- (void)yagl_host_glBindTexture(target, texture);
+ (void)yagl_host_glBindTexture(cur_ts, target, texture);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glActiveTexture(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum texture;
texture = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glActiveTexture, GLenum, texture);
- (void)yagl_host_glActiveTexture(texture);
+ (void)yagl_host_glActiveTexture(cur_ts, texture);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCopyTexImage2D(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLenum internalformat;
height = yagl_transport_get_out_GLsizei(t);
border = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT8(glCopyTexImage2D, GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, target, level, internalformat, x, y, width, height, border);
- (void)yagl_host_glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
+ (void)yagl_host_glCopyTexImage2D(cur_ts, target, level, internalformat, x, y, width, height, border);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCopyTexSubImage2D(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint xoffset;
width = yagl_transport_get_out_GLsizei(t);
height = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT8(glCopyTexSubImage2D, GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, target, level, xoffset, yoffset, x, y, width, height);
- (void)yagl_host_glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
+ (void)yagl_host_glCopyTexSubImage2D(cur_ts, target, level, xoffset, yoffset, x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetTexParameterfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLfloat *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_in_arg(t, (void**)¶m);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetTexParameterfv, GLenum, GLenum, void*, target, pname, param);
- (void)yagl_host_glGetTexParameterfv(target, pname, param);
+ (void)yagl_host_glGetTexParameterfv(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetTexParameteriv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLint *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_in_arg(t, (void**)¶m);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetTexParameteriv, GLenum, GLenum, void*, target, pname, param);
- (void)yagl_host_glGetTexParameteriv(target, pname, param);
+ (void)yagl_host_glGetTexParameteriv(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexImage2DData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint internalformat;
type = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, 1, (const void**)&pixels, &pixels_count);
YAGL_LOG_FUNC_ENTER_SPLIT9(glTexImage2DData, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, void*, target, level, internalformat, width, height, border, format, type, pixels);
- (void)yagl_host_glTexImage2DData(target, level, internalformat, width, height, border, format, type, pixels, pixels_count);
+ (void)yagl_host_glTexImage2DData(cur_ts, target, level, internalformat, width, height, border, format, type, pixels, pixels_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexImage2DOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint internalformat;
type = yagl_transport_get_out_GLenum(t);
pixels = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT9(glTexImage2DOffset, GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, uintptr_t, target, level, internalformat, width, height, border, format, type, pixels);
- (void)yagl_host_glTexImage2DOffset(target, level, internalformat, width, height, border, format, type, pixels);
+ (void)yagl_host_glTexImage2DOffset(cur_ts, target, level, internalformat, width, height, border, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexParameterf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexParameterf, GLenum, GLenum, GLfloat, target, pname, param);
- (void)yagl_host_glTexParameterf(target, pname, param);
+ (void)yagl_host_glTexParameterf(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexParameterfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
const GLfloat *params;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexParameterfv, GLenum, GLenum, void*, target, pname, params);
- (void)yagl_host_glTexParameterfv(target, pname, params, params_count);
+ (void)yagl_host_glTexParameterfv(cur_ts, target, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexParameteri(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLint param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexParameteri, GLenum, GLenum, GLint, target, pname, param);
- (void)yagl_host_glTexParameteri(target, pname, param);
+ (void)yagl_host_glTexParameteri(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexParameteriv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
const GLint *params;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexParameteriv, GLenum, GLenum, void*, target, pname, params);
- (void)yagl_host_glTexParameteriv(target, pname, params, params_count);
+ (void)yagl_host_glTexParameteriv(cur_ts, target, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexSubImage2DData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint xoffset;
type = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, 1, (const void**)&pixels, &pixels_count);
YAGL_LOG_FUNC_ENTER_SPLIT9(glTexSubImage2DData, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void*, target, level, xoffset, yoffset, width, height, format, type, pixels);
- (void)yagl_host_glTexSubImage2DData(target, level, xoffset, yoffset, width, height, format, type, pixels, pixels_count);
+ (void)yagl_host_glTexSubImage2DData(cur_ts, target, level, xoffset, yoffset, width, height, format, type, pixels, pixels_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexSubImage2DOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint xoffset;
type = yagl_transport_get_out_GLenum(t);
pixels = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT9(glTexSubImage2DOffset, GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, uintptr_t, target, level, xoffset, yoffset, width, height, format, type, pixels);
- (void)yagl_host_glTexSubImage2DOffset(target, level, xoffset, yoffset, width, height, format, type, pixels);
+ (void)yagl_host_glTexSubImage2DOffset(cur_ts, target, level, xoffset, yoffset, width, height, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClientActiveTexture(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum texture;
texture = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glClientActiveTexture, GLenum, texture);
- (void)yagl_host_glClientActiveTexture(texture);
+ (void)yagl_host_glClientActiveTexture(cur_ts, texture);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexEnvi(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLint param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexEnvi, GLenum, GLenum, GLint, target, pname, param);
- (void)yagl_host_glTexEnvi(target, pname, param);
+ (void)yagl_host_glTexEnvi(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexEnvf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexEnvf, GLenum, GLenum, GLfloat, target, pname, param);
- (void)yagl_host_glTexEnvf(target, pname, param);
+ (void)yagl_host_glTexEnvf(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glMultiTexCoord4f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLfloat s;
GLfloat tt;
r = yagl_transport_get_out_GLfloat(t);
q = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glMultiTexCoord4f, GLenum, GLfloat, GLfloat, GLfloat, GLfloat, target, s, tt, r, q);
- (void)yagl_host_glMultiTexCoord4f(target, s, tt, r, q);
+ (void)yagl_host_glMultiTexCoord4f(cur_ts, target, s, tt, r, q);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexEnviv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
const GLint *params;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexEnviv, GLenum, GLenum, void*, target, pname, params);
- (void)yagl_host_glTexEnviv(target, pname, params, params_count);
+ (void)yagl_host_glTexEnviv(cur_ts, target, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexEnvfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
const GLfloat *params;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTexEnvfv, GLenum, GLenum, void*, target, pname, params);
- (void)yagl_host_glTexEnvfv(target, pname, params, params_count);
+ (void)yagl_host_glTexEnvfv(cur_ts, target, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetTexEnviv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum env;
GLenum pname;
GLint *params;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetTexEnviv, GLenum, GLenum, void*, env, pname, params);
*params_count = 0;
- (void)yagl_host_glGetTexEnviv(env, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetTexEnviv(cur_ts, env, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetTexEnvfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum env;
GLenum pname;
GLfloat *params;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetTexEnvfv, GLenum, GLenum, void*, env, pname, params);
*params_count = 0;
- (void)yagl_host_glGetTexEnvfv(env, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetTexEnvfv(cur_ts, env, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexImage3DData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint internalformat;
type = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, 1, (const void**)&pixels, &pixels_count);
YAGL_LOG_FUNC_ENTER_SPLIT10(glTexImage3DData, GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, void*, target, level, internalformat, width, height, depth, border, format, type, pixels);
- (void)yagl_host_glTexImage3DData(target, level, internalformat, width, height, depth, border, format, type, pixels, pixels_count);
+ (void)yagl_host_glTexImage3DData(cur_ts, target, level, internalformat, width, height, depth, border, format, type, pixels, pixels_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexImage3DOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint internalformat;
type = yagl_transport_get_out_GLenum(t);
pixels = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT10(glTexImage3DOffset, GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, uintptr_t, target, level, internalformat, width, height, depth, border, format, type, pixels);
- (void)yagl_host_glTexImage3DOffset(target, level, internalformat, width, height, depth, border, format, type, pixels);
+ (void)yagl_host_glTexImage3DOffset(cur_ts, target, level, internalformat, width, height, depth, border, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexSubImage3DData(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint xoffset;
type = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, 1, (const void**)&pixels, &pixels_count);
YAGL_LOG_FUNC_ENTER_SPLIT11(glTexSubImage3DData, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, void*, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
- (void)yagl_host_glTexSubImage3DData(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels_count);
+ (void)yagl_host_glTexSubImage3DData(cur_ts, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels, pixels_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTexSubImage3DOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint xoffset;
type = yagl_transport_get_out_GLenum(t);
pixels = yagl_transport_get_out_uintptr_t(t);
YAGL_LOG_FUNC_ENTER_SPLIT11(glTexSubImage3DOffset, GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, uintptr_t, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
- (void)yagl_host_glTexSubImage3DOffset(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
+ (void)yagl_host_glTexSubImage3DOffset(cur_ts, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCopyTexSubImage3D(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLint level;
GLint xoffset;
width = yagl_transport_get_out_GLsizei(t);
height = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT9(glCopyTexSubImage3D, GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei, target, level, xoffset, yoffset, zoffset, x, y, width, height);
- (void)yagl_host_glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
+ (void)yagl_host_glCopyTexSubImage3D(cur_ts, target, level, xoffset, yoffset, zoffset, x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenFramebuffers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *framebuffers;
int32_t framebuffers_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&framebuffers, &framebuffers_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenFramebuffers, void*, framebuffers);
- (void)yagl_host_glGenFramebuffers(framebuffers, framebuffers_count);
+ (void)yagl_host_glGenFramebuffers(cur_ts, framebuffers, framebuffers_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindFramebuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint framebuffer;
target = yagl_transport_get_out_GLenum(t);
framebuffer = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBindFramebuffer, GLenum, GLuint, target, framebuffer);
- (void)yagl_host_glBindFramebuffer(target, framebuffer);
+ (void)yagl_host_glBindFramebuffer(cur_ts, target, framebuffer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFramebufferTexture2D(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum attachment;
GLenum textarget;
texture = yagl_transport_get_out_GLuint(t);
level = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glFramebufferTexture2D, GLenum, GLenum, GLenum, GLuint, GLint, target, attachment, textarget, texture, level);
- (void)yagl_host_glFramebufferTexture2D(target, attachment, textarget, texture, level);
+ (void)yagl_host_glFramebufferTexture2D(cur_ts, target, attachment, textarget, texture, level);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFramebufferRenderbuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum attachment;
GLenum renderbuffertarget;
renderbuffertarget = yagl_transport_get_out_GLenum(t);
renderbuffer = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glFramebufferRenderbuffer, GLenum, GLenum, GLenum, GLuint, target, attachment, renderbuffertarget, renderbuffer);
- (void)yagl_host_glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+ (void)yagl_host_glFramebufferRenderbuffer(cur_ts, target, attachment, renderbuffertarget, renderbuffer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBlitFramebuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint srcX0;
GLint srcY0;
GLint srcX1;
mask = yagl_transport_get_out_GLbitfield(t);
filter = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT10(glBlitFramebuffer, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
- (void)yagl_host_glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+ (void)yagl_host_glBlitFramebuffer(cur_ts, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDrawBuffers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLenum *bufs;
int32_t bufs_count;
yagl_transport_get_out_array(t, sizeof(GLenum), (const void**)&bufs, &bufs_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDrawBuffers, void*, bufs);
- (void)yagl_host_glDrawBuffers(bufs, bufs_count);
+ (void)yagl_host_glDrawBuffers(cur_ts, bufs, bufs_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glReadBuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glReadBuffer, GLenum, mode);
- (void)yagl_host_glReadBuffer(mode);
+ (void)yagl_host_glReadBuffer(cur_ts, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFramebufferTexture3D(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum attachment;
GLenum textarget;
level = yagl_transport_get_out_GLint(t);
zoffset = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glFramebufferTexture3D, GLenum, GLenum, GLenum, GLuint, GLint, GLint, target, attachment, textarget, texture, level, zoffset);
- (void)yagl_host_glFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset);
+ (void)yagl_host_glFramebufferTexture3D(cur_ts, target, attachment, textarget, texture, level, zoffset);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFramebufferTextureLayer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum attachment;
GLuint texture;
level = yagl_transport_get_out_GLint(t);
layer = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glFramebufferTextureLayer, GLenum, GLenum, GLuint, GLint, GLint, target, attachment, texture, level, layer);
- (void)yagl_host_glFramebufferTextureLayer(target, attachment, texture, level, layer);
+ (void)yagl_host_glFramebufferTextureLayer(cur_ts, target, attachment, texture, level, layer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearBufferiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum buffer;
GLint drawbuffer;
const GLint *value;
drawbuffer = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glClearBufferiv, GLenum, GLint, void*, buffer, drawbuffer, value);
- (void)yagl_host_glClearBufferiv(buffer, drawbuffer, value, value_count);
+ (void)yagl_host_glClearBufferiv(cur_ts, buffer, drawbuffer, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearBufferuiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum buffer;
GLint drawbuffer;
const GLuint *value;
drawbuffer = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glClearBufferuiv, GLenum, GLint, void*, buffer, drawbuffer, value);
- (void)yagl_host_glClearBufferuiv(buffer, drawbuffer, value, value_count);
+ (void)yagl_host_glClearBufferuiv(cur_ts, buffer, drawbuffer, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearBufferfi(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum buffer;
GLint drawbuffer;
GLfloat depth;
depth = yagl_transport_get_out_GLfloat(t);
stencil = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glClearBufferfi, GLenum, GLint, GLfloat, GLint, buffer, drawbuffer, depth, stencil);
- (void)yagl_host_glClearBufferfi(buffer, drawbuffer, depth, stencil);
+ (void)yagl_host_glClearBufferfi(cur_ts, buffer, drawbuffer, depth, stencil);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearBufferfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum buffer;
GLint drawbuffer;
const GLfloat *value;
drawbuffer = yagl_transport_get_out_GLint(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glClearBufferfv, GLenum, GLint, void*, buffer, drawbuffer, value);
- (void)yagl_host_glClearBufferfv(buffer, drawbuffer, value, value_count);
+ (void)yagl_host_glClearBufferfv(cur_ts, buffer, drawbuffer, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenRenderbuffers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *renderbuffers;
int32_t renderbuffers_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&renderbuffers, &renderbuffers_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenRenderbuffers, void*, renderbuffers);
- (void)yagl_host_glGenRenderbuffers(renderbuffers, renderbuffers_count);
+ (void)yagl_host_glGenRenderbuffers(cur_ts, renderbuffers, renderbuffers_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindRenderbuffer(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint renderbuffer;
target = yagl_transport_get_out_GLenum(t);
renderbuffer = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBindRenderbuffer, GLenum, GLuint, target, renderbuffer);
- (void)yagl_host_glBindRenderbuffer(target, renderbuffer);
+ (void)yagl_host_glBindRenderbuffer(cur_ts, target, renderbuffer);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glRenderbufferStorage(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum internalformat;
GLsizei width;
width = yagl_transport_get_out_GLsizei(t);
height = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glRenderbufferStorage, GLenum, GLenum, GLsizei, GLsizei, target, internalformat, width, height);
- (void)yagl_host_glRenderbufferStorage(target, internalformat, width, height);
+ (void)yagl_host_glRenderbufferStorage(cur_ts, target, internalformat, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetRenderbufferParameteriv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum pname;
GLint *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_in_arg(t, (void**)¶m);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetRenderbufferParameteriv, GLenum, GLenum, void*, target, pname, param);
- (void)yagl_host_glGetRenderbufferParameteriv(target, pname, param);
+ (void)yagl_host_glGetRenderbufferParameteriv(cur_ts, target, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glRenderbufferStorageMultisample(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLsizei samples;
GLenum internalformat;
width = yagl_transport_get_out_GLsizei(t);
height = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glRenderbufferStorageMultisample, GLenum, GLsizei, GLenum, GLsizei, GLsizei, target, samples, internalformat, width, height);
- (void)yagl_host_glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
+ (void)yagl_host_glRenderbufferStorageMultisample(cur_ts, target, samples, internalformat, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCreateProgram(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
program = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glCreateProgram, GLuint, program);
- (void)yagl_host_glCreateProgram(program);
+ (void)yagl_host_glCreateProgram(cur_ts, program);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCreateShader(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint shader;
GLenum type;
shader = yagl_transport_get_out_GLuint(t);
type = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glCreateShader, GLuint, GLenum, shader, type);
- (void)yagl_host_glCreateShader(shader, type);
+ (void)yagl_host_glCreateShader(cur_ts, shader, type);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glShaderSource(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint shader;
const GLchar *string;
int32_t string_count;
shader = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&string, &string_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glShaderSource, GLuint, void*, shader, string);
- (void)yagl_host_glShaderSource(shader, string, string_count);
+ (void)yagl_host_glShaderSource(cur_ts, shader, string, string_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glAttachShader(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint shader;
program = yagl_transport_get_out_GLuint(t);
shader = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glAttachShader, GLuint, GLuint, program, shader);
- (void)yagl_host_glAttachShader(program, shader);
+ (void)yagl_host_glAttachShader(cur_ts, program, shader);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDetachShader(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint shader;
program = yagl_transport_get_out_GLuint(t);
shader = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glDetachShader, GLuint, GLuint, program, shader);
- (void)yagl_host_glDetachShader(program, shader);
+ (void)yagl_host_glDetachShader(cur_ts, program, shader);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCompileShader(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint shader;
shader = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glCompileShader, GLuint, shader);
- (void)yagl_host_glCompileShader(shader);
+ (void)yagl_host_glCompileShader(cur_ts, shader);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindAttribLocation(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint index;
const GLchar *name;
index = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&name, &name_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glBindAttribLocation, GLuint, GLuint, void*, program, index, name);
- (void)yagl_host_glBindAttribLocation(program, index, name, name_count);
+ (void)yagl_host_glBindAttribLocation(cur_ts, program, index, name, name_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetActiveAttrib(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint index;
GLint *size;
yagl_transport_get_in_array(t, sizeof(GLchar), (void**)&name, &name_maxcount, &name_count);
YAGL_LOG_FUNC_ENTER_SPLIT5(glGetActiveAttrib, GLuint, GLuint, void*, void*, void*, program, index, size, type, name);
*name_count = 0;
- (void)yagl_host_glGetActiveAttrib(program, index, size, type, name, name_maxcount, name_count);
+ (void)yagl_host_glGetActiveAttrib(cur_ts, program, index, size, type, name, name_maxcount, name_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetActiveUniform(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint index;
GLint *size;
yagl_transport_get_in_array(t, sizeof(GLchar), (void**)&name, &name_maxcount, &name_count);
YAGL_LOG_FUNC_ENTER_SPLIT5(glGetActiveUniform, GLuint, GLuint, void*, void*, void*, program, index, size, type, name);
*name_count = 0;
- (void)yagl_host_glGetActiveUniform(program, index, size, type, name, name_maxcount, name_count);
+ (void)yagl_host_glGetActiveUniform(cur_ts, program, index, size, type, name, name_maxcount, name_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetAttribLocation(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLchar *name;
int32_t name_count;
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&name, &name_count);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetAttribLocation, GLuint, void*, program, name);
- *retval = yagl_host_glGetAttribLocation(program, name, name_count);
+ *retval = yagl_host_glGetAttribLocation(cur_ts, program, name, name_count);
YAGL_LOG_FUNC_EXIT_SPLIT(int, *retval);
}
*/
static void yagl_func_glGetProgramiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLenum pname;
GLint *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_in_arg(t, (void**)¶m);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetProgramiv, GLuint, GLenum, void*, program, pname, param);
- (void)yagl_host_glGetProgramiv(program, pname, param);
+ (void)yagl_host_glGetProgramiv(cur_ts, program, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetProgramInfoLog(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLchar *infolog;
int32_t infolog_maxcount;
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetProgramInfoLog, GLuint, void*, program, infolog);
*infolog_count = 0;
- *retval = yagl_host_glGetProgramInfoLog(program, infolog, infolog_maxcount, infolog_count);
+ *retval = yagl_host_glGetProgramInfoLog(cur_ts, program, infolog, infolog_maxcount, infolog_count);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, *retval);
}
*/
static void yagl_func_glGetShaderiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint shader;
GLenum pname;
GLint *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_in_arg(t, (void**)¶m);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetShaderiv, GLuint, GLenum, void*, shader, pname, param);
- (void)yagl_host_glGetShaderiv(shader, pname, param);
+ (void)yagl_host_glGetShaderiv(cur_ts, shader, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetShaderInfoLog(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint shader;
GLchar *infolog;
int32_t infolog_maxcount;
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetShaderInfoLog, GLuint, void*, shader, infolog);
*infolog_count = 0;
- *retval = yagl_host_glGetShaderInfoLog(shader, infolog, infolog_maxcount, infolog_count);
+ *retval = yagl_host_glGetShaderInfoLog(cur_ts, shader, infolog, infolog_maxcount, infolog_count);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, *retval);
}
*/
static void yagl_func_glGetUniformfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
GLuint program;
uint32_t location;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glGetUniformfv, GLboolean, GLuint, uint32_t, void*, tl, program, location, params);
*params_count = 0;
- (void)yagl_host_glGetUniformfv(tl, program, location, params, params_maxcount, params_count);
+ (void)yagl_host_glGetUniformfv(cur_ts, tl, program, location, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetUniformiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
GLuint program;
uint32_t location;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glGetUniformiv, GLboolean, GLuint, uint32_t, void*, tl, program, location, params);
*params_count = 0;
- (void)yagl_host_glGetUniformiv(tl, program, location, params, params_maxcount, params_count);
+ (void)yagl_host_glGetUniformiv(cur_ts, tl, program, location, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetUniformLocation(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLchar *name;
int32_t name_count;
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&name, &name_count);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetUniformLocation, GLuint, void*, program, name);
- *retval = yagl_host_glGetUniformLocation(program, name, name_count);
+ *retval = yagl_host_glGetUniformLocation(cur_ts, program, name, name_count);
YAGL_LOG_FUNC_EXIT_SPLIT(int, *retval);
}
*/
static void yagl_func_glGetVertexAttribfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLenum pname;
GLfloat *params;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetVertexAttribfv, GLuint, GLenum, void*, index, pname, params);
*params_count = 0;
- (void)yagl_host_glGetVertexAttribfv(index, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetVertexAttribfv(cur_ts, index, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetVertexAttribiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLenum pname;
GLint *params;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetVertexAttribiv, GLuint, GLenum, void*, index, pname, params);
*params_count = 0;
- (void)yagl_host_glGetVertexAttribiv(index, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetVertexAttribiv(cur_ts, index, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLinkProgram(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLint *params;
int32_t params_maxcount;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glLinkProgram, GLuint, void*, program, params);
*params_count = 0;
- (void)yagl_host_glLinkProgram(program, params, params_maxcount, params_count);
+ (void)yagl_host_glLinkProgram(cur_ts, program, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform1f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLfloat x;
location = yagl_transport_get_out_uint32_t(t);
x = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform1f, GLboolean, uint32_t, GLfloat, tl, location, x);
- (void)yagl_host_glUniform1f(tl, location, x);
+ (void)yagl_host_glUniform1f(cur_ts, tl, location, x);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform1fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLfloat *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform1fv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform1fv(tl, location, v, v_count);
+ (void)yagl_host_glUniform1fv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform1i(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLint x;
location = yagl_transport_get_out_uint32_t(t);
x = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform1i, GLboolean, uint32_t, GLint, tl, location, x);
- (void)yagl_host_glUniform1i(tl, location, x);
+ (void)yagl_host_glUniform1i(cur_ts, tl, location, x);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform1iv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform1iv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform1iv(tl, location, v, v_count);
+ (void)yagl_host_glUniform1iv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform2f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLfloat x;
x = yagl_transport_get_out_GLfloat(t);
y = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniform2f, GLboolean, uint32_t, GLfloat, GLfloat, tl, location, x, y);
- (void)yagl_host_glUniform2f(tl, location, x, y);
+ (void)yagl_host_glUniform2f(cur_ts, tl, location, x, y);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform2fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLfloat *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform2fv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform2fv(tl, location, v, v_count);
+ (void)yagl_host_glUniform2fv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform2i(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLint x;
x = yagl_transport_get_out_GLint(t);
y = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniform2i, GLboolean, uint32_t, GLint, GLint, tl, location, x, y);
- (void)yagl_host_glUniform2i(tl, location, x, y);
+ (void)yagl_host_glUniform2i(cur_ts, tl, location, x, y);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform2iv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform2iv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform2iv(tl, location, v, v_count);
+ (void)yagl_host_glUniform2iv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform3f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLfloat x;
y = yagl_transport_get_out_GLfloat(t);
z = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glUniform3f, GLboolean, uint32_t, GLfloat, GLfloat, GLfloat, tl, location, x, y, z);
- (void)yagl_host_glUniform3f(tl, location, x, y, z);
+ (void)yagl_host_glUniform3f(cur_ts, tl, location, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform3fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLfloat *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform3fv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform3fv(tl, location, v, v_count);
+ (void)yagl_host_glUniform3fv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform3i(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLint x;
y = yagl_transport_get_out_GLint(t);
z = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glUniform3i, GLboolean, uint32_t, GLint, GLint, GLint, tl, location, x, y, z);
- (void)yagl_host_glUniform3i(tl, location, x, y, z);
+ (void)yagl_host_glUniform3i(cur_ts, tl, location, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform3iv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform3iv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform3iv(tl, location, v, v_count);
+ (void)yagl_host_glUniform3iv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform4f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLfloat x;
z = yagl_transport_get_out_GLfloat(t);
w = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glUniform4f, GLboolean, uint32_t, GLfloat, GLfloat, GLfloat, GLfloat, tl, location, x, y, z, w);
- (void)yagl_host_glUniform4f(tl, location, x, y, z, w);
+ (void)yagl_host_glUniform4f(cur_ts, tl, location, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform4fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLfloat *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform4fv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform4fv(tl, location, v, v_count);
+ (void)yagl_host_glUniform4fv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform4i(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLint x;
z = yagl_transport_get_out_GLint(t);
w = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glUniform4i, GLboolean, uint32_t, GLint, GLint, GLint, GLint, tl, location, x, y, z, w);
- (void)yagl_host_glUniform4i(tl, location, x, y, z, w);
+ (void)yagl_host_glUniform4i(cur_ts, tl, location, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform4iv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform4iv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform4iv(tl, location, v, v_count);
+ (void)yagl_host_glUniform4iv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix2fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix2fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix2fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix2fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix3fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix3fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix3fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix3fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix4fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix4fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix4fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix4fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUseProgram(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
program = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glUseProgram, GLuint, program);
- (void)yagl_host_glUseProgram(program);
+ (void)yagl_host_glUseProgram(cur_ts, program);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glValidateProgram(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
program = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glValidateProgram, GLuint, program);
- (void)yagl_host_glValidateProgram(program);
+ (void)yagl_host_glValidateProgram(cur_ts, program);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib1f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
GLfloat x;
indx = yagl_transport_get_out_GLuint(t);
x = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttrib1f, GLuint, GLfloat, indx, x);
- (void)yagl_host_glVertexAttrib1f(indx, x);
+ (void)yagl_host_glVertexAttrib1f(cur_ts, indx, x);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib1fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
const GLfloat *values;
int32_t values_count;
indx = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&values, &values_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttrib1fv, GLuint, void*, indx, values);
- (void)yagl_host_glVertexAttrib1fv(indx, values, values_count);
+ (void)yagl_host_glVertexAttrib1fv(cur_ts, indx, values, values_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib2f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
GLfloat x;
GLfloat y;
x = yagl_transport_get_out_GLfloat(t);
y = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glVertexAttrib2f, GLuint, GLfloat, GLfloat, indx, x, y);
- (void)yagl_host_glVertexAttrib2f(indx, x, y);
+ (void)yagl_host_glVertexAttrib2f(cur_ts, indx, x, y);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib2fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
const GLfloat *values;
int32_t values_count;
indx = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&values, &values_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttrib2fv, GLuint, void*, indx, values);
- (void)yagl_host_glVertexAttrib2fv(indx, values, values_count);
+ (void)yagl_host_glVertexAttrib2fv(cur_ts, indx, values, values_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib3f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
GLfloat x;
GLfloat y;
y = yagl_transport_get_out_GLfloat(t);
z = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glVertexAttrib3f, GLuint, GLfloat, GLfloat, GLfloat, indx, x, y, z);
- (void)yagl_host_glVertexAttrib3f(indx, x, y, z);
+ (void)yagl_host_glVertexAttrib3f(cur_ts, indx, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib3fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
const GLfloat *values;
int32_t values_count;
indx = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&values, &values_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttrib3fv, GLuint, void*, indx, values);
- (void)yagl_host_glVertexAttrib3fv(indx, values, values_count);
+ (void)yagl_host_glVertexAttrib3fv(cur_ts, indx, values, values_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib4f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
GLfloat x;
GLfloat y;
z = yagl_transport_get_out_GLfloat(t);
w = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glVertexAttrib4f, GLuint, GLfloat, GLfloat, GLfloat, GLfloat, indx, x, y, z, w);
- (void)yagl_host_glVertexAttrib4f(indx, x, y, z, w);
+ (void)yagl_host_glVertexAttrib4f(cur_ts, indx, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttrib4fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint indx;
const GLfloat *values;
int32_t values_count;
indx = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&values, &values_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttrib4fv, GLuint, void*, indx, values);
- (void)yagl_host_glVertexAttrib4fv(indx, values, values_count);
+ (void)yagl_host_glVertexAttrib4fv(cur_ts, indx, values, values_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetActiveUniformsiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLuint *uniformIndices;
int32_t uniformIndices_count;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetActiveUniformsiv, GLuint, void*, void*, program, uniformIndices, params);
*params_count = 0;
- (void)yagl_host_glGetActiveUniformsiv(program, uniformIndices, uniformIndices_count, params, params_maxcount, params_count);
+ (void)yagl_host_glGetActiveUniformsiv(cur_ts, program, uniformIndices, uniformIndices_count, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetUniformIndices(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLchar *uniformNames;
int32_t uniformNames_count;
yagl_transport_get_in_array(t, sizeof(GLuint), (void**)&uniformIndices, &uniformIndices_maxcount, &uniformIndices_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetUniformIndices, GLuint, void*, void*, program, uniformNames, uniformIndices);
*uniformIndices_count = 0;
- (void)yagl_host_glGetUniformIndices(program, uniformNames, uniformNames_count, uniformIndices, uniformIndices_maxcount, uniformIndices_count);
+ (void)yagl_host_glGetUniformIndices(cur_ts, program, uniformNames, uniformNames_count, uniformIndices, uniformIndices_maxcount, uniformIndices_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetUniformBlockIndex(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLchar *uniformBlockName;
int32_t uniformBlockName_count;
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&uniformBlockName, &uniformBlockName_count);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetUniformBlockIndex, GLuint, void*, program, uniformBlockName);
- *retval = yagl_host_glGetUniformBlockIndex(program, uniformBlockName, uniformBlockName_count);
+ *retval = yagl_host_glGetUniformBlockIndex(cur_ts, program, uniformBlockName, uniformBlockName_count);
YAGL_LOG_FUNC_EXIT_SPLIT(GLuint, *retval);
}
*/
static void yagl_func_glUniformBlockBinding(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint uniformBlockIndex;
GLuint uniformBlockBinding;
uniformBlockIndex = yagl_transport_get_out_GLuint(t);
uniformBlockBinding = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniformBlockBinding, GLuint, GLuint, GLuint, program, uniformBlockIndex, uniformBlockBinding);
- (void)yagl_host_glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
+ (void)yagl_host_glUniformBlockBinding(cur_ts, program, uniformBlockIndex, uniformBlockBinding);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetActiveUniformBlockName(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint uniformBlockIndex;
GLchar *uniformBlockName;
yagl_transport_get_in_array(t, sizeof(GLchar), (void**)&uniformBlockName, &uniformBlockName_maxcount, &uniformBlockName_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetActiveUniformBlockName, GLuint, GLuint, void*, program, uniformBlockIndex, uniformBlockName);
*uniformBlockName_count = 0;
- (void)yagl_host_glGetActiveUniformBlockName(program, uniformBlockIndex, uniformBlockName, uniformBlockName_maxcount, uniformBlockName_count);
+ (void)yagl_host_glGetActiveUniformBlockName(cur_ts, program, uniformBlockIndex, uniformBlockName, uniformBlockName_maxcount, uniformBlockName_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetActiveUniformBlockiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLuint uniformBlockIndex;
GLenum pname;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glGetActiveUniformBlockiv, GLuint, GLuint, GLenum, void*, program, uniformBlockIndex, pname, params);
*params_count = 0;
- (void)yagl_host_glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetActiveUniformBlockiv(cur_ts, program, uniformBlockIndex, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetVertexAttribIiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLenum pname;
GLint *params;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetVertexAttribIiv, GLuint, GLenum, void*, index, pname, params);
*params_count = 0;
- (void)yagl_host_glGetVertexAttribIiv(index, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetVertexAttribIiv(cur_ts, index, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetVertexAttribIuiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLenum pname;
GLuint *params;
yagl_transport_get_in_array(t, sizeof(GLuint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetVertexAttribIuiv, GLuint, GLenum, void*, index, pname, params);
*params_count = 0;
- (void)yagl_host_glGetVertexAttribIuiv(index, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetVertexAttribIuiv(cur_ts, index, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribI4i(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLint x;
GLint y;
z = yagl_transport_get_out_GLint(t);
w = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glVertexAttribI4i, GLuint, GLint, GLint, GLint, GLint, index, x, y, z, w);
- (void)yagl_host_glVertexAttribI4i(index, x, y, z, w);
+ (void)yagl_host_glVertexAttribI4i(cur_ts, index, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribI4ui(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
GLuint x;
GLuint y;
z = yagl_transport_get_out_GLuint(t);
w = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glVertexAttribI4ui, GLuint, GLuint, GLuint, GLuint, GLuint, index, x, y, z, w);
- (void)yagl_host_glVertexAttribI4ui(index, x, y, z, w);
+ (void)yagl_host_glVertexAttribI4ui(cur_ts, index, x, y, z, w);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribI4iv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
const GLint *v;
int32_t v_count;
index = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttribI4iv, GLuint, void*, index, v);
- (void)yagl_host_glVertexAttribI4iv(index, v, v_count);
+ (void)yagl_host_glVertexAttribI4iv(cur_ts, index, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glVertexAttribI4uiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint index;
const GLuint *v;
int32_t v_count;
index = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glVertexAttribI4uiv, GLuint, void*, index, v);
- (void)yagl_host_glVertexAttribI4uiv(index, v, v_count);
+ (void)yagl_host_glVertexAttribI4uiv(cur_ts, index, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetUniformuiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
GLuint program;
uint32_t location;
yagl_transport_get_in_array(t, sizeof(GLuint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glGetUniformuiv, GLboolean, GLuint, uint32_t, void*, tl, program, location, params);
*params_count = 0;
- (void)yagl_host_glGetUniformuiv(tl, program, location, params, params_maxcount, params_count);
+ (void)yagl_host_glGetUniformuiv(cur_ts, tl, program, location, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform1ui(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLuint v0;
location = yagl_transport_get_out_uint32_t(t);
v0 = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform1ui, GLboolean, uint32_t, GLuint, tl, location, v0);
- (void)yagl_host_glUniform1ui(tl, location, v0);
+ (void)yagl_host_glUniform1ui(cur_ts, tl, location, v0);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform2ui(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLuint v0;
v0 = yagl_transport_get_out_GLuint(t);
v1 = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniform2ui, GLboolean, uint32_t, GLuint, GLuint, tl, location, v0, v1);
- (void)yagl_host_glUniform2ui(tl, location, v0, v1);
+ (void)yagl_host_glUniform2ui(cur_ts, tl, location, v0, v1);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform3ui(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLuint v0;
v1 = yagl_transport_get_out_GLuint(t);
v2 = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT5(glUniform3ui, GLboolean, uint32_t, GLuint, GLuint, GLuint, tl, location, v0, v1, v2);
- (void)yagl_host_glUniform3ui(tl, location, v0, v1, v2);
+ (void)yagl_host_glUniform3ui(cur_ts, tl, location, v0, v1, v2);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform4ui(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLuint v0;
v2 = yagl_transport_get_out_GLuint(t);
v3 = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glUniform4ui, GLboolean, uint32_t, GLuint, GLuint, GLuint, GLuint, tl, location, v0, v1, v2, v3);
- (void)yagl_host_glUniform4ui(tl, location, v0, v1, v2, v3);
+ (void)yagl_host_glUniform4ui(cur_ts, tl, location, v0, v1, v2, v3);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform1uiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLuint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform1uiv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform1uiv(tl, location, v, v_count);
+ (void)yagl_host_glUniform1uiv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform2uiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLuint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform2uiv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform2uiv(tl, location, v, v_count);
+ (void)yagl_host_glUniform2uiv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform3uiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLuint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform3uiv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform3uiv(tl, location, v, v_count);
+ (void)yagl_host_glUniform3uiv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniform4uiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
const GLuint *v;
location = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&v, &v_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glUniform4uiv, GLboolean, uint32_t, void*, tl, location, v);
- (void)yagl_host_glUniform4uiv(tl, location, v, v_count);
+ (void)yagl_host_glUniform4uiv(cur_ts, tl, location, v, v_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix2x3fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix2x3fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix2x3fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix2x3fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix2x4fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix2x4fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix2x4fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix2x4fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix3x2fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix3x2fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix3x2fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix3x2fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix3x4fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix3x4fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix3x4fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix3x4fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix4x2fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix4x2fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix4x2fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix4x2fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUniformMatrix4x3fv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean tl;
uint32_t location;
GLboolean transpose;
transpose = yagl_transport_get_out_GLboolean(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&value, &value_count);
YAGL_LOG_FUNC_ENTER_SPLIT4(glUniformMatrix4x3fv, GLboolean, uint32_t, GLboolean, void*, tl, location, transpose, value);
- (void)yagl_host_glUniformMatrix4x3fv(tl, location, transpose, value, value_count);
+ (void)yagl_host_glUniformMatrix4x3fv(cur_ts, tl, location, transpose, value, value_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetFragDataLocation(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLchar *name;
int32_t name_count;
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&name, &name_count);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetFragDataLocation, GLuint, void*, program, name);
- *retval = yagl_host_glGetFragDataLocation(program, name, name_count);
+ *retval = yagl_host_glGetFragDataLocation(cur_ts, program, name, name_count);
YAGL_LOG_FUNC_EXIT_SPLIT(int, *retval);
}
*/
static void yagl_func_glGetIntegerv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLint *params;
int32_t params_maxcount;
yagl_transport_get_in_array(t, sizeof(GLint), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetIntegerv, GLenum, void*, pname, params);
*params_count = 0;
- (void)yagl_host_glGetIntegerv(pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetIntegerv(cur_ts, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetFloatv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLfloat *params;
int32_t params_maxcount;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetFloatv, GLenum, void*, pname, params);
*params_count = 0;
- (void)yagl_host_glGetFloatv(pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetFloatv(cur_ts, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetString(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum name;
GLchar *str;
int32_t str_maxcount;
yagl_transport_get_in_array(t, sizeof(GLchar), (void**)&str, &str_maxcount, &str_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetString, GLenum, void*, name, str);
*str_count = 0;
- (void)yagl_host_glGetString(name, str, str_maxcount, str_count);
+ (void)yagl_host_glGetString(cur_ts, name, str, str_maxcount, str_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glIsEnabled(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum cap;
GLboolean *retval;
cap = yagl_transport_get_out_GLenum(t);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT1(glIsEnabled, GLenum, cap);
- *retval = yagl_host_glIsEnabled(cap);
+ *retval = yagl_host_glIsEnabled(cur_ts, cap);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, *retval);
}
*/
static void yagl_func_glGenTransformFeedbacks(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *ids;
int32_t ids_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&ids, &ids_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenTransformFeedbacks, void*, ids);
- (void)yagl_host_glGenTransformFeedbacks(ids, ids_count);
+ (void)yagl_host_glGenTransformFeedbacks(cur_ts, ids, ids_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindTransformFeedback(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint id;
target = yagl_transport_get_out_GLenum(t);
id = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBindTransformFeedback, GLenum, GLuint, target, id);
- (void)yagl_host_glBindTransformFeedback(target, id);
+ (void)yagl_host_glBindTransformFeedback(cur_ts, target, id);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBeginTransformFeedback(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum primitiveMode;
primitiveMode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glBeginTransformFeedback, GLenum, primitiveMode);
- (void)yagl_host_glBeginTransformFeedback(primitiveMode);
+ (void)yagl_host_glBeginTransformFeedback(cur_ts, primitiveMode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glEndTransformFeedback(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glEndTransformFeedback);
- (void)yagl_host_glEndTransformFeedback();
+ (void)yagl_host_glEndTransformFeedback(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPauseTransformFeedback(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glPauseTransformFeedback);
- (void)yagl_host_glPauseTransformFeedback();
+ (void)yagl_host_glPauseTransformFeedback(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glResumeTransformFeedback(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glResumeTransformFeedback);
- (void)yagl_host_glResumeTransformFeedback();
+ (void)yagl_host_glResumeTransformFeedback(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTransformFeedbackVaryings(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
const GLchar *varyings;
int32_t varyings_count;
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&varyings, &varyings_count);
bufferMode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTransformFeedbackVaryings, GLuint, void*, GLenum, program, varyings, bufferMode);
- (void)yagl_host_glTransformFeedbackVaryings(program, varyings, varyings_count, bufferMode);
+ (void)yagl_host_glTransformFeedbackVaryings(cur_ts, t, program, varyings, varyings_count, bufferMode);
YAGL_LOG_FUNC_EXIT(NULL);
}
+
/*
* glGetTransformFeedbackVaryings dispatcher. id = 169
*/
static void yagl_func_glGetTransformFeedbackVaryings(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint program;
GLsizei *sizes;
int32_t sizes_maxcount;
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetTransformFeedbackVaryings, GLuint, void*, void*, program, sizes, types);
*sizes_count = 0;
*types_count = 0;
- (void)yagl_host_glGetTransformFeedbackVaryings(program, sizes, sizes_maxcount, sizes_count, types, types_maxcount, types_count);
+ (void)yagl_host_glGetTransformFeedbackVaryings(cur_ts, program, sizes, sizes_maxcount, sizes_count, types, types_maxcount, types_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenQueries(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *ids;
int32_t ids_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&ids, &ids_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenQueries, void*, ids);
- (void)yagl_host_glGenQueries(ids, ids_count);
+ (void)yagl_host_glGenQueries(cur_ts, ids, ids_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBeginQuery(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLuint id;
target = yagl_transport_get_out_GLenum(t);
id = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBeginQuery, GLenum, GLuint, target, id);
- (void)yagl_host_glBeginQuery(target, id);
+ (void)yagl_host_glBeginQuery(cur_ts, target, id);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glEndQuery(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
target = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glEndQuery, GLenum, target);
- (void)yagl_host_glEndQuery(target);
+ (void)yagl_host_glEndQuery(cur_ts, target);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetQueryObjectuiv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint id;
GLenum pname;
GLuint *result;
yagl_transport_get_in_arg(t, (void**)&result);
yagl_transport_get_in_arg(t, (void**)&retval);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetQueryObjectuiv, GLuint, GLenum, void*, id, pname, result);
- *retval = yagl_host_glGetQueryObjectuiv(id, pname, result);
+ *retval = yagl_host_glGetQueryObjectuiv(cur_ts, id, pname, result);
YAGL_LOG_FUNC_EXIT_SPLIT(GLboolean, *retval);
}
*/
static void yagl_func_glGenSamplers(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *samplers;
int32_t samplers_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&samplers, &samplers_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenSamplers, void*, samplers);
- (void)yagl_host_glGenSamplers(samplers, samplers_count);
+ (void)yagl_host_glGenSamplers(cur_ts, samplers, samplers_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBindSampler(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint unit;
GLuint sampler;
unit = yagl_transport_get_out_GLuint(t);
sampler = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBindSampler, GLuint, GLuint, unit, sampler);
- (void)yagl_host_glBindSampler(unit, sampler);
+ (void)yagl_host_glBindSampler(cur_ts, unit, sampler);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glSamplerParameteri(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint sampler;
GLenum pname;
GLint param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glSamplerParameteri, GLuint, GLenum, GLint, sampler, pname, param);
- (void)yagl_host_glSamplerParameteri(sampler, pname, param);
+ (void)yagl_host_glSamplerParameteri(cur_ts, sampler, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glSamplerParameteriv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint sampler;
GLenum pname;
const GLint *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLint), (const void**)¶m, ¶m_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glSamplerParameteriv, GLuint, GLenum, void*, sampler, pname, param);
- (void)yagl_host_glSamplerParameteriv(sampler, pname, param, param_count);
+ (void)yagl_host_glSamplerParameteriv(cur_ts, sampler, pname, param, param_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glSamplerParameterf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint sampler;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glSamplerParameterf, GLuint, GLenum, GLfloat, sampler, pname, param);
- (void)yagl_host_glSamplerParameterf(sampler, pname, param);
+ (void)yagl_host_glSamplerParameterf(cur_ts, sampler, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glSamplerParameterfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint sampler;
GLenum pname;
const GLfloat *param;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶m, ¶m_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glSamplerParameterfv, GLuint, GLenum, void*, sampler, pname, param);
- (void)yagl_host_glSamplerParameterfv(sampler, pname, param, param_count);
+ (void)yagl_host_glSamplerParameterfv(cur_ts, sampler, pname, param, param_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDeleteObjects(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLuint *objects;
int32_t objects_count;
yagl_transport_get_out_array(t, sizeof(GLuint), (const void**)&objects, &objects_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDeleteObjects, void*, objects);
- (void)yagl_host_glDeleteObjects(objects, objects_count);
+ (void)yagl_host_glDeleteObjects(cur_ts, objects, objects_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBlendEquation(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glBlendEquation, GLenum, mode);
- (void)yagl_host_glBlendEquation(mode);
+ (void)yagl_host_glBlendEquation(cur_ts, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBlendEquationSeparate(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum modeRGB;
GLenum modeAlpha;
modeRGB = yagl_transport_get_out_GLenum(t);
modeAlpha = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBlendEquationSeparate, GLenum, GLenum, modeRGB, modeAlpha);
- (void)yagl_host_glBlendEquationSeparate(modeRGB, modeAlpha);
+ (void)yagl_host_glBlendEquationSeparate(cur_ts, modeRGB, modeAlpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBlendFunc(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum sfactor;
GLenum dfactor;
sfactor = yagl_transport_get_out_GLenum(t);
dfactor = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glBlendFunc, GLenum, GLenum, sfactor, dfactor);
- (void)yagl_host_glBlendFunc(sfactor, dfactor);
+ (void)yagl_host_glBlendFunc(cur_ts, sfactor, dfactor);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBlendFuncSeparate(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum srcRGB;
GLenum dstRGB;
GLenum srcAlpha;
srcAlpha = yagl_transport_get_out_GLenum(t);
dstAlpha = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glBlendFuncSeparate, GLenum, GLenum, GLenum, GLenum, srcRGB, dstRGB, srcAlpha, dstAlpha);
- (void)yagl_host_glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
+ (void)yagl_host_glBlendFuncSeparate(cur_ts, srcRGB, dstRGB, srcAlpha, dstAlpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glBlendColor(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLclampf red;
GLclampf green;
GLclampf blue;
blue = yagl_transport_get_out_GLclampf(t);
alpha = yagl_transport_get_out_GLclampf(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glBlendColor, GLclampf, GLclampf, GLclampf, GLclampf, red, green, blue, alpha);
- (void)yagl_host_glBlendColor(red, green, blue, alpha);
+ (void)yagl_host_glBlendColor(cur_ts, red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClear(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLbitfield mask;
mask = yagl_transport_get_out_GLbitfield(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glClear, GLbitfield, mask);
- (void)yagl_host_glClear(mask);
+ (void)yagl_host_glClear(cur_ts, mask);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearColor(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLclampf red;
GLclampf green;
GLclampf blue;
blue = yagl_transport_get_out_GLclampf(t);
alpha = yagl_transport_get_out_GLclampf(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glClearColor, GLclampf, GLclampf, GLclampf, GLclampf, red, green, blue, alpha);
- (void)yagl_host_glClearColor(red, green, blue, alpha);
+ (void)yagl_host_glClearColor(cur_ts, red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearDepthf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLclampf depth;
depth = yagl_transport_get_out_GLclampf(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glClearDepthf, GLclampf, depth);
- (void)yagl_host_glClearDepthf(depth);
+ (void)yagl_host_glClearDepthf(cur_ts, depth);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClearStencil(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint s;
s = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glClearStencil, GLint, s);
- (void)yagl_host_glClearStencil(s);
+ (void)yagl_host_glClearStencil(cur_ts, s);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glColorMask(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean red;
GLboolean green;
GLboolean blue;
blue = yagl_transport_get_out_GLboolean(t);
alpha = yagl_transport_get_out_GLboolean(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glColorMask, GLboolean, GLboolean, GLboolean, GLboolean, red, green, blue, alpha);
- (void)yagl_host_glColorMask(red, green, blue, alpha);
+ (void)yagl_host_glColorMask(cur_ts, red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glCullFace(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glCullFace, GLenum, mode);
- (void)yagl_host_glCullFace(mode);
+ (void)yagl_host_glCullFace(cur_ts, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDepthFunc(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum func;
func = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDepthFunc, GLenum, func);
- (void)yagl_host_glDepthFunc(func);
+ (void)yagl_host_glDepthFunc(cur_ts, func);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDepthMask(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLboolean flag;
flag = yagl_transport_get_out_GLboolean(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDepthMask, GLboolean, flag);
- (void)yagl_host_glDepthMask(flag);
+ (void)yagl_host_glDepthMask(cur_ts, flag);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDepthRangef(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLclampf zNear;
GLclampf zFar;
zNear = yagl_transport_get_out_GLclampf(t);
zFar = yagl_transport_get_out_GLclampf(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glDepthRangef, GLclampf, GLclampf, zNear, zFar);
- (void)yagl_host_glDepthRangef(zNear, zFar);
+ (void)yagl_host_glDepthRangef(cur_ts, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glEnable(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum cap;
cap = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glEnable, GLenum, cap);
- (void)yagl_host_glEnable(cap);
+ (void)yagl_host_glEnable(cur_ts, cap);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDisable(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum cap;
cap = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDisable, GLenum, cap);
- (void)yagl_host_glDisable(cap);
+ (void)yagl_host_glDisable(cur_ts, cap);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFlush(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glFlush);
- (void)yagl_host_glFlush();
+ (void)yagl_host_glFlush(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFrontFace(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glFrontFace, GLenum, mode);
- (void)yagl_host_glFrontFace(mode);
+ (void)yagl_host_glFrontFace(cur_ts, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenerateMipmap(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
target = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glGenerateMipmap, GLenum, target);
- (void)yagl_host_glGenerateMipmap(target);
+ (void)yagl_host_glGenerateMipmap(cur_ts, target);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glHint(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum target;
GLenum mode;
target = yagl_transport_get_out_GLenum(t);
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glHint, GLenum, GLenum, target, mode);
- (void)yagl_host_glHint(target, mode);
+ (void)yagl_host_glHint(cur_ts, target, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLineWidth(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat width;
width = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glLineWidth, GLfloat, width);
- (void)yagl_host_glLineWidth(width);
+ (void)yagl_host_glLineWidth(cur_ts, width);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPixelStorei(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLint param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glPixelStorei, GLenum, GLint, pname, param);
- (void)yagl_host_glPixelStorei(pname, param);
+ (void)yagl_host_glPixelStorei(cur_ts, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPolygonOffset(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat factor;
GLfloat units;
factor = yagl_transport_get_out_GLfloat(t);
units = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glPolygonOffset, GLfloat, GLfloat, factor, units);
- (void)yagl_host_glPolygonOffset(factor, units);
+ (void)yagl_host_glPolygonOffset(cur_ts, factor, units);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glScissor(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint x;
GLint y;
GLsizei width;
width = yagl_transport_get_out_GLsizei(t);
height = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glScissor, GLint, GLint, GLsizei, GLsizei, x, y, width, height);
- (void)yagl_host_glScissor(x, y, width, height);
+ (void)yagl_host_glScissor(cur_ts, x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glStencilFunc(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum func;
GLint ref;
GLuint mask;
ref = yagl_transport_get_out_GLint(t);
mask = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glStencilFunc, GLenum, GLint, GLuint, func, ref, mask);
- (void)yagl_host_glStencilFunc(func, ref, mask);
+ (void)yagl_host_glStencilFunc(cur_ts, func, ref, mask);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glStencilMask(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint mask;
mask = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glStencilMask, GLuint, mask);
- (void)yagl_host_glStencilMask(mask);
+ (void)yagl_host_glStencilMask(cur_ts, mask);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glStencilOp(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum fail;
GLenum zfail;
GLenum zpass;
zfail = yagl_transport_get_out_GLenum(t);
zpass = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glStencilOp, GLenum, GLenum, GLenum, fail, zfail, zpass);
- (void)yagl_host_glStencilOp(fail, zfail, zpass);
+ (void)yagl_host_glStencilOp(cur_ts, fail, zfail, zpass);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glSampleCoverage(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLclampf value;
GLboolean invert;
value = yagl_transport_get_out_GLclampf(t);
invert = yagl_transport_get_out_GLboolean(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glSampleCoverage, GLclampf, GLboolean, value, invert);
- (void)yagl_host_glSampleCoverage(value, invert);
+ (void)yagl_host_glSampleCoverage(cur_ts, value, invert);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glViewport(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLint x;
GLint y;
GLsizei width;
width = yagl_transport_get_out_GLsizei(t);
height = yagl_transport_get_out_GLsizei(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glViewport, GLint, GLint, GLsizei, GLsizei, x, y, width, height);
- (void)yagl_host_glViewport(x, y, width, height);
+ (void)yagl_host_glViewport(cur_ts, x, y, width, height);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glStencilFuncSeparate(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum face;
GLenum func;
GLint ref;
ref = yagl_transport_get_out_GLint(t);
mask = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glStencilFuncSeparate, GLenum, GLenum, GLint, GLuint, face, func, ref, mask);
- (void)yagl_host_glStencilFuncSeparate(face, func, ref, mask);
+ (void)yagl_host_glStencilFuncSeparate(cur_ts, face, func, ref, mask);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glStencilMaskSeparate(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum face;
GLuint mask;
face = yagl_transport_get_out_GLenum(t);
mask = yagl_transport_get_out_GLuint(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glStencilMaskSeparate, GLenum, GLuint, face, mask);
- (void)yagl_host_glStencilMaskSeparate(face, mask);
+ (void)yagl_host_glStencilMaskSeparate(cur_ts, face, mask);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glStencilOpSeparate(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum face;
GLenum fail;
GLenum zfail;
zfail = yagl_transport_get_out_GLenum(t);
zpass = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glStencilOpSeparate, GLenum, GLenum, GLenum, GLenum, face, fail, zfail, zpass);
- (void)yagl_host_glStencilOpSeparate(face, fail, zfail, zpass);
+ (void)yagl_host_glStencilOpSeparate(cur_ts, face, fail, zfail, zpass);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPointSize(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat size;
size = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glPointSize, GLfloat, size);
- (void)yagl_host_glPointSize(size);
+ (void)yagl_host_glPointSize(cur_ts, size);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glAlphaFunc(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum func;
GLclampf ref;
func = yagl_transport_get_out_GLenum(t);
ref = yagl_transport_get_out_GLclampf(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glAlphaFunc, GLenum, GLclampf, func, ref);
- (void)yagl_host_glAlphaFunc(func, ref);
+ (void)yagl_host_glAlphaFunc(cur_ts, func, ref);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glMatrixMode(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glMatrixMode, GLenum, mode);
- (void)yagl_host_glMatrixMode(mode);
+ (void)yagl_host_glMatrixMode(cur_ts, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLoadIdentity(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glLoadIdentity);
- (void)yagl_host_glLoadIdentity();
+ (void)yagl_host_glLoadIdentity(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPopMatrix(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glPopMatrix);
- (void)yagl_host_glPopMatrix();
+ (void)yagl_host_glPopMatrix(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPushMatrix(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
YAGL_LOG_FUNC_ENTER_SPLIT0(glPushMatrix);
- (void)yagl_host_glPushMatrix();
+ (void)yagl_host_glPushMatrix(cur_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glRotatef(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat angle;
GLfloat x;
GLfloat y;
y = yagl_transport_get_out_GLfloat(t);
z = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glRotatef, GLfloat, GLfloat, GLfloat, GLfloat, angle, x, y, z);
- (void)yagl_host_glRotatef(angle, x, y, z);
+ (void)yagl_host_glRotatef(cur_ts, angle, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glTranslatef(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat x;
GLfloat y;
GLfloat z;
y = yagl_transport_get_out_GLfloat(t);
z = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glTranslatef, GLfloat, GLfloat, GLfloat, x, y, z);
- (void)yagl_host_glTranslatef(x, y, z);
+ (void)yagl_host_glTranslatef(cur_ts, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glScalef(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat x;
GLfloat y;
GLfloat z;
y = yagl_transport_get_out_GLfloat(t);
z = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glScalef, GLfloat, GLfloat, GLfloat, x, y, z);
- (void)yagl_host_glScalef(x, y, z);
+ (void)yagl_host_glScalef(cur_ts, x, y, z);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glOrthof(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat left;
GLfloat right;
GLfloat bottom;
zNear = yagl_transport_get_out_GLfloat(t);
zFar = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glOrthof, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, left, right, bottom, top, zNear, zFar);
- (void)yagl_host_glOrthof(left, right, bottom, top, zNear, zFar);
+ (void)yagl_host_glOrthof(cur_ts, left, right, bottom, top, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glColor4f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat red;
GLfloat green;
GLfloat blue;
blue = yagl_transport_get_out_GLfloat(t);
alpha = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glColor4f, GLfloat, GLfloat, GLfloat, GLfloat, red, green, blue, alpha);
- (void)yagl_host_glColor4f(red, green, blue, alpha);
+ (void)yagl_host_glColor4f(cur_ts, red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glColor4ub(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLubyte red;
GLubyte green;
GLubyte blue;
blue = yagl_transport_get_out_GLubyte(t);
alpha = yagl_transport_get_out_GLubyte(t);
YAGL_LOG_FUNC_ENTER_SPLIT4(glColor4ub, GLubyte, GLubyte, GLubyte, GLubyte, red, green, blue, alpha);
- (void)yagl_host_glColor4ub(red, green, blue, alpha);
+ (void)yagl_host_glColor4ub(cur_ts, red, green, blue, alpha);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glNormal3f(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat nx;
GLfloat ny;
GLfloat nz;
ny = yagl_transport_get_out_GLfloat(t);
nz = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glNormal3f, GLfloat, GLfloat, GLfloat, nx, ny, nz);
- (void)yagl_host_glNormal3f(nx, ny, nz);
+ (void)yagl_host_glNormal3f(cur_ts, nx, ny, nz);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPointParameterf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glPointParameterf, GLenum, GLfloat, pname, param);
- (void)yagl_host_glPointParameterf(pname, param);
+ (void)yagl_host_glPointParameterf(cur_ts, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glPointParameterfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
const GLfloat *params;
int32_t params_count;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glPointParameterfv, GLenum, void*, pname, params);
- (void)yagl_host_glPointParameterfv(pname, params, params_count);
+ (void)yagl_host_glPointParameterfv(cur_ts, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFogf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glFogf, GLenum, GLfloat, pname, param);
- (void)yagl_host_glFogf(pname, param);
+ (void)yagl_host_glFogf(cur_ts, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFogfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
const GLfloat *params;
int32_t params_count;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glFogfv, GLenum, void*, pname, params);
- (void)yagl_host_glFogfv(pname, params, params_count);
+ (void)yagl_host_glFogfv(cur_ts, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glFrustumf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLfloat left;
GLfloat right;
GLfloat bottom;
zNear = yagl_transport_get_out_GLfloat(t);
zFar = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT6(glFrustumf, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, GLfloat, left, right, bottom, top, zNear, zFar);
- (void)yagl_host_glFrustumf(left, right, bottom, top, zNear, zFar);
+ (void)yagl_host_glFrustumf(cur_ts, left, right, bottom, top, zNear, zFar);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLightf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum light;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glLightf, GLenum, GLenum, GLfloat, light, pname, param);
- (void)yagl_host_glLightf(light, pname, param);
+ (void)yagl_host_glLightf(cur_ts, light, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLightfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum light;
GLenum pname;
const GLfloat *params;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glLightfv, GLenum, GLenum, void*, light, pname, params);
- (void)yagl_host_glLightfv(light, pname, params, params_count);
+ (void)yagl_host_glLightfv(cur_ts, light, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetLightfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum light;
GLenum pname;
GLfloat *params;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetLightfv, GLenum, GLenum, void*, light, pname, params);
*params_count = 0;
- (void)yagl_host_glGetLightfv(light, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetLightfv(cur_ts, light, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLightModelf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT2(glLightModelf, GLenum, GLfloat, pname, param);
- (void)yagl_host_glLightModelf(pname, param);
+ (void)yagl_host_glLightModelf(cur_ts, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLightModelfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
const GLfloat *params;
int32_t params_count;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glLightModelfv, GLenum, void*, pname, params);
- (void)yagl_host_glLightModelfv(pname, params, params_count);
+ (void)yagl_host_glLightModelfv(cur_ts, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glMaterialf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum face;
GLenum pname;
GLfloat param;
pname = yagl_transport_get_out_GLenum(t);
param = yagl_transport_get_out_GLfloat(t);
YAGL_LOG_FUNC_ENTER_SPLIT3(glMaterialf, GLenum, GLenum, GLfloat, face, pname, param);
- (void)yagl_host_glMaterialf(face, pname, param);
+ (void)yagl_host_glMaterialf(cur_ts, face, pname, param);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glMaterialfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum face;
GLenum pname;
const GLfloat *params;
pname = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)¶ms, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glMaterialfv, GLenum, GLenum, void*, face, pname, params);
- (void)yagl_host_glMaterialfv(face, pname, params, params_count);
+ (void)yagl_host_glMaterialfv(cur_ts, face, pname, params, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetMaterialfv(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum face;
GLenum pname;
GLfloat *params;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)¶ms, ¶ms_maxcount, ¶ms_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGetMaterialfv, GLenum, GLenum, void*, face, pname, params);
*params_count = 0;
- (void)yagl_host_glGetMaterialfv(face, pname, params, params_maxcount, params_count);
+ (void)yagl_host_glGetMaterialfv(cur_ts, face, pname, params, params_maxcount, params_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glShadeModel(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum mode;
mode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glShadeModel, GLenum, mode);
- (void)yagl_host_glShadeModel(mode);
+ (void)yagl_host_glShadeModel(cur_ts, mode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLogicOp(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum opcode;
opcode = yagl_transport_get_out_GLenum(t);
YAGL_LOG_FUNC_ENTER_SPLIT1(glLogicOp, GLenum, opcode);
- (void)yagl_host_glLogicOp(opcode);
+ (void)yagl_host_glLogicOp(cur_ts, opcode);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glMultMatrixf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLfloat *m;
int32_t m_count;
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&m, &m_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glMultMatrixf, void*, m);
- (void)yagl_host_glMultMatrixf(m, m_count);
+ (void)yagl_host_glMultMatrixf(cur_ts, m, m_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glLoadMatrixf(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const GLfloat *m;
int32_t m_count;
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&m, &m_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glLoadMatrixf, void*, m);
- (void)yagl_host_glLoadMatrixf(m, m_count);
+ (void)yagl_host_glLoadMatrixf(cur_ts, m, m_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glClipPlanef(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum plane;
const GLfloat *equation;
int32_t equation_count;
plane = yagl_transport_get_out_GLenum(t);
yagl_transport_get_out_array(t, sizeof(GLfloat), (const void**)&equation, &equation_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glClipPlanef, GLenum, void*, plane, equation);
- (void)yagl_host_glClipPlanef(plane, equation, equation_count);
+ (void)yagl_host_glClipPlanef(cur_ts, plane, equation, equation_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGetClipPlanef(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLenum pname;
GLfloat *eqn;
int32_t eqn_maxcount;
yagl_transport_get_in_array(t, sizeof(GLfloat), (void**)&eqn, &eqn_maxcount, &eqn_count);
YAGL_LOG_FUNC_ENTER_SPLIT2(glGetClipPlanef, GLenum, void*, pname, eqn);
*eqn_count = 0;
- (void)yagl_host_glGetClipPlanef(pname, eqn, eqn_maxcount, eqn_count);
+ (void)yagl_host_glGetClipPlanef(cur_ts, pname, eqn, eqn_maxcount, eqn_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glUpdateOffscreenImageYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
GLuint texture;
uint32_t width;
uint32_t height;
bpp = yagl_transport_get_out_uint32_t(t);
yagl_transport_get_out_array(t, 1, (const void**)&pixels, &pixels_count);
YAGL_LOG_FUNC_ENTER_SPLIT5(glUpdateOffscreenImageYAGL, GLuint, uint32_t, uint32_t, uint32_t, void*, texture, width, height, bpp, pixels);
- (void)yagl_host_glUpdateOffscreenImageYAGL(texture, width, height, bpp, pixels, pixels_count);
+ (void)yagl_host_glUpdateOffscreenImageYAGL(cur_ts, texture, width, height, bpp, pixels, pixels_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glGenUniformLocationYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
uint32_t location;
GLuint program;
const GLchar *name;
program = yagl_transport_get_out_GLuint(t);
yagl_transport_get_out_array(t, sizeof(GLchar), (const void**)&name, &name_count);
YAGL_LOG_FUNC_ENTER_SPLIT3(glGenUniformLocationYAGL, uint32_t, GLuint, void*, location, program, name);
- (void)yagl_host_glGenUniformLocationYAGL(location, program, name, name_count);
+ (void)yagl_host_glGenUniformLocationYAGL(cur_ts, location, program, name, name_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
*/
static void yagl_func_glDeleteUniformLocationsYAGL(struct yagl_transport *t)
{
+ struct yagl_thread_state *cur_ts = t->ts;
const uint32_t *locations;
int32_t locations_count;
yagl_transport_get_out_array(t, sizeof(uint32_t), (const void**)&locations, &locations_count);
YAGL_LOG_FUNC_ENTER_SPLIT1(glDeleteUniformLocationsYAGL, void*, locations);
- (void)yagl_host_glDeleteUniformLocationsYAGL(locations, locations_count);
+ (void)yagl_host_glDeleteUniformLocationsYAGL(cur_ts, locations, locations_count);
YAGL_LOG_FUNC_EXIT(NULL);
}
#include "yagl_object_map.h"
#include "yagl_transport.h"
+// TODO remove and pass via argument
static YAGL_DEFINE_TLS(struct yagl_gles_api_ts*, gles_api_ts);
struct yagl_gles_object
yagl_gles1_array_texcoord,
} yagl_gles1_array_type;
-static GLuint yagl_gles_bind_array(uint32_t indx,
+static GLuint yagl_gles_bind_array(struct yagl_thread_state *cur_ts,
+ uint32_t indx,
GLint first,
GLsizei stride,
const GLvoid *data,
return current_vbo;
}
-static GLuint yagl_gles_bind_ebo(const GLvoid *data, int32_t size)
+static GLuint yagl_gles_bind_ebo(struct yagl_thread_state *cur_ts,
+ const GLvoid *data, int32_t size)
{
GLuint current_ebo;
void *ptr;
return current_ebo;
}
-static bool yagl_gles_program_get_uniform_type(GLuint program,
+static bool yagl_gles_program_get_uniform_type(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLint location,
GLenum *type)
{
return true;
}
-static void yagl_gles_object_add(GLuint local_name,
+static void yagl_gles_object_add(struct yagl_process_state *ps,
+ GLuint local_name,
GLuint global_name,
uint32_t ctx_id,
void (*destroy_func)(struct yagl_object */*obj*/))
obj = g_malloc(sizeof(*obj));
obj->base.global_name = global_name;
+ obj->base.ps = ps;
obj->base.destroy = destroy_func;
obj->driver = gles_api_ts->driver;
obj->ctx_id = ctx_id;
- yagl_object_map_add(cur_ts->ps->object_map,
+ yagl_object_map_add(ps->object_map,
local_name,
&obj->base);
}
static void yagl_gles_buffer_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_buffer_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
gles_obj->driver->DeleteBuffers(1, &obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(gles_obj);
static void yagl_gles_texture_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_texture_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
gles_obj->driver->DeleteTextures(1, &obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(gles_obj);
static void yagl_gles_framebuffer_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_framebuffer_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(gles_obj->ctx_id);
+ yagl_ensure_ctx(obj->ps, gles_obj->ctx_id);
gles_obj->driver->DeleteFramebuffers(1, &obj->global_name);
- yagl_unensure_ctx(gles_obj->ctx_id);
+ yagl_unensure_ctx(obj->ps, gles_obj->ctx_id);
g_free(gles_obj);
static void yagl_gles_renderbuffer_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_renderbuffer_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
gles_obj->driver->DeleteRenderbuffers(1, &obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(gles_obj);
static void yagl_gles_program_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_program_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
gles_obj->driver->DeleteProgram(obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(gles_obj);
static void yagl_gles_shader_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_shader_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
gles_obj->driver->DeleteShader(obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(gles_obj);
static void yagl_gles_vertex_array_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_vertex_array_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(gles_obj->ctx_id);
+ yagl_ensure_ctx(obj->ps, gles_obj->ctx_id);
gles_obj->driver->DeleteVertexArrays(1, &obj->global_name);
- yagl_unensure_ctx(gles_obj->ctx_id);
+ yagl_unensure_ctx(obj->ps, gles_obj->ctx_id);
g_free(gles_obj);
static void yagl_gles_transform_feedback_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_transform_feedback_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(gles_obj->ctx_id);
+ yagl_ensure_ctx(obj->ps, gles_obj->ctx_id);
gles_obj->driver->DeleteTransformFeedbacks(1, &obj->global_name);
- yagl_unensure_ctx(gles_obj->ctx_id);
+ yagl_unensure_ctx(obj->ps, gles_obj->ctx_id);
g_free(gles_obj);
static void yagl_gles_query_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_query_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(gles_obj->ctx_id);
+ yagl_ensure_ctx(obj->ps, gles_obj->ctx_id);
gles_obj->driver->DeleteQueries(1, &obj->global_name);
- yagl_unensure_ctx(gles_obj->ctx_id);
+ yagl_unensure_ctx(obj->ps, gles_obj->ctx_id);
g_free(gles_obj);
static void yagl_gles_sampler_destroy(struct yagl_object *obj)
{
struct yagl_gles_object *gles_obj = (struct yagl_gles_object*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_sampler_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
gles_obj->driver->DeleteSamplers(1, &obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(gles_obj);
YAGL_LOG_FUNC_EXIT(NULL);
}
-static __inline GLuint yagl_gles_object_get(GLuint local_name)
+static __inline GLuint yagl_gles_object_get(struct yagl_thread_state *cur_ts,
+ GLuint local_name)
{
return (local_name > 0) ? yagl_object_map_get(cur_ts->ps->object_map, local_name) : 0;
}
}
}
-static void yagl_host_gles_thread_init(struct yagl_api_ps *api_ps)
+static void yagl_host_gles_thread_init(struct yagl_thread_state *cur_ts,
+ struct yagl_api_ps *api_ps)
{
struct yagl_gles_api_ps *gles_api_ps = (struct yagl_gles_api_ps*)api_ps;
gles_api_ts = g_malloc0(sizeof(*gles_api_ts));
- yagl_gles_api_ts_init(gles_api_ts, gles_api_ps->driver, gles_api_ps);
+ yagl_gles_api_ts_init(cur_ts, gles_api_ts, gles_api_ps->driver, gles_api_ps);
cur_ts->gles_api_ts = gles_api_ts;
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_host_gles_batch_start(struct yagl_api_ps *api_ps)
+static void yagl_host_gles_batch_start(struct yagl_thread_state *cur_ts,
+ struct yagl_api_ps *api_ps)
{
gles_api_ts = cur_ts->gles_api_ts;
}
-static void yagl_host_gles_batch_end(struct yagl_api_ps *api_ps)
+static void yagl_host_gles_batch_end(struct yagl_thread_state *cur_ts,
+ struct yagl_api_ps *api_ps)
{
}
-static void yagl_host_gles_thread_fini(struct yagl_api_ps *api_ps)
+static void yagl_host_gles_thread_fini(struct yagl_thread_state *cur_ts,
+ struct yagl_api_ps *api_ps)
{
YAGL_LOG_FUNC_ENTER(yagl_host_gles_thread_fini, NULL);
gles_api_ts = cur_ts->gles_api_ts;
- yagl_gles_api_ts_cleanup(gles_api_ts);
+ yagl_gles_api_ts_cleanup(cur_ts, gles_api_ts);
g_free(gles_api_ts);
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_host_gles_process_destroy(struct yagl_api_ps *api_ps)
+static void yagl_host_gles_process_destroy(struct yagl_thread_state *cur_ts,
+ struct yagl_api_ps *api_ps)
{
struct yagl_gles_api_ps *gles_api_ps = (struct yagl_gles_api_ps*)api_ps;
YAGL_LOG_FUNC_EXIT(NULL);
}
-struct yagl_api_ps *yagl_host_gles_process_init(struct yagl_api *api)
+struct yagl_api_ps *yagl_host_gles_process_init(struct yagl_process_state *ps,
+ struct yagl_api *api)
{
struct yagl_gles_api *gles_api = (struct yagl_gles_api*)api;
struct yagl_gles_api_ps *gles_api_ps;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_host_gles_process_init, NULL);
return &gles_api_ps->base;
}
-void yagl_host_glDrawArrays(GLenum mode,
+void yagl_host_glDrawArrays(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLint first,
GLsizei count)
{
gles_api_ts->driver->DrawArrays(mode, first, count);
}
-void yagl_host_glDrawElements(GLenum mode,
+void yagl_host_glDrawElements(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLsizei count,
GLenum type,
const GLvoid *indices, int32_t indices_count)
{
if (indices) {
- GLuint current_ebo = yagl_gles_bind_ebo(indices, indices_count);
+ GLuint current_ebo = yagl_gles_bind_ebo(cur_ts, indices, indices_count);
gles_api_ts->driver->DrawElements(mode, count, type, NULL);
}
}
-void yagl_host_glReadPixelsData(GLint x,
+void yagl_host_glReadPixelsData(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height,
*pixels_count = pixels_maxcount;
}
-void yagl_host_glReadPixelsOffset(GLint x,
+void yagl_host_glReadPixelsOffset(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height,
(GLvoid*)pixels);
}
-void yagl_host_glDrawArraysInstanced(GLenum mode,
+void yagl_host_glDrawArraysInstanced(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLint start,
GLsizei count,
GLsizei primcount)
gles_api_ts->driver->DrawArraysInstanced(mode, start, count, primcount);
}
-void yagl_host_glDrawElementsInstanced(GLenum mode,
+void yagl_host_glDrawElementsInstanced(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLsizei count,
GLenum type,
const void *indices, int32_t indices_count,
GLsizei primcount)
{
if (indices) {
- GLuint current_ebo = yagl_gles_bind_ebo(indices, indices_count);
+ GLuint current_ebo = yagl_gles_bind_ebo(cur_ts, indices, indices_count);
gles_api_ts->driver->DrawElementsInstanced(mode, count, type, NULL, primcount);
}
}
-void yagl_host_glDrawRangeElements(GLenum mode,
+void yagl_host_glDrawRangeElements(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLuint start,
GLuint end,
GLsizei count,
const GLvoid *indices, int32_t indices_count)
{
if (indices) {
- GLuint current_ebo = yagl_gles_bind_ebo(indices, indices_count);
+ GLuint current_ebo = yagl_gles_bind_ebo(cur_ts, indices, indices_count);
gles_api_ts->driver->DrawRangeElements(mode, start, end, count, type, NULL);
}
}
-void yagl_host_glGenVertexArrays(const GLuint *arrays, int32_t arrays_count)
+void yagl_host_glGenVertexArrays(struct yagl_thread_state *cur_ts,
+ const GLuint *arrays, int32_t arrays_count)
{
int i;
gles_api_ts->driver->GenVertexArrays(1, &global_name);
- yagl_gles_object_add(arrays[i],
+ yagl_gles_object_add(cur_ts->ps,
+ arrays[i],
global_name,
- yagl_get_ctx_id(),
+ yagl_get_ctx_id(cur_ts->ps),
&yagl_gles_vertex_array_destroy);
}
}
-void yagl_host_glBindVertexArray(GLuint array)
+void yagl_host_glBindVertexArray(struct yagl_thread_state *cur_ts,
+ GLuint array)
{
- gles_api_ts->driver->BindVertexArray(yagl_gles_object_get(array));
+ gles_api_ts->driver->BindVertexArray(yagl_gles_object_get(cur_ts, array));
}
-void yagl_host_glDisableVertexAttribArray(GLuint index)
+void yagl_host_glDisableVertexAttribArray(struct yagl_thread_state *cur_ts,
+ GLuint index)
{
gles_api_ts->driver->DisableVertexAttribArray(index);
}
-void yagl_host_glEnableVertexAttribArray(GLuint index)
+void yagl_host_glEnableVertexAttribArray(struct yagl_thread_state *cur_ts,
+ GLuint index)
{
gles_api_ts->driver->EnableVertexAttribArray(index);
}
-void yagl_host_glVertexAttribPointerData(GLuint indx,
+void yagl_host_glVertexAttribPointerData(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLint size,
GLenum type,
GLboolean normalized,
GLint first,
const GLvoid *data, int32_t data_count)
{
- GLuint current_vbo = yagl_gles_bind_array(indx, first, stride,
+ GLuint current_vbo = yagl_gles_bind_array(cur_ts, indx, first, stride,
data, data_count);
gles_api_ts->driver->VertexAttribPointer(indx, size, type, normalized,
gles_api_ts->driver->BindBuffer(GL_ARRAY_BUFFER, current_vbo);
}
-void yagl_host_glVertexAttribPointerOffset(GLuint indx,
+void yagl_host_glVertexAttribPointerOffset(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLint size,
GLenum type,
GLboolean normalized,
(const GLvoid*)offset);
}
-void yagl_host_glVertexPointerData(GLint size,
+void yagl_host_glVertexPointerData(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count)
{
- GLuint current_vbo = yagl_gles_bind_array(yagl_gles1_array_vertex,
+ GLuint current_vbo = yagl_gles_bind_array(cur_ts, yagl_gles1_array_vertex,
first, stride,
data, data_count);
gles_api_ts->driver->BindBuffer(GL_ARRAY_BUFFER, current_vbo);
}
-void yagl_host_glVertexPointerOffset(GLint size,
+void yagl_host_glVertexPointerOffset(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset)
gles_api_ts->driver->VertexPointer(size, type, stride, (const GLvoid*)offset);
}
-void yagl_host_glNormalPointerData(GLenum type,
+void yagl_host_glNormalPointerData(struct yagl_thread_state *cur_ts,
+ GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count)
{
- GLuint current_vbo = yagl_gles_bind_array(yagl_gles1_array_normal,
+ GLuint current_vbo = yagl_gles_bind_array(cur_ts, yagl_gles1_array_normal,
first, stride,
data, data_count);
gles_api_ts->driver->BindBuffer(GL_ARRAY_BUFFER, current_vbo);
}
-void yagl_host_glNormalPointerOffset(GLenum type,
+void yagl_host_glNormalPointerOffset(struct yagl_thread_state *cur_ts,
+ GLenum type,
GLsizei stride,
uintptr_t offset)
{
gles_api_ts->driver->NormalPointer(type, stride, (const GLvoid*)offset);
}
-void yagl_host_glColorPointerData(GLint size,
+void yagl_host_glColorPointerData(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count)
{
- GLuint current_vbo = yagl_gles_bind_array(yagl_gles1_array_color,
+ GLuint current_vbo = yagl_gles_bind_array(cur_ts, yagl_gles1_array_color,
first, stride,
data, data_count);
gles_api_ts->driver->BindBuffer(GL_ARRAY_BUFFER, current_vbo);
}
-void yagl_host_glColorPointerOffset(GLint size,
+void yagl_host_glColorPointerOffset(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset)
gles_api_ts->driver->ColorPointer(size, type, stride, (const GLvoid*)offset);
}
-void yagl_host_glTexCoordPointerData(GLint tex_id,
+void yagl_host_glTexCoordPointerData(struct yagl_thread_state *cur_ts,
+ GLint tex_id,
GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count)
{
- GLuint current_vbo = yagl_gles_bind_array(yagl_gles1_array_texcoord + tex_id,
+ GLuint current_vbo = yagl_gles_bind_array(cur_ts, yagl_gles1_array_texcoord + tex_id,
first, stride,
data, data_count);
gles_api_ts->driver->BindBuffer(GL_ARRAY_BUFFER, current_vbo);
}
-void yagl_host_glTexCoordPointerOffset(GLint size,
+void yagl_host_glTexCoordPointerOffset(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset)
gles_api_ts->driver->TexCoordPointer(size, type, stride, (const GLvoid*)offset);
}
-void yagl_host_glDisableClientState(GLenum array)
+void yagl_host_glDisableClientState(struct yagl_thread_state *cur_ts,
+ GLenum array)
{
gles_api_ts->driver->DisableClientState(array);
}
-void yagl_host_glEnableClientState(GLenum array)
+void yagl_host_glEnableClientState(struct yagl_thread_state *cur_ts,
+ GLenum array)
{
gles_api_ts->driver->EnableClientState(array);
}
-void yagl_host_glVertexAttribDivisor(GLuint index,
+void yagl_host_glVertexAttribDivisor(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLuint divisor)
{
gles_api_ts->driver->VertexAttribDivisor(index, divisor);
}
-void yagl_host_glVertexAttribIPointerData(GLuint index,
+void yagl_host_glVertexAttribIPointerData(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count)
{
- GLuint current_vbo = yagl_gles_bind_array(index, first, stride,
+ GLuint current_vbo = yagl_gles_bind_array(cur_ts, index, first, stride,
data, data_count);
gles_api_ts->driver->VertexAttribIPointer(index, size, type, stride, NULL);
gles_api_ts->driver->BindBuffer(GL_ARRAY_BUFFER, current_vbo);
}
-void yagl_host_glVertexAttribIPointerOffset(GLuint index,
+void yagl_host_glVertexAttribIPointerOffset(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLint size,
GLenum type,
GLsizei stride,
(const GLvoid*)offset);
}
-void yagl_host_glGenBuffers(const GLuint *buffers, int32_t buffers_count)
+void yagl_host_glGenBuffers(struct yagl_thread_state *cur_ts,
+ const GLuint *buffers, int32_t buffers_count)
{
int i;
gles_api_ts->driver->GenBuffers(1, &global_name);
- yagl_gles_object_add(buffers[i],
+ yagl_gles_object_add(cur_ts->ps,
+ buffers[i],
global_name,
0,
&yagl_gles_buffer_destroy);
}
}
-void yagl_host_glBindBuffer(GLenum target,
+void yagl_host_glBindBuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint buffer)
{
- gles_api_ts->driver->BindBuffer(target, yagl_gles_object_get(buffer));
+ gles_api_ts->driver->BindBuffer(target, yagl_gles_object_get(cur_ts, buffer));
}
-void yagl_host_glBufferData(GLenum target,
+void yagl_host_glBufferData(struct yagl_thread_state *cur_ts,
+ GLenum target,
const GLvoid *data, int32_t data_count,
GLenum usage)
{
gles_api_ts->driver->BufferData(target, data_count, data, usage);
}
-void yagl_host_glBufferSubData(GLenum target,
+void yagl_host_glBufferSubData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLsizei offset,
const GLvoid *data, int32_t data_count)
{
}
}
-void yagl_host_glBindBufferBase(GLenum target,
+void yagl_host_glBindBufferBase(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint index,
GLuint buffer)
{
gles_api_ts->driver->BindBufferBase(target, index,
- yagl_gles_object_get(buffer));
+ yagl_gles_object_get(cur_ts, buffer));
}
-void yagl_host_glBindBufferRange(GLenum target,
+void yagl_host_glBindBufferRange(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint index,
GLuint buffer,
GLint offset,
GLsizei size)
{
gles_api_ts->driver->BindBufferRange(target, index,
- yagl_gles_object_get(buffer),
+ yagl_gles_object_get(cur_ts, buffer),
offset, size);
}
-void yagl_host_glMapBuffer(GLuint buffer,
+void yagl_host_glMapBuffer(struct yagl_thread_state *cur_ts,
+ GLuint buffer,
const GLuint *ranges, int32_t ranges_count,
GLvoid *data, int32_t data_maxcount, int32_t *data_count)
{
gles_api_ts->driver->GetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING_ARB,
(GLint*)¤t_pbo);
- gles_api_ts->driver->BindBuffer(GL_PIXEL_PACK_BUFFER_ARB, yagl_gles_object_get(buffer));
+ gles_api_ts->driver->BindBuffer(GL_PIXEL_PACK_BUFFER_ARB, yagl_gles_object_get(cur_ts, buffer));
map_ptr = gles_api_ts->driver->MapBuffer(GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY);
gles_api_ts->driver->BindBuffer(GL_PIXEL_PACK_BUFFER_ARB, current_pbo);
}
-void yagl_host_glCopyBufferSubData(GLenum readTarget,
+void yagl_host_glCopyBufferSubData(struct yagl_thread_state *cur_ts,
+ GLenum readTarget,
GLenum writeTarget,
GLintptr readOffset,
GLintptr writeOffset,
readOffset, writeOffset, size);
}
-void yagl_host_glGenTextures(const GLuint *textures, int32_t textures_count)
+void yagl_host_glGenTextures(struct yagl_thread_state *cur_ts,
+ const GLuint *textures, int32_t textures_count)
{
int i;
* might be called without an active context, but
* which needs to create a texture.
*/
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(cur_ts->ps, 0);
gles_api_ts->driver->GenTextures(1, &global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(cur_ts->ps, 0);
- yagl_gles_object_add(textures[i],
+ yagl_gles_object_add(cur_ts->ps,
+ textures[i],
global_name,
0,
&yagl_gles_texture_destroy);
}
}
-void yagl_host_glBindTexture(GLenum target,
+void yagl_host_glBindTexture(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint texture)
{
- gles_api_ts->driver->BindTexture(target, yagl_gles_object_get(texture));
+ gles_api_ts->driver->BindTexture(target, yagl_gles_object_get(cur_ts, texture));
}
-void yagl_host_glActiveTexture(GLenum texture)
+void yagl_host_glActiveTexture(struct yagl_thread_state *cur_ts,
+ GLenum texture)
{
gles_api_ts->driver->ActiveTexture(texture);
}
-void yagl_host_glCopyTexImage2D(GLenum target,
+void yagl_host_glCopyTexImage2D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLenum internalformat,
GLint x,
border);
}
-void yagl_host_glCopyTexSubImage2D(GLenum target,
+void yagl_host_glCopyTexSubImage2D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
height);
}
-void yagl_host_glGetTexParameterfv(GLenum target,
+void yagl_host_glGetTexParameterfv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLfloat *param)
{
}
}
-void yagl_host_glGetTexParameteriv(GLenum target,
+void yagl_host_glGetTexParameteriv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint *param)
{
}
}
-void yagl_host_glTexImage2DData(GLenum target,
+void yagl_host_glTexImage2DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
pixels);
}
-void yagl_host_glTexImage2DOffset(GLenum target,
+void yagl_host_glTexImage2DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
(const GLvoid*)pixels);
}
-void yagl_host_glTexParameterf(GLenum target,
+void yagl_host_glTexParameterf(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLfloat param)
{
gles_api_ts->driver->TexParameterf(target, pname, param);
}
-void yagl_host_glTexParameterfv(GLenum target,
+void yagl_host_glTexParameterfv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLfloat *params, int32_t params_count)
{
(params ? tmp : NULL));
}
-void yagl_host_glTexParameteri(GLenum target,
+void yagl_host_glTexParameteri(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint param)
{
gles_api_ts->driver->TexParameteri(target, pname, param);
}
-void yagl_host_glTexParameteriv(GLenum target,
+void yagl_host_glTexParameteriv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLint *params, int32_t params_count)
{
(params ? tmp : NULL));
}
-void yagl_host_glTexSubImage2DData(GLenum target,
+void yagl_host_glTexSubImage2DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
}
}
-void yagl_host_glTexSubImage2DOffset(GLenum target,
+void yagl_host_glTexSubImage2DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
}
}
-void yagl_host_glClientActiveTexture(GLenum texture)
+void yagl_host_glClientActiveTexture(struct yagl_thread_state *cur_ts,
+ GLenum texture)
{
gles_api_ts->driver->ClientActiveTexture(texture);
}
-void yagl_host_glTexEnvi(GLenum target,
+void yagl_host_glTexEnvi(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint param)
{
gles_api_ts->driver->TexEnvi(target, pname, param);
}
-void yagl_host_glTexEnvf(GLenum target,
+void yagl_host_glTexEnvf(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLfloat param)
{
gles_api_ts->driver->TexEnvf(target, pname, param);
}
-void yagl_host_glMultiTexCoord4f(GLenum target,
+void yagl_host_glMultiTexCoord4f(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLfloat s,
GLfloat tt,
GLfloat r,
gles_api_ts->driver->MultiTexCoord4f(target, s, tt, r, q);
}
-void yagl_host_glTexEnviv(GLenum target,
+void yagl_host_glTexEnviv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLint *params, int32_t params_count)
{
gles_api_ts->driver->TexEnviv(target, pname, params);
}
-void yagl_host_glTexEnvfv(GLenum target,
+void yagl_host_glTexEnvfv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLfloat *params, int32_t params_count)
{
gles_api_ts->driver->TexEnvfv(target, pname, params);
}
-void yagl_host_glGetTexEnviv(GLenum env,
+void yagl_host_glGetTexEnviv(struct yagl_thread_state *cur_ts,
+ GLenum env,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
*params_count = params_maxcount;
}
-void yagl_host_glGetTexEnvfv(GLenum env,
+void yagl_host_glGetTexEnvfv(struct yagl_thread_state *cur_ts,
+ GLenum env,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count)
{
*params_count = params_maxcount;
}
-void yagl_host_glTexImage3DData(GLenum target,
+void yagl_host_glTexImage3DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
pixels);
}
-void yagl_host_glTexImage3DOffset(GLenum target,
+void yagl_host_glTexImage3DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
(const void*)pixels);
}
-void yagl_host_glTexSubImage3DData(GLenum target,
+void yagl_host_glTexSubImage3DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
pixels);
}
-void yagl_host_glTexSubImage3DOffset(GLenum target,
+void yagl_host_glTexSubImage3DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
(const void*)pixels);
}
-void yagl_host_glCopyTexSubImage3D(GLenum target,
+void yagl_host_glCopyTexSubImage3D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
height);
}
-void yagl_host_glGenFramebuffers(const GLuint *framebuffers, int32_t framebuffers_count)
+void yagl_host_glGenFramebuffers(struct yagl_thread_state *cur_ts,
+ const GLuint *framebuffers, int32_t framebuffers_count)
{
int i;
gles_api_ts->driver->GenFramebuffers(1, &global_name);
- yagl_gles_object_add(framebuffers[i],
+ yagl_gles_object_add(cur_ts->ps,
+ framebuffers[i],
global_name,
- yagl_get_ctx_id(),
+ yagl_get_ctx_id(cur_ts->ps),
&yagl_gles_framebuffer_destroy);
}
}
-void yagl_host_glBindFramebuffer(GLenum target,
+void yagl_host_glBindFramebuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint framebuffer)
{
gles_api_ts->driver->BindFramebuffer(target,
- yagl_gles_object_get(framebuffer));
+ yagl_gles_object_get(cur_ts, framebuffer));
}
-void yagl_host_glFramebufferTexture2D(GLenum target,
+void yagl_host_glFramebufferTexture2D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
{
gles_api_ts->driver->FramebufferTexture2D(target, attachment,
textarget,
- yagl_gles_object_get(texture),
+ yagl_gles_object_get(cur_ts, texture),
level);
}
-void yagl_host_glFramebufferRenderbuffer(GLenum target,
+void yagl_host_glFramebufferRenderbuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer)
gles_api_ts->driver->FramebufferRenderbuffer(target,
attachment,
renderbuffertarget,
- yagl_gles_object_get(renderbuffer));
+ yagl_gles_object_get(cur_ts, renderbuffer));
}
-void yagl_host_glBlitFramebuffer(GLint srcX0,
+void yagl_host_glBlitFramebuffer(struct yagl_thread_state *cur_ts,
+ GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
mask, filter);
}
-void yagl_host_glDrawBuffers(const GLenum *bufs, int32_t bufs_count)
+void yagl_host_glDrawBuffers(struct yagl_thread_state *cur_ts,
+ const GLenum *bufs, int32_t bufs_count)
{
gles_api_ts->driver->DrawBuffers(bufs_count, bufs);
}
-void yagl_host_glReadBuffer(GLenum mode)
+void yagl_host_glReadBuffer(struct yagl_thread_state *cur_ts,
+ GLenum mode)
{
gles_api_ts->driver->ReadBuffer(mode);
}
-void yagl_host_glFramebufferTexture3D(GLenum target,
+void yagl_host_glFramebufferTexture3D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
{
gles_api_ts->driver->FramebufferTexture3D(target, attachment,
textarget,
- yagl_gles_object_get(texture),
+ yagl_gles_object_get(cur_ts, texture),
level, zoffset);
}
-void yagl_host_glFramebufferTextureLayer(GLenum target,
+void yagl_host_glFramebufferTextureLayer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint layer)
{
gles_api_ts->driver->FramebufferTextureLayer(target, attachment,
- yagl_gles_object_get(texture),
+ yagl_gles_object_get(cur_ts, texture),
level, layer);
}
-void yagl_host_glClearBufferiv(GLenum buffer,
+void yagl_host_glClearBufferiv(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
const GLint *value, int32_t value_count)
{
gles_api_ts->driver->ClearBufferiv(buffer, drawbuffer, value);
}
-void yagl_host_glClearBufferuiv(GLenum buffer,
+void yagl_host_glClearBufferuiv(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
const GLuint *value, int32_t value_count)
{
gles_api_ts->driver->ClearBufferuiv(buffer, drawbuffer, value);
}
-void yagl_host_glClearBufferfi(GLenum buffer,
+void yagl_host_glClearBufferfi(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
GLfloat depth,
GLint stencil)
gles_api_ts->driver->ClearBufferfi(buffer, drawbuffer, depth, stencil);
}
-void yagl_host_glClearBufferfv(GLenum buffer,
+void yagl_host_glClearBufferfv(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
const GLfloat *value, int32_t value_count)
{
gles_api_ts->driver->ClearBufferfv(buffer, drawbuffer, value);
}
-void yagl_host_glGenRenderbuffers(const GLuint *renderbuffers, int32_t renderbuffers_count)
+void yagl_host_glGenRenderbuffers(struct yagl_thread_state *cur_ts,
+ const GLuint *renderbuffers, int32_t renderbuffers_count)
{
int i;
gles_api_ts->driver->GenRenderbuffers(1, &global_name);
- yagl_gles_object_add(renderbuffers[i],
+ yagl_gles_object_add(cur_ts->ps,
+ renderbuffers[i],
global_name,
0,
&yagl_gles_renderbuffer_destroy);
}
}
-void yagl_host_glBindRenderbuffer(GLenum target,
+void yagl_host_glBindRenderbuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint renderbuffer)
{
gles_api_ts->driver->BindRenderbuffer(target,
- yagl_gles_object_get(renderbuffer));
+ yagl_gles_object_get(cur_ts, renderbuffer));
}
-void yagl_host_glRenderbufferStorage(GLenum target,
+void yagl_host_glRenderbufferStorage(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height)
gles_api_ts->driver->RenderbufferStorage(target, internalformat, width, height);
}
-void yagl_host_glGetRenderbufferParameteriv(GLenum target,
+void yagl_host_glGetRenderbufferParameteriv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint *param)
{
}
}
-void yagl_host_glRenderbufferStorageMultisample(GLenum target,
+void yagl_host_glRenderbufferStorageMultisample(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
gles_api_ts->driver->RenderbufferStorageMultisample(target, samples, internalformat, width, height);
}
-void yagl_host_glCreateProgram(GLuint program)
+void yagl_host_glCreateProgram(struct yagl_thread_state *cur_ts,
+ GLuint program)
{
GLuint global_name = gles_api_ts->driver->CreateProgram();
- yagl_gles_object_add(program,
+ yagl_gles_object_add(cur_ts->ps,
+ program,
global_name,
0,
&yagl_gles_program_destroy);
}
-void yagl_host_glCreateShader(GLuint shader,
+void yagl_host_glCreateShader(struct yagl_thread_state *cur_ts,
+ GLuint shader,
GLenum type)
{
GLuint global_name = gles_api_ts->driver->CreateShader(type);
- yagl_gles_object_add(shader,
+ yagl_gles_object_add(cur_ts->ps,
+ shader,
global_name,
0,
&yagl_gles_shader_destroy);
}
-void yagl_host_glShaderSource(GLuint shader,
+void yagl_host_glShaderSource(struct yagl_thread_state *cur_ts,
+ GLuint shader,
const GLchar *string, int32_t string_count)
{
const GLchar *strings[1];
strings[0] = string;
lenghts[0] = string_count - 1;
- gles_api_ts->driver->ShaderSource(yagl_gles_object_get(shader),
+ gles_api_ts->driver->ShaderSource(yagl_gles_object_get(cur_ts, shader),
1,
strings,
lenghts);
}
-void yagl_host_glAttachShader(GLuint program,
+void yagl_host_glAttachShader(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint shader)
{
- gles_api_ts->driver->AttachShader(yagl_gles_object_get(program),
- yagl_gles_object_get(shader));
+ gles_api_ts->driver->AttachShader(yagl_gles_object_get(cur_ts, program),
+ yagl_gles_object_get(cur_ts, shader));
}
-void yagl_host_glDetachShader(GLuint program,
+void yagl_host_glDetachShader(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint shader)
{
- gles_api_ts->driver->DetachShader(yagl_gles_object_get(program),
- yagl_gles_object_get(shader));
+ gles_api_ts->driver->DetachShader(yagl_gles_object_get(cur_ts, program),
+ yagl_gles_object_get(cur_ts, shader));
}
-void yagl_host_glCompileShader(GLuint shader)
+void yagl_host_glCompileShader(struct yagl_thread_state *cur_ts,
+ GLuint shader)
{
#ifndef CONFIG_DARWIN
- gles_api_ts->driver->CompileShader(yagl_gles_object_get(shader));
+ gles_api_ts->driver->CompileShader(yagl_gles_object_get(cur_ts, shader));
#else
GLint tmp = 0;
YAGL_LOG_FUNC_SET(glCompileShader);
- gles_api_ts->driver->CompileShader(yagl_gles_object_get(shader));
+ gles_api_ts->driver->CompileShader(yagl_gles_object_get(cur_ts, shader));
- gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_COMPILE_STATUS, &tmp);
+ gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(cur_ts, shader), GL_COMPILE_STATUS, &tmp);
if (tmp == GL_FALSE) {
char *buff;
char *substring;
const char texture_lookup_define[] = "#define TextureLookup texture2D";
tmp = 0;
- gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_INFO_LOG_LENGTH, &tmp);
+ gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(cur_ts, shader), GL_INFO_LOG_LENGTH, &tmp);
buff = g_malloc0(tmp);
- gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(shader), tmp, NULL, buff);
+ gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(cur_ts, shader), tmp, NULL, buff);
if (gles_api_ts->driver->gl_version < yagl_gl_3_2 ||
strstr(buff, textue2d_err) == NULL) {
YAGL_LOG_ERROR("Unable to compile shader %s", buff);
g_free(buff);
tmp = 0;
- gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_SHADER_SOURCE_LENGTH, &tmp);
+ gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(cur_ts, shader), GL_SHADER_SOURCE_LENGTH, &tmp);
buff = g_malloc0(tmp);
- gles_api_ts->driver->GetShaderSource(yagl_gles_object_get(shader), tmp, NULL, buff);
+ gles_api_ts->driver->GetShaderSource(yagl_gles_object_get(cur_ts, shader), tmp, NULL, buff);
YAGL_LOG_DEBUG("Shader Source: \n%s", buff);
substring = strstr(buff, texture_lookup_define);
strings[0] = buff;
lenghts[0] = tmp - 1;
- gles_api_ts->driver->ShaderSource(yagl_gles_object_get(shader),
+ gles_api_ts->driver->ShaderSource(yagl_gles_object_get(cur_ts, shader),
1,
strings,
lenghts);
- gles_api_ts->driver->CompileShader(yagl_gles_object_get(shader));
- gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_COMPILE_STATUS, &tmp);
+ gles_api_ts->driver->CompileShader(yagl_gles_object_get(cur_ts, shader));
+ gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(cur_ts, shader), GL_COMPILE_STATUS, &tmp);
if (!tmp) {
YAGL_LOG_ERROR("Unable to compile the patched shader source: \n%s", buff);
g_free(buff);
tmp = 0;
- gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader), GL_INFO_LOG_LENGTH, &tmp);
+ gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(cur_ts, shader), GL_INFO_LOG_LENGTH, &tmp);
buff = g_malloc0(tmp);
- gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(shader), tmp, NULL, buff);
+ gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(cur_ts, shader), tmp, NULL, buff);
YAGL_LOG_ERROR("Cause of compilation failure: %s", buff);
}
}
#endif
}
-void yagl_host_glBindAttribLocation(GLuint program,
+void yagl_host_glBindAttribLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint index,
const GLchar *name, int32_t name_count)
{
- gles_api_ts->driver->BindAttribLocation(yagl_gles_object_get(program),
+ gles_api_ts->driver->BindAttribLocation(yagl_gles_object_get(cur_ts, program),
index,
name);
}
-void yagl_host_glGetActiveAttrib(GLuint program,
+void yagl_host_glGetActiveAttrib(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint index,
GLint *size,
GLenum *type,
{
GLsizei tmp = -1;
- gles_api_ts->driver->GetActiveAttrib(yagl_gles_object_get(program),
+ gles_api_ts->driver->GetActiveAttrib(yagl_gles_object_get(cur_ts, program),
index,
name_maxcount,
&tmp,
}
}
-void yagl_host_glGetActiveUniform(GLuint program,
+void yagl_host_glGetActiveUniform(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint index,
GLint *size,
GLenum *type,
{
GLsizei tmp = -1;
- gles_api_ts->driver->GetActiveUniform(yagl_gles_object_get(program),
+ gles_api_ts->driver->GetActiveUniform(yagl_gles_object_get(cur_ts, program),
index,
name_maxcount,
&tmp,
}
}
-int yagl_host_glGetAttribLocation(GLuint program,
+int yagl_host_glGetAttribLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *name, int32_t name_count)
{
- return gles_api_ts->driver->GetAttribLocation(yagl_gles_object_get(program),
+ return gles_api_ts->driver->GetAttribLocation(yagl_gles_object_get(cur_ts, program),
name);
}
-void yagl_host_glGetProgramiv(GLuint program,
+void yagl_host_glGetProgramiv(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLenum pname,
GLint *param)
{
- gles_api_ts->driver->GetProgramiv(yagl_gles_object_get(program),
+ gles_api_ts->driver->GetProgramiv(yagl_gles_object_get(cur_ts, program),
pname,
param);
}
-GLboolean yagl_host_glGetProgramInfoLog(GLuint program,
+GLboolean yagl_host_glGetProgramInfoLog(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLchar *infolog, int32_t infolog_maxcount, int32_t *infolog_count)
{
GLsizei tmp = -1;
- gles_api_ts->driver->GetProgramInfoLog(yagl_gles_object_get(program),
+ gles_api_ts->driver->GetProgramInfoLog(yagl_gles_object_get(cur_ts, program),
infolog_maxcount,
&tmp,
infolog);
}
}
-void yagl_host_glGetShaderiv(GLuint shader,
+void yagl_host_glGetShaderiv(struct yagl_thread_state *cur_ts,
+ GLuint shader,
GLenum pname,
GLint *param)
{
- gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(shader),
+ gles_api_ts->driver->GetShaderiv(yagl_gles_object_get(cur_ts, shader),
pname,
param);
}
-GLboolean yagl_host_glGetShaderInfoLog(GLuint shader,
+GLboolean yagl_host_glGetShaderInfoLog(struct yagl_thread_state *cur_ts,
+ GLuint shader,
GLchar *infolog, int32_t infolog_maxcount, int32_t *infolog_count)
{
GLsizei tmp = -1;
- gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(shader),
+ gles_api_ts->driver->GetShaderInfoLog(yagl_gles_object_get(cur_ts, shader),
infolog_maxcount,
&tmp,
infolog);
}
}
-void yagl_host_glGetUniformfv(GLboolean tl,
+void yagl_host_glGetUniformfv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
GLuint program,
uint32_t location,
GLfloat *params, int32_t params_maxcount, int32_t *params_count)
{
GLenum type;
- GLuint global_name = yagl_gles_object_get(program);
+ GLuint global_name = yagl_gles_object_get(cur_ts, program);
GLint actual_location = yagl_gles_api_ps_translate_location(gles_api_ts->ps,
tl,
location);
- if (!yagl_gles_program_get_uniform_type(global_name,
+ if (!yagl_gles_program_get_uniform_type(cur_ts,
+ global_name,
actual_location,
&type)) {
return;
params);
}
-void yagl_host_glGetUniformiv(GLboolean tl,
+void yagl_host_glGetUniformiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
GLuint program,
uint32_t location,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
GLenum type;
- GLuint global_name = yagl_gles_object_get(program);
+ GLuint global_name = yagl_gles_object_get(cur_ts, program);
GLint actual_location = yagl_gles_api_ps_translate_location(gles_api_ts->ps,
tl,
location);
- if (!yagl_gles_program_get_uniform_type(global_name,
+ if (!yagl_gles_program_get_uniform_type(cur_ts,
+ global_name,
actual_location,
&type)) {
return;
params);
}
-int yagl_host_glGetUniformLocation(GLuint program,
+int yagl_host_glGetUniformLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *name, int32_t name_count)
{
- return gles_api_ts->driver->GetUniformLocation(yagl_gles_object_get(program),
+ return gles_api_ts->driver->GetUniformLocation(yagl_gles_object_get(cur_ts, program),
name);
}
-void yagl_host_glGetVertexAttribfv(GLuint index,
+void yagl_host_glGetVertexAttribfv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count)
{
gles_api_ts->driver->GetVertexAttribfv(index, pname, params);
}
-void yagl_host_glGetVertexAttribiv(GLuint index,
+void yagl_host_glGetVertexAttribiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
gles_api_ts->driver->GetVertexAttribiv(index, pname, params);
}
-void yagl_host_glLinkProgram(GLuint program,
+void yagl_host_glLinkProgram(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
- GLuint obj = yagl_gles_object_get(program);
+ GLuint obj = yagl_gles_object_get(cur_ts, program);
gles_api_ts->driver->LinkProgram(obj);
}
}
-void yagl_host_glUniform1f(GLboolean tl,
+void yagl_host_glUniform1f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x)
{
yagl_gles_api_ps_translate_location(gles_api_ts->ps, tl, location), x);
}
-void yagl_host_glUniform1fv(GLboolean tl,
+void yagl_host_glUniform1fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count)
{
v_count, v);
}
-void yagl_host_glUniform1i(GLboolean tl,
+void yagl_host_glUniform1i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x)
{
x);
}
-void yagl_host_glUniform1iv(GLboolean tl,
+void yagl_host_glUniform1iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count)
{
v_count, v);
}
-void yagl_host_glUniform2f(GLboolean tl,
+void yagl_host_glUniform2f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x,
GLfloat y)
x, y);
}
-void yagl_host_glUniform2fv(GLboolean tl,
+void yagl_host_glUniform2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count)
{
(v_count / 2), v);
}
-void yagl_host_glUniform2i(GLboolean tl,
+void yagl_host_glUniform2i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x,
GLint y)
x, y);
}
-void yagl_host_glUniform2iv(GLboolean tl,
+void yagl_host_glUniform2iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count)
{
(v_count / 2), v);
}
-void yagl_host_glUniform3f(GLboolean tl,
+void yagl_host_glUniform3f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x,
GLfloat y,
x, y, z);
}
-void yagl_host_glUniform3fv(GLboolean tl,
+void yagl_host_glUniform3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count)
{
(v_count / 3), v);
}
-void yagl_host_glUniform3i(GLboolean tl,
+void yagl_host_glUniform3i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x,
GLint y,
x, y, z);
}
-void yagl_host_glUniform3iv(GLboolean tl,
+void yagl_host_glUniform3iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count)
{
(v_count / 3), v);
}
-void yagl_host_glUniform4f(GLboolean tl,
+void yagl_host_glUniform4f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x,
GLfloat y,
x, y, z, w);
}
-void yagl_host_glUniform4fv(GLboolean tl,
+void yagl_host_glUniform4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count)
{
(v_count / 4), v);
}
-void yagl_host_glUniform4i(GLboolean tl,
+void yagl_host_glUniform4i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x,
GLint y,
x, y, z, w);
}
-void yagl_host_glUniform4iv(GLboolean tl,
+void yagl_host_glUniform4iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count)
{
(v_count / 4), v);
}
-void yagl_host_glUniformMatrix2fv(GLboolean tl,
+void yagl_host_glUniformMatrix2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (2 * 2), transpose, value);
}
-void yagl_host_glUniformMatrix3fv(GLboolean tl,
+void yagl_host_glUniformMatrix3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (3 * 3), transpose, value);
}
-void yagl_host_glUniformMatrix4fv(GLboolean tl,
+void yagl_host_glUniformMatrix4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (4 * 4), transpose, value);
}
-void yagl_host_glUseProgram(GLuint program)
+void yagl_host_glUseProgram(struct yagl_thread_state *cur_ts,
+ GLuint program)
{
- gles_api_ts->driver->UseProgram(yagl_gles_object_get(program));
+ gles_api_ts->driver->UseProgram(yagl_gles_object_get(cur_ts, program));
}
-void yagl_host_glValidateProgram(GLuint program)
+void yagl_host_glValidateProgram(struct yagl_thread_state *cur_ts,
+ GLuint program)
{
- gles_api_ts->driver->ValidateProgram(yagl_gles_object_get(program));
+ gles_api_ts->driver->ValidateProgram(yagl_gles_object_get(cur_ts, program));
}
-void yagl_host_glVertexAttrib1f(GLuint indx,
+void yagl_host_glVertexAttrib1f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x)
{
gles_api_ts->driver->VertexAttrib1f(indx, x);
}
-void yagl_host_glVertexAttrib1fv(GLuint indx,
+void yagl_host_glVertexAttrib1fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count)
{
gles_api_ts->driver->VertexAttrib1fv(indx, values);
}
-void yagl_host_glVertexAttrib2f(GLuint indx,
+void yagl_host_glVertexAttrib2f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x,
GLfloat y)
{
gles_api_ts->driver->VertexAttrib2f(indx, x, y);
}
-void yagl_host_glVertexAttrib2fv(GLuint indx,
+void yagl_host_glVertexAttrib2fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count)
{
gles_api_ts->driver->VertexAttrib2fv(indx, values);
}
-void yagl_host_glVertexAttrib3f(GLuint indx,
+void yagl_host_glVertexAttrib3f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x,
GLfloat y,
GLfloat z)
gles_api_ts->driver->VertexAttrib3f(indx, x, y, z);
}
-void yagl_host_glVertexAttrib3fv(GLuint indx,
+void yagl_host_glVertexAttrib3fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count)
{
gles_api_ts->driver->VertexAttrib3fv(indx, values);
}
-void yagl_host_glVertexAttrib4f(GLuint indx,
+void yagl_host_glVertexAttrib4f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x,
GLfloat y,
GLfloat z,
gles_api_ts->driver->VertexAttrib4f(indx, x, y, z, w);
}
-void yagl_host_glVertexAttrib4fv(GLuint indx,
+void yagl_host_glVertexAttrib4fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count)
{
gles_api_ts->driver->VertexAttrib4fv(indx, values);
}
-void yagl_host_glGetActiveUniformsiv(GLuint program,
+void yagl_host_glGetActiveUniformsiv(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLuint *uniformIndices, int32_t uniformIndices_count,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
GL_UNIFORM_MATRIX_STRIDE,
GL_UNIFORM_IS_ROW_MAJOR
};
- GLuint obj = yagl_gles_object_get(program);
+ GLuint obj = yagl_gles_object_get(cur_ts, program);
int i, num_pnames = sizeof(pnames)/sizeof(pnames[0]);
if (params_maxcount != (uniformIndices_count * num_pnames)) {
*params_count = uniformIndices_count * num_pnames;
}
-void yagl_host_glGetUniformIndices(GLuint program,
+void yagl_host_glGetUniformIndices(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *uniformNames, int32_t uniformNames_count,
GLuint *uniformIndices, int32_t uniformIndices_maxcount, int32_t *uniformIndices_count)
{
YAGL_LOG_FUNC_SET(glGetUniformIndices);
- obj = yagl_gles_object_get(program);
+ obj = yagl_gles_object_get(cur_ts, program);
gles_api_ts->driver->GetProgramiv(obj,
GL_ACTIVE_UNIFORM_MAX_LENGTH,
g_free(uniform_name);
}
-GLuint yagl_host_glGetUniformBlockIndex(GLuint program,
+GLuint yagl_host_glGetUniformBlockIndex(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *uniformBlockName, int32_t uniformBlockName_count)
{
- return gles_api_ts->driver->GetUniformBlockIndex(yagl_gles_object_get(program),
+ return gles_api_ts->driver->GetUniformBlockIndex(yagl_gles_object_get(cur_ts, program),
uniformBlockName);
}
-void yagl_host_glUniformBlockBinding(GLuint program,
+void yagl_host_glUniformBlockBinding(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint uniformBlockIndex,
GLuint uniformBlockBinding)
{
- gles_api_ts->driver->UniformBlockBinding(yagl_gles_object_get(program),
+ gles_api_ts->driver->UniformBlockBinding(yagl_gles_object_get(cur_ts, program),
uniformBlockIndex,
uniformBlockBinding);
}
-void yagl_host_glGetActiveUniformBlockName(GLuint program,
+void yagl_host_glGetActiveUniformBlockName(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint uniformBlockIndex,
GLchar *uniformBlockName, int32_t uniformBlockName_maxcount, int32_t *uniformBlockName_count)
{
GLsizei tmp = -1;
- gles_api_ts->driver->GetActiveUniformBlockName(yagl_gles_object_get(program),
+ gles_api_ts->driver->GetActiveUniformBlockName(yagl_gles_object_get(cur_ts, program),
uniformBlockIndex,
uniformBlockName_maxcount,
&tmp,
}
}
-void yagl_host_glGetActiveUniformBlockiv(GLuint program,
+void yagl_host_glGetActiveUniformBlockiv(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint uniformBlockIndex,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count)
return;
}
- obj = yagl_gles_object_get(program);
+ obj = yagl_gles_object_get(cur_ts, program);
switch (pname) {
case 0:
}
}
-void yagl_host_glGetVertexAttribIiv(GLuint index,
+void yagl_host_glGetVertexAttribIiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
gles_api_ts->driver->GetVertexAttribIiv(index, pname, params);
}
-void yagl_host_glGetVertexAttribIuiv(GLuint index,
+void yagl_host_glGetVertexAttribIuiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLuint *params, int32_t params_maxcount, int32_t *params_count)
{
gles_api_ts->driver->GetVertexAttribIuiv(index, pname, params);
}
-void yagl_host_glVertexAttribI4i(GLuint index,
+void yagl_host_glVertexAttribI4i(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLint x,
GLint y,
GLint z,
gles_api_ts->driver->VertexAttribI4i(index, x, y, z, w);
}
-void yagl_host_glVertexAttribI4ui(GLuint index,
+void yagl_host_glVertexAttribI4ui(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLuint x,
GLuint y,
GLuint z,
gles_api_ts->driver->VertexAttribI4ui(index, x, y, z, w);
}
-void yagl_host_glVertexAttribI4iv(GLuint index,
+void yagl_host_glVertexAttribI4iv(struct yagl_thread_state *cur_ts,
+ GLuint index,
const GLint *v, int32_t v_count)
{
gles_api_ts->driver->VertexAttribI4iv(index, v);
}
-void yagl_host_glVertexAttribI4uiv(GLuint index,
+void yagl_host_glVertexAttribI4uiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
const GLuint *v, int32_t v_count)
{
gles_api_ts->driver->VertexAttribI4uiv(index, v);
}
-void yagl_host_glGetUniformuiv(GLboolean tl,
+void yagl_host_glGetUniformuiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
GLuint program,
uint32_t location,
GLuint *params, int32_t params_maxcount, int32_t *params_count)
{
GLenum type;
- GLuint global_name = yagl_gles_object_get(program);
+ GLuint global_name = yagl_gles_object_get(cur_ts, program);
GLint actual_location = yagl_gles_api_ps_translate_location(gles_api_ts->ps,
tl,
location);
- if (!yagl_gles_program_get_uniform_type(global_name,
+ if (!yagl_gles_program_get_uniform_type(cur_ts,
+ global_name,
actual_location,
&type)) {
return;
params);
}
-void yagl_host_glUniform1ui(GLboolean tl,
+void yagl_host_glUniform1ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0)
{
v0);
}
-void yagl_host_glUniform2ui(GLboolean tl,
+void yagl_host_glUniform2ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0,
GLuint v1)
v0, v1);
}
-void yagl_host_glUniform3ui(GLboolean tl,
+void yagl_host_glUniform3ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0,
GLuint v1,
v0, v1, v2);
}
-void yagl_host_glUniform4ui(GLboolean tl,
+void yagl_host_glUniform4ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0,
GLuint v1,
v0, v1, v2, v3);
}
-void yagl_host_glUniform1uiv(GLboolean tl,
+void yagl_host_glUniform1uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count)
{
v_count, v);
}
-void yagl_host_glUniform2uiv(GLboolean tl,
+void yagl_host_glUniform2uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count)
{
(v_count / 2), v);
}
-void yagl_host_glUniform3uiv(GLboolean tl,
+void yagl_host_glUniform3uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count)
{
(v_count / 3), v);
}
-void yagl_host_glUniform4uiv(GLboolean tl,
+void yagl_host_glUniform4uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count)
{
(v_count / 4), v);
}
-void yagl_host_glUniformMatrix2x3fv(GLboolean tl,
+void yagl_host_glUniformMatrix2x3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (2 * 3), transpose, value);
}
-void yagl_host_glUniformMatrix2x4fv(GLboolean tl,
+void yagl_host_glUniformMatrix2x4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (2 * 4), transpose, value);
}
-void yagl_host_glUniformMatrix3x2fv(GLboolean tl,
+void yagl_host_glUniformMatrix3x2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (3 * 2), transpose, value);
}
-void yagl_host_glUniformMatrix3x4fv(GLboolean tl,
+void yagl_host_glUniformMatrix3x4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (3 * 4), transpose, value);
}
-void yagl_host_glUniformMatrix4x2fv(GLboolean tl,
+void yagl_host_glUniformMatrix4x2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (4 * 2), transpose, value);
}
-void yagl_host_glUniformMatrix4x3fv(GLboolean tl,
+void yagl_host_glUniformMatrix4x3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count)
value_count / (4 * 3), transpose, value);
}
-int yagl_host_glGetFragDataLocation(GLuint program,
+int yagl_host_glGetFragDataLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *name, int32_t name_count)
{
- return gles_api_ts->driver->GetFragDataLocation(yagl_gles_object_get(program),
+ return gles_api_ts->driver->GetFragDataLocation(yagl_gles_object_get(cur_ts, program),
name);
}
-void yagl_host_glGetIntegerv(GLenum pname,
+void yagl_host_glGetIntegerv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count)
{
gles_api_ts->driver->GetIntegerv(pname, params);
*params_count = params_maxcount;
}
-void yagl_host_glGetFloatv(GLenum pname,
+void yagl_host_glGetFloatv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count)
{
gles_api_ts->driver->GetFloatv(pname, params);
*params_count = params_maxcount;
}
-void yagl_host_glGetString(GLenum name,
+void yagl_host_glGetString(struct yagl_thread_state *cur_ts,
+ GLenum name,
GLchar *str, int32_t str_maxcount, int32_t *str_count)
{
const char *tmp;
}
}
-GLboolean yagl_host_glIsEnabled(GLenum cap)
+GLboolean yagl_host_glIsEnabled(struct yagl_thread_state *cur_ts,
+ GLenum cap)
{
return gles_api_ts->driver->IsEnabled(cap);
}
-void yagl_host_glGenTransformFeedbacks(const GLuint *ids, int32_t ids_count)
+void yagl_host_glGenTransformFeedbacks(struct yagl_thread_state *cur_ts,
+ const GLuint *ids, int32_t ids_count)
{
int i;
gles_api_ts->driver->GenTransformFeedbacks(1, &global_name);
- yagl_gles_object_add(ids[i],
+ yagl_gles_object_add(cur_ts->ps,
+ ids[i],
global_name,
- yagl_get_ctx_id(),
+ yagl_get_ctx_id(cur_ts->ps),
&yagl_gles_transform_feedback_destroy);
}
}
-void yagl_host_glBindTransformFeedback(GLenum target,
+void yagl_host_glBindTransformFeedback(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint id)
{
gles_api_ts->driver->BindTransformFeedback(target,
- yagl_gles_object_get(id));
+ yagl_gles_object_get(cur_ts, id));
}
-void yagl_host_glBeginTransformFeedback(GLenum primitiveMode)
+void yagl_host_glBeginTransformFeedback(struct yagl_thread_state *cur_ts,
+ GLenum primitiveMode)
{
gles_api_ts->driver->BeginTransformFeedback(primitiveMode);
}
-void yagl_host_glEndTransformFeedback(void)
+void yagl_host_glEndTransformFeedback(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->EndTransformFeedback();
}
-void yagl_host_glPauseTransformFeedback(void)
+void yagl_host_glPauseTransformFeedback(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->PauseTransformFeedback();
}
-void yagl_host_glResumeTransformFeedback(void)
+void yagl_host_glResumeTransformFeedback(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->ResumeTransformFeedback();
}
-void yagl_host_glTransformFeedbackVaryings(GLuint program,
+void yagl_host_glTransformFeedbackVaryings(struct yagl_thread_state *cur_ts,
+ struct yagl_transport *t,
+ GLuint program,
const GLchar *varyings, int32_t varyings_count,
GLenum bufferMode)
{
const char **strings;
int32_t num_strings = 0;
- strings = yagl_transport_get_out_string_array(varyings,
+ strings = yagl_transport_get_out_string_array(t, varyings,
varyings_count,
&num_strings);
- gles_api_ts->driver->TransformFeedbackVaryings(yagl_gles_object_get(program),
+ gles_api_ts->driver->TransformFeedbackVaryings(yagl_gles_object_get(cur_ts, program),
num_strings,
strings,
bufferMode);
g_free(strings);
}
-void yagl_host_glGetTransformFeedbackVaryings(GLuint program,
+void yagl_host_glGetTransformFeedbackVaryings(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLsizei *sizes, int32_t sizes_maxcount, int32_t *sizes_count,
GLenum *types, int32_t types_maxcount, int32_t *types_count)
{
- GLuint obj = yagl_gles_object_get(program);
+ GLuint obj = yagl_gles_object_get(cur_ts, program);
int32_t i;
if (sizes_maxcount != types_maxcount) {
*sizes_count = *types_count = sizes_maxcount;
}
-void yagl_host_glGenQueries(const GLuint *ids, int32_t ids_count)
+void yagl_host_glGenQueries(struct yagl_thread_state *cur_ts,
+ const GLuint *ids, int32_t ids_count)
{
int i;
gles_api_ts->driver->GenQueries(1, &global_name);
- yagl_gles_object_add(ids[i],
+ yagl_gles_object_add(cur_ts->ps,
+ ids[i],
global_name,
- yagl_get_ctx_id(),
+ yagl_get_ctx_id(cur_ts->ps),
&yagl_gles_query_destroy);
}
}
-void yagl_host_glBeginQuery(GLenum target,
+void yagl_host_glBeginQuery(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint id)
{
- gles_api_ts->driver->BeginQuery(target, yagl_gles_object_get(id));
+ gles_api_ts->driver->BeginQuery(target, yagl_gles_object_get(cur_ts, id));
}
-void yagl_host_glEndQuery(GLenum target)
+void yagl_host_glEndQuery(struct yagl_thread_state *cur_ts,
+ GLenum target)
{
gles_api_ts->driver->EndQuery(target);
}
-GLboolean yagl_host_glGetQueryObjectuiv(GLuint id,
+GLboolean yagl_host_glGetQueryObjectuiv(struct yagl_thread_state *cur_ts,
+ GLuint id,
GLenum pname, GLuint *result)
{
- GLuint obj = yagl_gles_object_get(id);
+ GLuint obj = yagl_gles_object_get(cur_ts, id);
GLuint tmp = 0;
if (pname == GL_QUERY_RESULT_AVAILABLE) {
return tmp;
}
-void yagl_host_glGenSamplers(const GLuint *samplers, int32_t samplers_count)
+void yagl_host_glGenSamplers(struct yagl_thread_state *cur_ts,
+ const GLuint *samplers, int32_t samplers_count)
{
int i;
gles_api_ts->driver->GenSamplers(1, &global_name);
- yagl_gles_object_add(samplers[i],
+ yagl_gles_object_add(cur_ts->ps,
+ samplers[i],
global_name,
0,
&yagl_gles_sampler_destroy);
}
}
-void yagl_host_glBindSampler(GLuint unit,
+void yagl_host_glBindSampler(struct yagl_thread_state *cur_ts,
+ GLuint unit,
GLuint sampler)
{
- gles_api_ts->driver->BindSampler(unit, yagl_gles_object_get(sampler));
+ gles_api_ts->driver->BindSampler(unit, yagl_gles_object_get(cur_ts, sampler));
}
-void yagl_host_glSamplerParameteri(GLuint sampler,
+void yagl_host_glSamplerParameteri(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
GLint param)
{
- gles_api_ts->driver->SamplerParameteri(yagl_gles_object_get(sampler), pname, param);
+ gles_api_ts->driver->SamplerParameteri(yagl_gles_object_get(cur_ts, sampler), pname, param);
}
-void yagl_host_glSamplerParameteriv(GLuint sampler,
+void yagl_host_glSamplerParameteriv(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
const GLint *param, int32_t param_count)
{
- gles_api_ts->driver->SamplerParameteriv(yagl_gles_object_get(sampler), pname, param);
+ gles_api_ts->driver->SamplerParameteriv(yagl_gles_object_get(cur_ts, sampler), pname, param);
}
-void yagl_host_glSamplerParameterf(GLuint sampler,
+void yagl_host_glSamplerParameterf(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
GLfloat param)
{
- gles_api_ts->driver->SamplerParameterf(yagl_gles_object_get(sampler), pname, param);
+ gles_api_ts->driver->SamplerParameterf(yagl_gles_object_get(cur_ts, sampler), pname, param);
}
-void yagl_host_glSamplerParameterfv(GLuint sampler,
+void yagl_host_glSamplerParameterfv(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
const GLfloat *param, int32_t param_count)
{
- gles_api_ts->driver->SamplerParameterfv(yagl_gles_object_get(sampler), pname, param);
+ gles_api_ts->driver->SamplerParameterfv(yagl_gles_object_get(cur_ts, sampler), pname, param);
}
-void yagl_host_glDeleteObjects(const GLuint *objects, int32_t objects_count)
+void yagl_host_glDeleteObjects(struct yagl_thread_state *cur_ts,
+ const GLuint *objects, int32_t objects_count)
{
int i;
}
}
-void yagl_host_glBlendEquation(GLenum mode)
+void yagl_host_glBlendEquation(struct yagl_thread_state *cur_ts,
+ GLenum mode)
{
gles_api_ts->driver->BlendEquation(mode);
}
-void yagl_host_glBlendEquationSeparate(GLenum modeRGB,
+void yagl_host_glBlendEquationSeparate(struct yagl_thread_state *cur_ts,
+ GLenum modeRGB,
GLenum modeAlpha)
{
gles_api_ts->driver->BlendEquationSeparate(modeRGB, modeAlpha);
}
-void yagl_host_glBlendFunc(GLenum sfactor,
+void yagl_host_glBlendFunc(struct yagl_thread_state *cur_ts,
+ GLenum sfactor,
GLenum dfactor)
{
gles_api_ts->driver->BlendFunc(sfactor, dfactor);
}
-void yagl_host_glBlendFuncSeparate(GLenum srcRGB,
+void yagl_host_glBlendFuncSeparate(struct yagl_thread_state *cur_ts,
+ GLenum srcRGB,
GLenum dstRGB,
GLenum srcAlpha,
GLenum dstAlpha)
dstAlpha);
}
-void yagl_host_glBlendColor(GLclampf red,
+void yagl_host_glBlendColor(struct yagl_thread_state *cur_ts,
+ GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha)
gles_api_ts->driver->BlendColor(red, green, blue, alpha);
}
-void yagl_host_glClear(GLbitfield mask)
+void yagl_host_glClear(struct yagl_thread_state *cur_ts,
+ GLbitfield mask)
{
gles_api_ts->driver->Clear(mask);
}
-void yagl_host_glClearColor(GLclampf red,
+void yagl_host_glClearColor(struct yagl_thread_state *cur_ts,
+ GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha)
gles_api_ts->driver->ClearColor(red, green, blue, alpha);
}
-void yagl_host_glClearDepthf(GLclampf depth)
+void yagl_host_glClearDepthf(struct yagl_thread_state *cur_ts,
+ GLclampf depth)
{
gles_api_ts->driver->ClearDepth(depth);
}
-void yagl_host_glClearStencil(GLint s)
+void yagl_host_glClearStencil(struct yagl_thread_state *cur_ts,
+ GLint s)
{
gles_api_ts->driver->ClearStencil(s);
}
-void yagl_host_glColorMask(GLboolean red,
+void yagl_host_glColorMask(struct yagl_thread_state *cur_ts,
+ GLboolean red,
GLboolean green,
GLboolean blue,
GLboolean alpha)
gles_api_ts->driver->ColorMask(red, green, blue, alpha);
}
-void yagl_host_glCullFace(GLenum mode)
+void yagl_host_glCullFace(struct yagl_thread_state *cur_ts,
+ GLenum mode)
{
gles_api_ts->driver->CullFace(mode);
}
-void yagl_host_glDepthFunc(GLenum func)
+void yagl_host_glDepthFunc(struct yagl_thread_state *cur_ts,
+ GLenum func)
{
gles_api_ts->driver->DepthFunc(func);
}
-void yagl_host_glDepthMask(GLboolean flag)
+void yagl_host_glDepthMask(struct yagl_thread_state *cur_ts,
+ GLboolean flag)
{
gles_api_ts->driver->DepthMask(flag);
}
-void yagl_host_glDepthRangef(GLclampf zNear,
+void yagl_host_glDepthRangef(struct yagl_thread_state *cur_ts,
+ GLclampf zNear,
GLclampf zFar)
{
gles_api_ts->driver->DepthRange(zNear, zFar);
}
-void yagl_host_glEnable(GLenum cap)
+void yagl_host_glEnable(struct yagl_thread_state *cur_ts,
+ GLenum cap)
{
gles_api_ts->driver->Enable(cap);
}
-void yagl_host_glDisable(GLenum cap)
+void yagl_host_glDisable(struct yagl_thread_state *cur_ts,
+ GLenum cap)
{
gles_api_ts->driver->Disable(cap);
}
-void yagl_host_glFlush(void)
+void yagl_host_glFlush(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->Flush();
}
-void yagl_host_glFrontFace(GLenum mode)
+void yagl_host_glFrontFace(struct yagl_thread_state *cur_ts,
+ GLenum mode)
{
gles_api_ts->driver->FrontFace(mode);
}
-void yagl_host_glGenerateMipmap(GLenum target)
+void yagl_host_glGenerateMipmap(struct yagl_thread_state *cur_ts,
+ GLenum target)
{
gles_api_ts->driver->GenerateMipmap(target);
}
-void yagl_host_glHint(GLenum target,
+void yagl_host_glHint(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum mode)
{
gles_api_ts->driver->Hint(target, mode);
}
-void yagl_host_glLineWidth(GLfloat width)
+void yagl_host_glLineWidth(struct yagl_thread_state *cur_ts,
+ GLfloat width)
{
gles_api_ts->driver->LineWidth(width);
}
-void yagl_host_glPixelStorei(GLenum pname,
+void yagl_host_glPixelStorei(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLint param)
{
gles_api_ts->driver->PixelStorei(pname, param);
}
-void yagl_host_glPolygonOffset(GLfloat factor,
+void yagl_host_glPolygonOffset(struct yagl_thread_state *cur_ts,
+ GLfloat factor,
GLfloat units)
{
gles_api_ts->driver->PolygonOffset(factor, units);
}
-void yagl_host_glScissor(GLint x,
+void yagl_host_glScissor(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height)
gles_api_ts->driver->Scissor(x, y, width, height);
}
-void yagl_host_glStencilFunc(GLenum func,
+void yagl_host_glStencilFunc(struct yagl_thread_state *cur_ts,
+ GLenum func,
GLint ref,
GLuint mask)
{
gles_api_ts->driver->StencilFunc(func, ref, mask);
}
-void yagl_host_glStencilMask(GLuint mask)
+void yagl_host_glStencilMask(struct yagl_thread_state *cur_ts,
+ GLuint mask)
{
gles_api_ts->driver->StencilMask(mask);
}
-void yagl_host_glStencilOp(GLenum fail,
+void yagl_host_glStencilOp(struct yagl_thread_state *cur_ts,
+ GLenum fail,
GLenum zfail,
GLenum zpass)
{
gles_api_ts->driver->StencilOp(fail, zfail, zpass);
}
-void yagl_host_glSampleCoverage(GLclampf value,
+void yagl_host_glSampleCoverage(struct yagl_thread_state *cur_ts,
+ GLclampf value,
GLboolean invert)
{
gles_api_ts->driver->SampleCoverage(value, invert);
}
-void yagl_host_glViewport(GLint x,
+void yagl_host_glViewport(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height)
gles_api_ts->driver->Viewport(x, y, width, height);
}
-void yagl_host_glStencilFuncSeparate(GLenum face,
+void yagl_host_glStencilFuncSeparate(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum func,
GLint ref,
GLuint mask)
gles_api_ts->driver->StencilFuncSeparate(face, func, ref, mask);
}
-void yagl_host_glStencilMaskSeparate(GLenum face,
+void yagl_host_glStencilMaskSeparate(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLuint mask)
{
gles_api_ts->driver->StencilMaskSeparate(face, mask);
}
-void yagl_host_glStencilOpSeparate(GLenum face,
+void yagl_host_glStencilOpSeparate(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum fail,
GLenum zfail,
GLenum zpass)
gles_api_ts->driver->StencilOpSeparate(face, fail, zfail, zpass);
}
-void yagl_host_glPointSize(GLfloat size)
+void yagl_host_glPointSize(struct yagl_thread_state *cur_ts,
+ GLfloat size)
{
gles_api_ts->driver->PointSize(size);
}
-void yagl_host_glAlphaFunc(GLenum func,
+void yagl_host_glAlphaFunc(struct yagl_thread_state *cur_ts,
+ GLenum func,
GLclampf ref)
{
gles_api_ts->driver->AlphaFunc(func, ref);
}
-void yagl_host_glMatrixMode(GLenum mode)
+void yagl_host_glMatrixMode(struct yagl_thread_state *cur_ts,
+ GLenum mode)
{
gles_api_ts->driver->MatrixMode(mode);
}
-void yagl_host_glLoadIdentity(void)
+void yagl_host_glLoadIdentity(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->LoadIdentity();
}
-void yagl_host_glPopMatrix(void)
+void yagl_host_glPopMatrix(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->PopMatrix();
}
-void yagl_host_glPushMatrix(void)
+void yagl_host_glPushMatrix(struct yagl_thread_state *cur_ts)
{
gles_api_ts->driver->PushMatrix();
}
-void yagl_host_glRotatef(GLfloat angle,
+void yagl_host_glRotatef(struct yagl_thread_state *cur_ts,
+ GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z)
gles_api_ts->driver->Rotatef(angle, x, y, z);
}
-void yagl_host_glTranslatef(GLfloat x,
+void yagl_host_glTranslatef(struct yagl_thread_state *cur_ts,
+ GLfloat x,
GLfloat y,
GLfloat z)
{
gles_api_ts->driver->Translatef(x, y, z);
}
-void yagl_host_glScalef(GLfloat x,
+void yagl_host_glScalef(struct yagl_thread_state *cur_ts,
+ GLfloat x,
GLfloat y,
GLfloat z)
{
gles_api_ts->driver->Scalef(x, y, z);
}
-void yagl_host_glOrthof(GLfloat left,
+void yagl_host_glOrthof(struct yagl_thread_state *cur_ts,
+ GLfloat left,
GLfloat right,
GLfloat bottom,
GLfloat top,
gles_api_ts->driver->Ortho(left, right, bottom, top, zNear, zFar);
}
-void yagl_host_glColor4f(GLfloat red,
+void yagl_host_glColor4f(struct yagl_thread_state *cur_ts,
+ GLfloat red,
GLfloat green,
GLfloat blue,
GLfloat alpha)
gles_api_ts->driver->Color4f(red, green, blue, alpha);
}
-void yagl_host_glColor4ub(GLubyte red,
+void yagl_host_glColor4ub(struct yagl_thread_state *cur_ts,
+ GLubyte red,
GLubyte green,
GLubyte blue,
GLubyte alpha)
gles_api_ts->driver->Color4ub(red, green, blue, alpha);
}
-void yagl_host_glNormal3f(GLfloat nx,
+void yagl_host_glNormal3f(struct yagl_thread_state *cur_ts,
+ GLfloat nx,
GLfloat ny,
GLfloat nz)
{
gles_api_ts->driver->Normal3f(nx, ny, nz);
}
-void yagl_host_glPointParameterf(GLenum pname,
+void yagl_host_glPointParameterf(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat param)
{
gles_api_ts->driver->PointParameterf(pname, param);
}
-void yagl_host_glPointParameterfv(GLenum pname,
+void yagl_host_glPointParameterfv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
const GLfloat *params, int32_t params_count)
{
gles_api_ts->driver->PointParameterfv(pname, params);
}
-void yagl_host_glFogf(GLenum pname,
+void yagl_host_glFogf(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat param)
{
gles_api_ts->driver->Fogf(pname, param);
}
-void yagl_host_glFogfv(GLenum pname,
+void yagl_host_glFogfv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
const GLfloat *params, int32_t params_count)
{
gles_api_ts->driver->Fogfv(pname, params);
}
-void yagl_host_glFrustumf(GLfloat left,
+void yagl_host_glFrustumf(struct yagl_thread_state *cur_ts,
+ GLfloat left,
GLfloat right,
GLfloat bottom,
GLfloat top,
gles_api_ts->driver->Frustum(left, right, bottom, top, zNear, zFar);
}
-void yagl_host_glLightf(GLenum light,
+void yagl_host_glLightf(struct yagl_thread_state *cur_ts,
+ GLenum light,
GLenum pname,
GLfloat param)
{
gles_api_ts->driver->Lightf(light, pname, param);
}
-void yagl_host_glLightfv(GLenum light,
+void yagl_host_glLightfv(struct yagl_thread_state *cur_ts,
+ GLenum light,
GLenum pname,
const GLfloat *params, int32_t params_count)
{
gles_api_ts->driver->Lightfv(light, pname, params);
}
-void yagl_host_glGetLightfv(GLenum light,
+void yagl_host_glGetLightfv(struct yagl_thread_state *cur_ts,
+ GLenum light,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count)
{
*params_count = params_maxcount;
}
-void yagl_host_glLightModelf(GLenum pname,
+void yagl_host_glLightModelf(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat param)
{
gles_api_ts->driver->LightModelf(pname, param);
}
-void yagl_host_glLightModelfv(GLenum pname,
+void yagl_host_glLightModelfv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
const GLfloat *params, int32_t params_count)
{
gles_api_ts->driver->LightModelfv(pname, params);
}
-void yagl_host_glMaterialf(GLenum face,
+void yagl_host_glMaterialf(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum pname,
GLfloat param)
{
gles_api_ts->driver->Materialf(face, pname, param);
}
-void yagl_host_glMaterialfv(GLenum face,
+void yagl_host_glMaterialfv(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum pname,
const GLfloat *params, int32_t params_count)
{
gles_api_ts->driver->Materialfv(face, pname, params);
}
-void yagl_host_glGetMaterialfv(GLenum face,
+void yagl_host_glGetMaterialfv(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count)
{
*params_count = params_maxcount;
}
-void yagl_host_glShadeModel(GLenum mode)
+void yagl_host_glShadeModel(struct yagl_thread_state *cur_ts,
+ GLenum mode)
{
gles_api_ts->driver->ShadeModel(mode);
}
-void yagl_host_glLogicOp(GLenum opcode)
+void yagl_host_glLogicOp(struct yagl_thread_state *cur_ts,
+ GLenum opcode)
{
gles_api_ts->driver->LogicOp(opcode);
}
-void yagl_host_glMultMatrixf(const GLfloat *m, int32_t m_count)
+void yagl_host_glMultMatrixf(struct yagl_thread_state *cur_ts,
+ const GLfloat *m, int32_t m_count)
{
gles_api_ts->driver->MultMatrixf(m);
}
-void yagl_host_glLoadMatrixf(const GLfloat *m, int32_t m_count)
+void yagl_host_glLoadMatrixf(struct yagl_thread_state *cur_ts,
+ const GLfloat *m, int32_t m_count)
{
gles_api_ts->driver->LoadMatrixf(m);
}
-void yagl_host_glClipPlanef(GLenum plane,
+void yagl_host_glClipPlanef(struct yagl_thread_state *cur_ts,
+ GLenum plane,
const GLfloat *equation, int32_t equation_count)
{
yagl_GLdouble equationd[4];
}
}
-void yagl_host_glGetClipPlanef(GLenum pname,
+void yagl_host_glGetClipPlanef(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat *eqn, int32_t eqn_maxcount, int32_t *eqn_count)
{
yagl_GLdouble eqnd[4];
}
}
-void yagl_host_glUpdateOffscreenImageYAGL(GLuint texture,
+void yagl_host_glUpdateOffscreenImageYAGL(struct yagl_thread_state *cur_ts,
+ GLuint texture,
uint32_t width,
uint32_t height,
uint32_t bpp,
gles_api_ts->driver->PixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0);
gles_api_ts->driver->BindTexture(GL_TEXTURE_2D,
- yagl_gles_object_get(texture));
+ yagl_gles_object_get(cur_ts, texture));
gles_api_ts->driver->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
gles_api_ts->driver->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
gles_api_ts->driver->BindTexture(GL_TEXTURE_2D, cur_tex);
}
-void yagl_host_glGenUniformLocationYAGL(uint32_t location,
+void yagl_host_glGenUniformLocationYAGL(struct yagl_thread_state *cur_ts,
+ uint32_t location,
GLuint program,
const GLchar *name, int32_t name_count)
{
yagl_gles_api_ps_add_location(gles_api_ts->ps,
location,
- gles_api_ts->driver->GetUniformLocation(yagl_gles_object_get(program), name));
+ gles_api_ts->driver->GetUniformLocation(yagl_gles_object_get(cur_ts, program), name));
}
-void yagl_host_glDeleteUniformLocationsYAGL(const uint32_t *locations, int32_t locations_count)
+void yagl_host_glDeleteUniformLocationsYAGL(struct yagl_thread_state *cur_ts,
+ const uint32_t *locations, int32_t locations_count)
{
int i;
#include "yagl_api.h"
#include <GL/gl.h>
-struct yagl_api_ps *yagl_host_gles_process_init(struct yagl_api *api);
+struct yagl_api_ps *yagl_host_gles_process_init(struct yagl_process_state *ps, struct yagl_api *api);
-void yagl_host_glDrawArrays(GLenum mode,
+void yagl_host_glDrawArrays(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLint first,
GLsizei count);
-void yagl_host_glDrawElements(GLenum mode,
+void yagl_host_glDrawElements(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLsizei count,
GLenum type,
const GLvoid *indices, int32_t indices_count);
-void yagl_host_glReadPixelsData(GLint x,
+void yagl_host_glReadPixelsData(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
GLvoid *pixels, int32_t pixels_maxcount, int32_t *pixels_count);
-void yagl_host_glReadPixelsOffset(GLint x,
+void yagl_host_glReadPixelsOffset(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
uintptr_t pixels);
-void yagl_host_glDrawArraysInstanced(GLenum mode,
+void yagl_host_glDrawArraysInstanced(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLint start,
GLsizei count,
GLsizei primcount);
-void yagl_host_glDrawElementsInstanced(GLenum mode,
+void yagl_host_glDrawElementsInstanced(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLsizei count,
GLenum type,
const void *indices, int32_t indices_count,
GLsizei primcount);
-void yagl_host_glDrawRangeElements(GLenum mode,
+void yagl_host_glDrawRangeElements(struct yagl_thread_state *cur_ts,
+ GLenum mode,
GLuint start,
GLuint end,
GLsizei count,
GLenum type,
const GLvoid *indices, int32_t indices_count);
-void yagl_host_glGenVertexArrays(const GLuint *arrays, int32_t arrays_count);
-void yagl_host_glBindVertexArray(GLuint array);
-void yagl_host_glDisableVertexAttribArray(GLuint index);
-void yagl_host_glEnableVertexAttribArray(GLuint index);
-void yagl_host_glVertexAttribPointerData(GLuint indx,
+void yagl_host_glGenVertexArrays(struct yagl_thread_state *cur_ts,
+ const GLuint *arrays, int32_t arrays_count);
+void yagl_host_glBindVertexArray(struct yagl_thread_state *cur_ts,
+ GLuint array);
+void yagl_host_glDisableVertexAttribArray(struct yagl_thread_state *cur_ts,
+ GLuint index);
+void yagl_host_glEnableVertexAttribArray(struct yagl_thread_state *cur_ts,
+ GLuint index);
+void yagl_host_glVertexAttribPointerData(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLint size,
GLenum type,
GLboolean normalized,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count);
-void yagl_host_glVertexAttribPointerOffset(GLuint indx,
+void yagl_host_glVertexAttribPointerOffset(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLint size,
GLenum type,
GLboolean normalized,
GLsizei stride,
uintptr_t offset);
-void yagl_host_glVertexPointerData(GLint size,
+void yagl_host_glVertexPointerData(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count);
-void yagl_host_glVertexPointerOffset(GLint size,
+void yagl_host_glVertexPointerOffset(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset);
-void yagl_host_glNormalPointerData(GLenum type,
+void yagl_host_glNormalPointerData(struct yagl_thread_state *cur_ts,
+ GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count);
-void yagl_host_glNormalPointerOffset(GLenum type,
+void yagl_host_glNormalPointerOffset(struct yagl_thread_state *cur_ts,
+ GLenum type,
GLsizei stride,
uintptr_t offset);
-void yagl_host_glColorPointerData(GLint size,
+void yagl_host_glColorPointerData(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count);
-void yagl_host_glColorPointerOffset(GLint size,
+void yagl_host_glColorPointerOffset(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset);
-void yagl_host_glTexCoordPointerData(GLint tex_id,
+void yagl_host_glTexCoordPointerData(struct yagl_thread_state *cur_ts,
+ GLint tex_id,
GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count);
-void yagl_host_glTexCoordPointerOffset(GLint size,
+void yagl_host_glTexCoordPointerOffset(struct yagl_thread_state *cur_ts,
+ GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset);
-void yagl_host_glDisableClientState(GLenum array);
-void yagl_host_glEnableClientState(GLenum array);
-void yagl_host_glVertexAttribDivisor(GLuint index,
+void yagl_host_glDisableClientState(struct yagl_thread_state *cur_ts,
+ GLenum array);
+void yagl_host_glEnableClientState(struct yagl_thread_state *cur_ts,
+ GLenum array);
+void yagl_host_glVertexAttribDivisor(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLuint divisor);
-void yagl_host_glVertexAttribIPointerData(GLuint index,
+void yagl_host_glVertexAttribIPointerData(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLint size,
GLenum type,
GLsizei stride,
GLint first,
const GLvoid *data, int32_t data_count);
-void yagl_host_glVertexAttribIPointerOffset(GLuint index,
+void yagl_host_glVertexAttribIPointerOffset(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLint size,
GLenum type,
GLsizei stride,
uintptr_t offset);
-void yagl_host_glGenBuffers(const GLuint *buffers, int32_t buffers_count);
-void yagl_host_glBindBuffer(GLenum target,
+void yagl_host_glGenBuffers(struct yagl_thread_state *cur_ts,
+ const GLuint *buffers, int32_t buffers_count);
+void yagl_host_glBindBuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint buffer);
-void yagl_host_glBufferData(GLenum target,
+void yagl_host_glBufferData(struct yagl_thread_state *cur_ts,
+ GLenum target,
const GLvoid *data, int32_t data_count,
GLenum usage);
-void yagl_host_glBufferSubData(GLenum target,
+void yagl_host_glBufferSubData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLsizei offset,
const GLvoid *data, int32_t data_count);
-void yagl_host_glBindBufferBase(GLenum target,
+void yagl_host_glBindBufferBase(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint index,
GLuint buffer);
-void yagl_host_glBindBufferRange(GLenum target,
+void yagl_host_glBindBufferRange(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint index,
GLuint buffer,
GLint offset,
GLsizei size);
-void yagl_host_glMapBuffer(GLuint buffer,
+void yagl_host_glMapBuffer(struct yagl_thread_state *cur_ts,
+ GLuint buffer,
const GLuint *ranges, int32_t ranges_count,
GLvoid *data, int32_t data_maxcount, int32_t *data_count);
-void yagl_host_glCopyBufferSubData(GLenum readTarget,
+void yagl_host_glCopyBufferSubData(struct yagl_thread_state *cur_ts,
+ GLenum readTarget,
GLenum writeTarget,
GLintptr readOffset,
GLintptr writeOffset,
GLsizei size);
-void yagl_host_glGenTextures(const GLuint *textures, int32_t textures_count);
-void yagl_host_glBindTexture(GLenum target,
+void yagl_host_glGenTextures(struct yagl_thread_state *cur_ts,
+ const GLuint *textures, int32_t textures_count);
+void yagl_host_glBindTexture(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint texture);
-void yagl_host_glActiveTexture(GLenum texture);
-void yagl_host_glCopyTexImage2D(GLenum target,
+void yagl_host_glActiveTexture(struct yagl_thread_state *cur_ts,
+ GLenum texture);
+void yagl_host_glCopyTexImage2D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLenum internalformat,
GLint x,
GLsizei width,
GLsizei height,
GLint border);
-void yagl_host_glCopyTexSubImage2D(GLenum target,
+void yagl_host_glCopyTexSubImage2D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint y,
GLsizei width,
GLsizei height);
-void yagl_host_glGetTexParameterfv(GLenum target,
+void yagl_host_glGetTexParameterfv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLfloat *param);
-void yagl_host_glGetTexParameteriv(GLenum target,
+void yagl_host_glGetTexParameteriv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint *param);
-void yagl_host_glTexImage2DData(GLenum target,
+void yagl_host_glTexImage2DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLenum format,
GLenum type,
const GLvoid *pixels, int32_t pixels_count);
-void yagl_host_glTexImage2DOffset(GLenum target,
+void yagl_host_glTexImage2DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLenum format,
GLenum type,
uintptr_t pixels);
-void yagl_host_glTexParameterf(GLenum target,
+void yagl_host_glTexParameterf(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLfloat param);
-void yagl_host_glTexParameterfv(GLenum target,
+void yagl_host_glTexParameterfv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glTexParameteri(GLenum target,
+void yagl_host_glTexParameteri(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint param);
-void yagl_host_glTexParameteriv(GLenum target,
+void yagl_host_glTexParameteriv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLint *params, int32_t params_count);
-void yagl_host_glTexSubImage2DData(GLenum target,
+void yagl_host_glTexSubImage2DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
const GLvoid *pixels, int32_t pixels_count);
-void yagl_host_glTexSubImage2DOffset(GLenum target,
+void yagl_host_glTexSubImage2DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
uintptr_t pixels);
-void yagl_host_glClientActiveTexture(GLenum texture);
-void yagl_host_glTexEnvi(GLenum target,
+void yagl_host_glClientActiveTexture(struct yagl_thread_state *cur_ts,
+ GLenum texture);
+void yagl_host_glTexEnvi(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint param);
-void yagl_host_glTexEnvf(GLenum target,
+void yagl_host_glTexEnvf(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLfloat param);
-void yagl_host_glMultiTexCoord4f(GLenum target,
+void yagl_host_glMultiTexCoord4f(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLfloat s,
GLfloat tt,
GLfloat r,
GLfloat q);
-void yagl_host_glTexEnviv(GLenum target,
+void yagl_host_glTexEnviv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLint *params, int32_t params_count);
-void yagl_host_glTexEnvfv(GLenum target,
+void yagl_host_glTexEnvfv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glGetTexEnviv(GLenum env,
+void yagl_host_glGetTexEnviv(struct yagl_thread_state *cur_ts,
+ GLenum env,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetTexEnvfv(GLenum env,
+void yagl_host_glGetTexEnvfv(struct yagl_thread_state *cur_ts,
+ GLenum env,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glTexImage3DData(GLenum target,
+void yagl_host_glTexImage3DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLenum format,
GLenum type,
const void *pixels, int32_t pixels_count);
-void yagl_host_glTexImage3DOffset(GLenum target,
+void yagl_host_glTexImage3DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint internalformat,
GLsizei width,
GLenum format,
GLenum type,
uintptr_t pixels);
-void yagl_host_glTexSubImage3DData(GLenum target,
+void yagl_host_glTexSubImage3DData(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
const void *pixels, int32_t pixels_count);
-void yagl_host_glTexSubImage3DOffset(GLenum target,
+void yagl_host_glTexSubImage3DOffset(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLenum format,
GLenum type,
uintptr_t pixels);
-void yagl_host_glCopyTexSubImage3D(GLenum target,
+void yagl_host_glCopyTexSubImage3D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint y,
GLsizei width,
GLsizei height);
-void yagl_host_glGenFramebuffers(const GLuint *framebuffers, int32_t framebuffers_count);
-void yagl_host_glBindFramebuffer(GLenum target,
+void yagl_host_glGenFramebuffers(struct yagl_thread_state *cur_ts,
+ const GLuint *framebuffers, int32_t framebuffers_count);
+void yagl_host_glBindFramebuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint framebuffer);
-void yagl_host_glFramebufferTexture2D(GLenum target,
+void yagl_host_glFramebufferTexture2D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level);
-void yagl_host_glFramebufferRenderbuffer(GLenum target,
+void yagl_host_glFramebufferRenderbuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
-void yagl_host_glBlitFramebuffer(GLint srcX0,
+void yagl_host_glBlitFramebuffer(struct yagl_thread_state *cur_ts,
+ GLint srcX0,
GLint srcY0,
GLint srcX1,
GLint srcY1,
GLint dstY1,
GLbitfield mask,
GLenum filter);
-void yagl_host_glDrawBuffers(const GLenum *bufs, int32_t bufs_count);
-void yagl_host_glReadBuffer(GLenum mode);
-void yagl_host_glFramebufferTexture3D(GLenum target,
+void yagl_host_glDrawBuffers(struct yagl_thread_state *cur_ts,
+ const GLenum *bufs, int32_t bufs_count);
+void yagl_host_glReadBuffer(struct yagl_thread_state *cur_ts,
+ GLenum mode);
+void yagl_host_glFramebufferTexture3D(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level,
GLint zoffset);
-void yagl_host_glFramebufferTextureLayer(GLenum target,
+void yagl_host_glFramebufferTextureLayer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum attachment,
GLuint texture,
GLint level,
GLint layer);
-void yagl_host_glClearBufferiv(GLenum buffer,
+void yagl_host_glClearBufferiv(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
const GLint *value, int32_t value_count);
-void yagl_host_glClearBufferuiv(GLenum buffer,
+void yagl_host_glClearBufferuiv(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
const GLuint *value, int32_t value_count);
-void yagl_host_glClearBufferfi(GLenum buffer,
+void yagl_host_glClearBufferfi(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
GLfloat depth,
GLint stencil);
-void yagl_host_glClearBufferfv(GLenum buffer,
+void yagl_host_glClearBufferfv(struct yagl_thread_state *cur_ts,
+ GLenum buffer,
GLint drawbuffer,
const GLfloat *value, int32_t value_count);
-void yagl_host_glGenRenderbuffers(const GLuint *renderbuffers, int32_t renderbuffers_count);
-void yagl_host_glBindRenderbuffer(GLenum target,
+void yagl_host_glGenRenderbuffers(struct yagl_thread_state *cur_ts,
+ const GLuint *renderbuffers, int32_t renderbuffers_count);
+void yagl_host_glBindRenderbuffer(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint renderbuffer);
-void yagl_host_glRenderbufferStorage(GLenum target,
+void yagl_host_glRenderbufferStorage(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum internalformat,
GLsizei width,
GLsizei height);
-void yagl_host_glGetRenderbufferParameteriv(GLenum target,
+void yagl_host_glGetRenderbufferParameteriv(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum pname,
GLint *param);
-void yagl_host_glRenderbufferStorageMultisample(GLenum target,
+void yagl_host_glRenderbufferStorageMultisample(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLsizei samples,
GLenum internalformat,
GLsizei width,
GLsizei height);
-void yagl_host_glCreateProgram(GLuint program);
-void yagl_host_glCreateShader(GLuint shader,
+void yagl_host_glCreateProgram(struct yagl_thread_state *cur_ts,
+ GLuint program);
+void yagl_host_glCreateShader(struct yagl_thread_state *cur_ts,
+ GLuint shader,
GLenum type);
-void yagl_host_glShaderSource(GLuint shader,
+void yagl_host_glShaderSource(struct yagl_thread_state *cur_ts,
+ GLuint shader,
const GLchar *string, int32_t string_count);
-void yagl_host_glAttachShader(GLuint program,
+void yagl_host_glAttachShader(struct yagl_thread_state *cur_ts,
+ GLuint program,
+ GLuint shader);
+void yagl_host_glDetachShader(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint shader);
-void yagl_host_glDetachShader(GLuint program,
+void yagl_host_glCompileShader(struct yagl_thread_state *cur_ts,
GLuint shader);
-void yagl_host_glCompileShader(GLuint shader);
-void yagl_host_glBindAttribLocation(GLuint program,
+void yagl_host_glBindAttribLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint index,
const GLchar *name, int32_t name_count);
-void yagl_host_glGetActiveAttrib(GLuint program,
+void yagl_host_glGetActiveAttrib(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint index,
GLint *size,
GLenum *type,
GLchar *name, int32_t name_maxcount, int32_t *name_count);
-void yagl_host_glGetActiveUniform(GLuint program,
+void yagl_host_glGetActiveUniform(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint index,
GLint *size,
GLenum *type,
GLchar *name, int32_t name_maxcount, int32_t *name_count);
-int yagl_host_glGetAttribLocation(GLuint program,
+int yagl_host_glGetAttribLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *name, int32_t name_count);
-void yagl_host_glGetProgramiv(GLuint program,
+void yagl_host_glGetProgramiv(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLenum pname,
GLint *param);
-GLboolean yagl_host_glGetProgramInfoLog(GLuint program,
+GLboolean yagl_host_glGetProgramInfoLog(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLchar *infolog, int32_t infolog_maxcount, int32_t *infolog_count);
-void yagl_host_glGetShaderiv(GLuint shader,
+void yagl_host_glGetShaderiv(struct yagl_thread_state *cur_ts,
+ GLuint shader,
GLenum pname,
GLint *param);
-GLboolean yagl_host_glGetShaderInfoLog(GLuint shader,
+GLboolean yagl_host_glGetShaderInfoLog(struct yagl_thread_state *cur_ts,
+ GLuint shader,
GLchar *infolog, int32_t infolog_maxcount, int32_t *infolog_count);
-void yagl_host_glGetUniformfv(GLboolean tl,
+void yagl_host_glGetUniformfv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
GLuint program,
uint32_t location,
GLfloat *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetUniformiv(GLboolean tl,
+void yagl_host_glGetUniformiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
GLuint program,
uint32_t location,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-int yagl_host_glGetUniformLocation(GLuint program,
+int yagl_host_glGetUniformLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *name, int32_t name_count);
-void yagl_host_glGetVertexAttribfv(GLuint index,
+void yagl_host_glGetVertexAttribfv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetVertexAttribiv(GLuint index,
+void yagl_host_glGetVertexAttribiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glLinkProgram(GLuint program,
+void yagl_host_glLinkProgram(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glUniform1f(GLboolean tl,
+void yagl_host_glUniform1f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x);
-void yagl_host_glUniform1fv(GLboolean tl,
+void yagl_host_glUniform1fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count);
-void yagl_host_glUniform1i(GLboolean tl,
+void yagl_host_glUniform1i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x);
-void yagl_host_glUniform1iv(GLboolean tl,
+void yagl_host_glUniform1iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count);
-void yagl_host_glUniform2f(GLboolean tl,
+void yagl_host_glUniform2f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x,
GLfloat y);
-void yagl_host_glUniform2fv(GLboolean tl,
+void yagl_host_glUniform2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count);
-void yagl_host_glUniform2i(GLboolean tl,
+void yagl_host_glUniform2i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x,
GLint y);
-void yagl_host_glUniform2iv(GLboolean tl,
+void yagl_host_glUniform2iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count);
-void yagl_host_glUniform3f(GLboolean tl,
+void yagl_host_glUniform3f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x,
GLfloat y,
GLfloat z);
-void yagl_host_glUniform3fv(GLboolean tl,
+void yagl_host_glUniform3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count);
-void yagl_host_glUniform3i(GLboolean tl,
+void yagl_host_glUniform3i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x,
GLint y,
GLint z);
-void yagl_host_glUniform3iv(GLboolean tl,
+void yagl_host_glUniform3iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count);
-void yagl_host_glUniform4f(GLboolean tl,
+void yagl_host_glUniform4f(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w);
-void yagl_host_glUniform4fv(GLboolean tl,
+void yagl_host_glUniform4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLfloat *v, int32_t v_count);
-void yagl_host_glUniform4i(GLboolean tl,
+void yagl_host_glUniform4i(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLint x,
GLint y,
GLint z,
GLint w);
-void yagl_host_glUniform4iv(GLboolean tl,
+void yagl_host_glUniform4iv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLint *v, int32_t v_count);
-void yagl_host_glUniformMatrix2fv(GLboolean tl,
+void yagl_host_glUniformMatrix2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix3fv(GLboolean tl,
+void yagl_host_glUniformMatrix3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix4fv(GLboolean tl,
+void yagl_host_glUniformMatrix4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUseProgram(GLuint program);
-void yagl_host_glValidateProgram(GLuint program);
-void yagl_host_glVertexAttrib1f(GLuint indx,
+void yagl_host_glUseProgram(struct yagl_thread_state *cur_ts,
+ GLuint program);
+void yagl_host_glValidateProgram(struct yagl_thread_state *cur_ts,
+ GLuint program);
+void yagl_host_glVertexAttrib1f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x);
-void yagl_host_glVertexAttrib1fv(GLuint indx,
+void yagl_host_glVertexAttrib1fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count);
-void yagl_host_glVertexAttrib2f(GLuint indx,
+void yagl_host_glVertexAttrib2f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x,
GLfloat y);
-void yagl_host_glVertexAttrib2fv(GLuint indx,
+void yagl_host_glVertexAttrib2fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count);
-void yagl_host_glVertexAttrib3f(GLuint indx,
+void yagl_host_glVertexAttrib3f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x,
GLfloat y,
GLfloat z);
-void yagl_host_glVertexAttrib3fv(GLuint indx,
+void yagl_host_glVertexAttrib3fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count);
-void yagl_host_glVertexAttrib4f(GLuint indx,
+void yagl_host_glVertexAttrib4f(struct yagl_thread_state *cur_ts,
+ GLuint indx,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w);
-void yagl_host_glVertexAttrib4fv(GLuint indx,
+void yagl_host_glVertexAttrib4fv(struct yagl_thread_state *cur_ts,
+ GLuint indx,
const GLfloat *values, int32_t values_count);
-void yagl_host_glGetActiveUniformsiv(GLuint program,
+void yagl_host_glGetActiveUniformsiv(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLuint *uniformIndices, int32_t uniformIndices_count,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetUniformIndices(GLuint program,
+void yagl_host_glGetUniformIndices(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *uniformNames, int32_t uniformNames_count,
GLuint *uniformIndices, int32_t uniformIndices_maxcount, int32_t *uniformIndices_count);
-GLuint yagl_host_glGetUniformBlockIndex(GLuint program,
+GLuint yagl_host_glGetUniformBlockIndex(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *uniformBlockName, int32_t uniformBlockName_count);
-void yagl_host_glUniformBlockBinding(GLuint program,
+void yagl_host_glUniformBlockBinding(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint uniformBlockIndex,
GLuint uniformBlockBinding);
-void yagl_host_glGetActiveUniformBlockName(GLuint program,
+void yagl_host_glGetActiveUniformBlockName(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint uniformBlockIndex,
GLchar *uniformBlockName, int32_t uniformBlockName_maxcount, int32_t *uniformBlockName_count);
-void yagl_host_glGetActiveUniformBlockiv(GLuint program,
+void yagl_host_glGetActiveUniformBlockiv(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLuint uniformBlockIndex,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetVertexAttribIiv(GLuint index,
+void yagl_host_glGetVertexAttribIiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetVertexAttribIuiv(GLuint index,
+void yagl_host_glGetVertexAttribIuiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLenum pname,
GLuint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glVertexAttribI4i(GLuint index,
+void yagl_host_glVertexAttribI4i(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLint x,
GLint y,
GLint z,
GLint w);
-void yagl_host_glVertexAttribI4ui(GLuint index,
+void yagl_host_glVertexAttribI4ui(struct yagl_thread_state *cur_ts,
+ GLuint index,
GLuint x,
GLuint y,
GLuint z,
GLuint w);
-void yagl_host_glVertexAttribI4iv(GLuint index,
+void yagl_host_glVertexAttribI4iv(struct yagl_thread_state *cur_ts,
+ GLuint index,
const GLint *v, int32_t v_count);
-void yagl_host_glVertexAttribI4uiv(GLuint index,
+void yagl_host_glVertexAttribI4uiv(struct yagl_thread_state *cur_ts,
+ GLuint index,
const GLuint *v, int32_t v_count);
-void yagl_host_glGetUniformuiv(GLboolean tl,
+void yagl_host_glGetUniformuiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
GLuint program,
uint32_t location,
GLuint *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glUniform1ui(GLboolean tl,
+void yagl_host_glUniform1ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0);
-void yagl_host_glUniform2ui(GLboolean tl,
+void yagl_host_glUniform2ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0,
GLuint v1);
-void yagl_host_glUniform3ui(GLboolean tl,
+void yagl_host_glUniform3ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0,
GLuint v1,
GLuint v2);
-void yagl_host_glUniform4ui(GLboolean tl,
+void yagl_host_glUniform4ui(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLuint v0,
GLuint v1,
GLuint v2,
GLuint v3);
-void yagl_host_glUniform1uiv(GLboolean tl,
+void yagl_host_glUniform1uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count);
-void yagl_host_glUniform2uiv(GLboolean tl,
+void yagl_host_glUniform2uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count);
-void yagl_host_glUniform3uiv(GLboolean tl,
+void yagl_host_glUniform3uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count);
-void yagl_host_glUniform4uiv(GLboolean tl,
+void yagl_host_glUniform4uiv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
const GLuint *v, int32_t v_count);
-void yagl_host_glUniformMatrix2x3fv(GLboolean tl,
+void yagl_host_glUniformMatrix2x3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix2x4fv(GLboolean tl,
+void yagl_host_glUniformMatrix2x4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix3x2fv(GLboolean tl,
+void yagl_host_glUniformMatrix3x2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix3x4fv(GLboolean tl,
+void yagl_host_glUniformMatrix3x4fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix4x2fv(GLboolean tl,
+void yagl_host_glUniformMatrix4x2fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glUniformMatrix4x3fv(GLboolean tl,
+void yagl_host_glUniformMatrix4x3fv(struct yagl_thread_state *cur_ts,
+ GLboolean tl,
uint32_t location,
GLboolean transpose,
const GLfloat *value, int32_t value_count);
-void yagl_host_glGetIntegerv(GLenum pname,
+void yagl_host_glGetIntegerv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLint *params, int32_t params_maxcount, int32_t *params_count);
-int yagl_host_glGetFragDataLocation(GLuint program,
+int yagl_host_glGetFragDataLocation(struct yagl_thread_state *cur_ts,
+ GLuint program,
const GLchar *name, int32_t name_count);
-void yagl_host_glGetFloatv(GLenum pname,
+void yagl_host_glGetFloatv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glGetString(GLenum name,
+void yagl_host_glGetString(struct yagl_thread_state *cur_ts,
+ GLenum name,
GLchar *str, int32_t str_maxcount, int32_t *str_count);
-GLboolean yagl_host_glIsEnabled(GLenum cap);
-void yagl_host_glGenTransformFeedbacks(const GLuint *ids, int32_t ids_count);
-void yagl_host_glBindTransformFeedback(GLenum target,
+GLboolean yagl_host_glIsEnabled(struct yagl_thread_state *cur_ts, GLenum cap);
+void yagl_host_glGenTransformFeedbacks(struct yagl_thread_state *cur_ts,
+ const GLuint *ids, int32_t ids_count);
+void yagl_host_glBindTransformFeedback(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint id);
-void yagl_host_glBeginTransformFeedback(GLenum primitiveMode);
-void yagl_host_glEndTransformFeedback(void);
-void yagl_host_glPauseTransformFeedback(void);
-void yagl_host_glResumeTransformFeedback(void);
-void yagl_host_glTransformFeedbackVaryings(GLuint program,
+void yagl_host_glBeginTransformFeedback(struct yagl_thread_state *cur_ts,
+ GLenum primitiveMode);
+void yagl_host_glEndTransformFeedback(struct yagl_thread_state *cur_ts);
+void yagl_host_glPauseTransformFeedback(struct yagl_thread_state *cur_ts);
+void yagl_host_glResumeTransformFeedback(struct yagl_thread_state *cur_ts);
+void yagl_host_glTransformFeedbackVaryings(struct yagl_thread_state *cur_ts,
+ struct yagl_transport *t,
+ GLuint program,
const GLchar *varyings, int32_t varyings_count,
GLenum bufferMode);
-void yagl_host_glGetTransformFeedbackVaryings(GLuint program,
+void yagl_host_glGetTransformFeedbackVaryings(struct yagl_thread_state *cur_ts,
+ GLuint program,
GLsizei *sizes, int32_t sizes_maxcount, int32_t *sizes_count,
GLenum *types, int32_t types_maxcount, int32_t *types_count);
-void yagl_host_glGenQueries(const GLuint *ids, int32_t ids_count);
-void yagl_host_glBeginQuery(GLenum target,
+void yagl_host_glGenQueries(struct yagl_thread_state *cur_ts,
+ const GLuint *ids, int32_t ids_count);
+void yagl_host_glBeginQuery(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLuint id);
-void yagl_host_glEndQuery(GLenum target);
-GLboolean yagl_host_glGetQueryObjectuiv(GLuint id,
+void yagl_host_glEndQuery(struct yagl_thread_state *cur_ts,
+ GLenum target);
+GLboolean yagl_host_glGetQueryObjectuiv(struct yagl_thread_state *cur_ts,
+ GLuint id,
GLenum pname, GLuint *result);
-void yagl_host_glGenSamplers(const GLuint *samplers, int32_t samplers_count);
-void yagl_host_glBindSampler(GLuint unit,
+void yagl_host_glGenSamplers(struct yagl_thread_state *cur_ts,
+ const GLuint *samplers, int32_t samplers_count);
+void yagl_host_glBindSampler(struct yagl_thread_state *cur_ts,
+ GLuint unit,
GLuint sampler);
-void yagl_host_glSamplerParameteri(GLuint sampler,
+void yagl_host_glSamplerParameteri(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
GLint param);
-void yagl_host_glSamplerParameteriv(GLuint sampler,
+void yagl_host_glSamplerParameteriv(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
const GLint *param, int32_t param_count);
-void yagl_host_glSamplerParameterf(GLuint sampler,
+void yagl_host_glSamplerParameterf(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
GLfloat param);
-void yagl_host_glSamplerParameterfv(GLuint sampler,
+void yagl_host_glSamplerParameterfv(struct yagl_thread_state *cur_ts,
+ GLuint sampler,
GLenum pname,
const GLfloat *param, int32_t param_count);
-void yagl_host_glDeleteObjects(const GLuint *objects, int32_t objects_count);
-void yagl_host_glBlendEquation(GLenum mode);
-void yagl_host_glBlendEquationSeparate(GLenum modeRGB,
+void yagl_host_glDeleteObjects(struct yagl_thread_state *cur_ts,
+ const GLuint *objects, int32_t objects_count);
+void yagl_host_glBlendEquation(struct yagl_thread_state *cur_ts,
+ GLenum mode);
+void yagl_host_glBlendEquationSeparate(struct yagl_thread_state *cur_ts,
+ GLenum modeRGB,
GLenum modeAlpha);
-void yagl_host_glBlendFunc(GLenum sfactor,
+void yagl_host_glBlendFunc(struct yagl_thread_state *cur_ts,
+ GLenum sfactor,
GLenum dfactor);
-void yagl_host_glBlendFuncSeparate(GLenum srcRGB,
+void yagl_host_glBlendFuncSeparate(struct yagl_thread_state *cur_ts,
+ GLenum srcRGB,
GLenum dstRGB,
GLenum srcAlpha,
GLenum dstAlpha);
-void yagl_host_glBlendColor(GLclampf red,
+void yagl_host_glBlendColor(struct yagl_thread_state *cur_ts,
+ GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha);
-void yagl_host_glClear(GLbitfield mask);
-void yagl_host_glClearColor(GLclampf red,
+void yagl_host_glClear(struct yagl_thread_state *cur_ts,
+ GLbitfield mask);
+void yagl_host_glClearColor(struct yagl_thread_state *cur_ts,
+ GLclampf red,
GLclampf green,
GLclampf blue,
GLclampf alpha);
-void yagl_host_glClearDepthf(GLclampf depth);
-void yagl_host_glClearStencil(GLint s);
-void yagl_host_glColorMask(GLboolean red,
+void yagl_host_glClearDepthf(struct yagl_thread_state *cur_ts,
+ GLclampf depth);
+void yagl_host_glClearStencil(struct yagl_thread_state *cur_ts,
+ GLint s);
+void yagl_host_glColorMask(struct yagl_thread_state *cur_ts,
+ GLboolean red,
GLboolean green,
GLboolean blue,
GLboolean alpha);
-void yagl_host_glCullFace(GLenum mode);
-void yagl_host_glDepthFunc(GLenum func);
-void yagl_host_glDepthMask(GLboolean flag);
-void yagl_host_glDepthRangef(GLclampf zNear,
+void yagl_host_glCullFace(struct yagl_thread_state *cur_ts,
+ GLenum mode);
+void yagl_host_glDepthFunc(struct yagl_thread_state *cur_ts,
+ GLenum func);
+void yagl_host_glDepthMask(struct yagl_thread_state *cur_ts,
+ GLboolean flag);
+void yagl_host_glDepthRangef(struct yagl_thread_state *cur_ts,
+ GLclampf zNear,
GLclampf zFar);
-void yagl_host_glEnable(GLenum cap);
-void yagl_host_glDisable(GLenum cap);
-void yagl_host_glFlush(void);
-void yagl_host_glFrontFace(GLenum mode);
-void yagl_host_glGenerateMipmap(GLenum target);
-void yagl_host_glHint(GLenum target,
+void yagl_host_glEnable(struct yagl_thread_state *cur_ts,
+ GLenum cap);
+void yagl_host_glDisable(struct yagl_thread_state *cur_ts,
+ GLenum cap);
+void yagl_host_glFlush(struct yagl_thread_state *cur_ts);
+void yagl_host_glFrontFace(struct yagl_thread_state *cur_ts,
+ GLenum mode);
+void yagl_host_glGenerateMipmap(struct yagl_thread_state *cur_ts,
+ GLenum target);
+void yagl_host_glHint(struct yagl_thread_state *cur_ts,
+ GLenum target,
GLenum mode);
-void yagl_host_glLineWidth(GLfloat width);
-void yagl_host_glPixelStorei(GLenum pname,
+void yagl_host_glLineWidth(struct yagl_thread_state *cur_ts,
+ GLfloat width);
+void yagl_host_glPixelStorei(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLint param);
-void yagl_host_glPolygonOffset(GLfloat factor,
+void yagl_host_glPolygonOffset(struct yagl_thread_state *cur_ts,
+ GLfloat factor,
GLfloat units);
-void yagl_host_glScissor(GLint x,
+void yagl_host_glScissor(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height);
-void yagl_host_glStencilFunc(GLenum func,
+void yagl_host_glStencilFunc(struct yagl_thread_state *cur_ts,
+ GLenum func,
GLint ref,
GLuint mask);
-void yagl_host_glStencilMask(GLuint mask);
-void yagl_host_glStencilOp(GLenum fail,
+void yagl_host_glStencilMask(struct yagl_thread_state *cur_ts,
+ GLuint mask);
+void yagl_host_glStencilOp(struct yagl_thread_state *cur_ts,
+ GLenum fail,
GLenum zfail,
GLenum zpass);
-void yagl_host_glSampleCoverage(GLclampf value,
+void yagl_host_glSampleCoverage(struct yagl_thread_state *cur_ts,
+ GLclampf value,
GLboolean invert);
-void yagl_host_glViewport(GLint x,
+void yagl_host_glViewport(struct yagl_thread_state *cur_ts,
+ GLint x,
GLint y,
GLsizei width,
GLsizei height);
-void yagl_host_glStencilFuncSeparate(GLenum face,
+void yagl_host_glStencilFuncSeparate(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum func,
GLint ref,
GLuint mask);
-void yagl_host_glStencilMaskSeparate(GLenum face,
+void yagl_host_glStencilMaskSeparate(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLuint mask);
-void yagl_host_glStencilOpSeparate(GLenum face,
+void yagl_host_glStencilOpSeparate(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum fail,
GLenum zfail,
GLenum zpass);
-void yagl_host_glPointSize(GLfloat size);
-void yagl_host_glAlphaFunc(GLenum func,
+void yagl_host_glPointSize(struct yagl_thread_state *cur_ts,
+ GLfloat size);
+void yagl_host_glAlphaFunc(struct yagl_thread_state *cur_ts,
+ GLenum func,
GLclampf ref);
-void yagl_host_glMatrixMode(GLenum mode);
-void yagl_host_glLoadIdentity(void);
-void yagl_host_glPopMatrix(void);
-void yagl_host_glPushMatrix(void);
-void yagl_host_glRotatef(GLfloat angle,
+void yagl_host_glMatrixMode(struct yagl_thread_state *cur_ts,
+ GLenum mode);
+void yagl_host_glLoadIdentity(struct yagl_thread_state *cur_ts);
+void yagl_host_glPopMatrix(struct yagl_thread_state *cur_ts);
+void yagl_host_glPushMatrix(struct yagl_thread_state *cur_ts);
+void yagl_host_glRotatef(struct yagl_thread_state *cur_ts,
+ GLfloat angle,
GLfloat x,
GLfloat y,
GLfloat z);
-void yagl_host_glTranslatef(GLfloat x,
+void yagl_host_glTranslatef(struct yagl_thread_state *cur_ts,
+ GLfloat x,
GLfloat y,
GLfloat z);
-void yagl_host_glScalef(GLfloat x,
+void yagl_host_glScalef(struct yagl_thread_state *cur_ts,
+ GLfloat x,
GLfloat y,
GLfloat z);
-void yagl_host_glOrthof(GLfloat left,
+void yagl_host_glOrthof(struct yagl_thread_state *cur_ts,
+ GLfloat left,
GLfloat right,
GLfloat bottom,
GLfloat top,
GLfloat zNear,
GLfloat zFar);
-void yagl_host_glColor4f(GLfloat red,
+void yagl_host_glColor4f(struct yagl_thread_state *cur_ts,
+ GLfloat red,
GLfloat green,
GLfloat blue,
GLfloat alpha);
-void yagl_host_glColor4ub(GLubyte red,
+void yagl_host_glColor4ub(struct yagl_thread_state *cur_ts,
+ GLubyte red,
GLubyte green,
GLubyte blue,
GLubyte alpha);
-void yagl_host_glNormal3f(GLfloat nx,
+void yagl_host_glNormal3f(struct yagl_thread_state *cur_ts,
+ GLfloat nx,
GLfloat ny,
GLfloat nz);
-void yagl_host_glPointParameterf(GLenum pname,
+void yagl_host_glPointParameterf(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat param);
-void yagl_host_glPointParameterfv(GLenum pname,
+void yagl_host_glPointParameterfv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glFogf(GLenum pname,
+void yagl_host_glFogf(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat param);
-void yagl_host_glFogfv(GLenum pname,
+void yagl_host_glFogfv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glFrustumf(GLfloat left,
+void yagl_host_glFrustumf(struct yagl_thread_state *cur_ts,
+ GLfloat left,
GLfloat right,
GLfloat bottom,
GLfloat top,
GLfloat zNear,
GLfloat zFar);
-void yagl_host_glLightf(GLenum light,
+void yagl_host_glLightf(struct yagl_thread_state *cur_ts,
+ GLenum light,
GLenum pname,
GLfloat param);
-void yagl_host_glLightfv(GLenum light,
+void yagl_host_glLightfv(struct yagl_thread_state *cur_ts,
+ GLenum light,
GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glGetLightfv(GLenum light,
+void yagl_host_glGetLightfv(struct yagl_thread_state *cur_ts,
+ GLenum light,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glLightModelf(GLenum pname,
+void yagl_host_glLightModelf(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat param);
-void yagl_host_glLightModelfv(GLenum pname,
+void yagl_host_glLightModelfv(struct yagl_thread_state *cur_ts,
+ GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glMaterialf(GLenum face,
+void yagl_host_glMaterialf(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum pname,
GLfloat param);
-void yagl_host_glMaterialfv(GLenum face,
+void yagl_host_glMaterialfv(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum pname,
const GLfloat *params, int32_t params_count);
-void yagl_host_glGetMaterialfv(GLenum face,
+void yagl_host_glGetMaterialfv(struct yagl_thread_state *cur_ts,
+ GLenum face,
GLenum pname,
GLfloat *params, int32_t params_maxcount, int32_t *params_count);
-void yagl_host_glShadeModel(GLenum mode);
-void yagl_host_glLogicOp(GLenum opcode);
-void yagl_host_glMultMatrixf(const GLfloat *m, int32_t m_count);
-void yagl_host_glLoadMatrixf(const GLfloat *m, int32_t m_count);
-void yagl_host_glClipPlanef(GLenum plane,
+void yagl_host_glShadeModel(struct yagl_thread_state *cur_ts,
+ GLenum mode);
+void yagl_host_glLogicOp(struct yagl_thread_state *cur_ts,
+ GLenum opcode);
+void yagl_host_glMultMatrixf(struct yagl_thread_state *cur_ts,
+ const GLfloat *m, int32_t m_count);
+void yagl_host_glLoadMatrixf(struct yagl_thread_state *cur_ts,
+ const GLfloat *m, int32_t m_count);
+void yagl_host_glClipPlanef(struct yagl_thread_state *cur_ts,
+ GLenum plane,
const GLfloat *equation, int32_t equation_count);
-void yagl_host_glGetClipPlanef(GLenum pname,
+void yagl_host_glGetClipPlanef(struct yagl_thread_state *cur_ts,
+ GLenum pname,
GLfloat *eqn, int32_t eqn_maxcount, int32_t *eqn_count);
-void yagl_host_glUpdateOffscreenImageYAGL(GLuint texture,
+void yagl_host_glUpdateOffscreenImageYAGL(struct yagl_thread_state *cur_ts,
+ GLuint texture,
uint32_t width,
uint32_t height,
uint32_t bpp,
const void *pixels, int32_t pixels_count);
-void yagl_host_glGenUniformLocationYAGL(uint32_t location,
+void yagl_host_glGenUniformLocationYAGL(struct yagl_thread_state *cur_ts,
+ uint32_t location,
GLuint program,
const GLchar *name, int32_t name_count);
-void yagl_host_glDeleteUniformLocationsYAGL(const uint32_t *locations, int32_t locations_count);
+void yagl_host_glDeleteUniformLocationsYAGL(struct yagl_thread_state *cur_ts,
+ const uint32_t *locations, int32_t locations_count);
#endif
#include "yagl_thread.h"
#include "yagl_gles_driver.h"
+// TODO remove and pass via argument
YAGL_DEFINE_TLS(struct yagl_egl_offscreen_ts*, egl_offscreen_ts);
-static void yagl_egl_offscreen_thread_init(struct yagl_egl_backend *backend)
+static void yagl_egl_offscreen_thread_init(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_thread_init, NULL);
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_egl_offscreen_batch_start(struct yagl_egl_backend *backend)
+static void yagl_egl_offscreen_batch_start(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
struct yagl_egl_offscreen *egl_offscreen = (struct yagl_egl_offscreen*)backend;
egl_offscreen_ts->ctx->native_ctx);
}
-static void yagl_egl_offscreen_batch_end(struct yagl_egl_backend *backend)
+static void yagl_egl_offscreen_batch_end(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
struct yagl_egl_offscreen *egl_offscreen = (struct yagl_egl_offscreen*)backend;
return dpy ? &dpy->base : NULL;
}
-static bool yagl_egl_offscreen_make_current(struct yagl_egl_backend *backend,
+static bool yagl_egl_offscreen_make_current(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend,
struct yagl_eglb_display *dpy,
struct yagl_eglb_context *ctx,
struct yagl_eglb_surface *draw,
return res;
}
-static bool yagl_egl_offscreen_release_current(struct yagl_egl_backend *backend, bool force)
+static bool yagl_egl_offscreen_release_current(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend,
+ bool force)
{
struct yagl_egl_offscreen *egl_offscreen = (struct yagl_egl_offscreen*)backend;
bool res;
return res || force;
}
-static void yagl_egl_offscreen_thread_fini(struct yagl_egl_backend *backend)
+static void yagl_egl_offscreen_thread_fini(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_thread_fini, NULL);
static void yagl_egl_offscreen_destroy(struct yagl_egl_backend *backend)
{
struct yagl_egl_offscreen *egl_offscreen = (struct yagl_egl_offscreen*)backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_destroy, NULL);
EGLSurface sfc = EGL_NO_SURFACE;
EGLContext ctx = EGL_NO_CONTEXT;
EGLContext global_ctx = EGL_NO_CONTEXT;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_create, NULL);
(struct yagl_egl_offscreen_display*)ctx->dpy;
struct yagl_egl_offscreen *egl_offscreen =
(struct yagl_egl_offscreen*)ctx->dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_context_destroy, NULL);
if (egl_offscreen_ctx->rp_pbo) {
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(ctx->ps, 0);
egl_offscreen->gles_driver->DeleteBuffers(1, &egl_offscreen_ctx->rp_pbo);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(ctx->ps, 0);
}
egl_offscreen->egl_driver->context_destroy(egl_offscreen->egl_driver,
}
struct yagl_egl_offscreen_context
- *yagl_egl_offscreen_context_create(struct yagl_egl_offscreen_display *dpy,
+ *yagl_egl_offscreen_context_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_offscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
struct yagl_egl_offscreen_context *share_context,
int version)
yagl_eglb_context_init(&ctx->base, &dpy->base);
ctx->base.destroy = &yagl_egl_offscreen_context_destroy;
+ ctx->base.ps = cur_ts->ps;
ctx->native_ctx = native_ctx;
return ctx;
}
-bool yagl_egl_offscreen_context_read_pixels(struct yagl_egl_offscreen_context *ctx,
+bool yagl_egl_offscreen_context_read_pixels(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_offscreen_context *ctx,
uint32_t width,
uint32_t height,
uint32_t bpp,
};
struct yagl_egl_offscreen_context
- *yagl_egl_offscreen_context_create(struct yagl_egl_offscreen_display *dpy,
+ *yagl_egl_offscreen_context_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_offscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
struct yagl_egl_offscreen_context *share_context,
int version);
-bool yagl_egl_offscreen_context_read_pixels(struct yagl_egl_offscreen_context *ctx,
+bool yagl_egl_offscreen_context_read_pixels(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_offscreen_context *ctx,
uint32_t width,
uint32_t height,
uint32_t bpp,
static void yagl_egl_offscreen_image_destroy(struct yagl_object *obj)
{
struct yagl_egl_offscreen_image *image = (struct yagl_egl_offscreen_image*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_image_destroy, "%u", obj->global_name);
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(obj->ps, 0);
image->driver->DeleteTextures(1, &obj->global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(obj->ps, 0);
g_free(image);
struct yagl_egl_offscreen *egl_offscreen =
(struct yagl_egl_offscreen*)dpy->backend;
struct yagl_egl_native_config *native_configs;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_display_config_enum,
"dpy = %p", dpy);
(struct yagl_egl_offscreen_display*)dpy;
struct yagl_egl_offscreen *egl_offscreen =
(struct yagl_egl_offscreen*)dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_display_config_cleanup,
"dpy = %p, cfg = %d",
}
static struct yagl_eglb_context
- *yagl_egl_offscreen_display_create_context(struct yagl_eglb_display *dpy,
+ *yagl_egl_offscreen_display_create_context(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
const struct yagl_egl_native_config *cfg,
struct yagl_eglb_context *share_context,
int version)
struct yagl_egl_offscreen_display *egl_offscreen_dpy =
(struct yagl_egl_offscreen_display*)dpy;
struct yagl_egl_offscreen_context *ctx =
- yagl_egl_offscreen_context_create(egl_offscreen_dpy,
+ yagl_egl_offscreen_context_create(cur_ts,
+ egl_offscreen_dpy,
cfg,
(struct yagl_egl_offscreen_context*)share_context,
version);
}
static struct yagl_eglb_surface
- *yagl_egl_offscreen_display_create_surface(struct yagl_eglb_display *dpy,
+ *yagl_egl_offscreen_display_create_surface(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
const struct yagl_egl_native_config *cfg,
EGLenum type,
const void *attribs,
struct yagl_egl_offscreen_display *egl_offscreen_dpy =
(struct yagl_egl_offscreen_display*)dpy;
struct yagl_egl_offscreen_surface *sfc =
- yagl_egl_offscreen_surface_create(egl_offscreen_dpy,
+ yagl_egl_offscreen_surface_create(cur_ts,
+ egl_offscreen_dpy,
cfg,
type,
attribs,
return sfc ? &sfc->base : NULL;
}
-static struct yagl_object *yagl_egl_offscreen_display_create_image(struct yagl_eglb_display *dpy,
+static struct yagl_object *yagl_egl_offscreen_display_create_image(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
yagl_winsys_id buffer)
{
struct yagl_egl_offscreen *egl_offscreen =
image = g_malloc(sizeof(*image));
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(cur_ts->ps, 0);
egl_offscreen->gles_driver->GenTextures(1, &image->base.global_name);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(cur_ts->ps, 0);
image->base.destroy = &yagl_egl_offscreen_image_destroy;
+ image->base.ps = cur_ts->ps;
image->driver = egl_offscreen->gles_driver;
return &image->base;
(struct yagl_egl_offscreen_display*)dpy;
struct yagl_egl_offscreen *egl_offscreen =
(struct yagl_egl_offscreen*)dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_display_destroy,
"dpy = %p", dpy);
{
struct yagl_egl_offscreen_display *dpy;
EGLNativeDisplayType native_dpy;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_display_create, NULL);
#include "yagl_thread.h"
#include "yagl_compiled_transfer.h"
+// TODO remove and pass via argument
YAGL_DECLARE_TLS(struct yagl_egl_offscreen_ts*, egl_offscreen_ts);
static void yagl_egl_offscreen_surface_cleanup(struct yagl_egl_offscreen_surface *sfc)
(struct yagl_egl_offscreen_display*)sfc->base.dpy;
struct yagl_egl_offscreen *egl_offscreen =
(struct yagl_egl_offscreen*)sfc->base.dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_surface_cleanup, NULL);
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_egl_offscreen_surface_invalidate(struct yagl_eglb_surface *sfc,
+static void yagl_egl_offscreen_surface_invalidate(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc,
yagl_winsys_id id)
{
}
-static void yagl_egl_offscreen_surface_replace(struct yagl_eglb_surface *sfc,
+static void yagl_egl_offscreen_surface_replace(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc,
struct yagl_eglb_surface *with)
{
struct yagl_egl_offscreen_surface *osfc =
g_free(owith);
}
-static bool yagl_egl_offscreen_surface_query(struct yagl_eglb_surface *sfc,
+static bool yagl_egl_offscreen_surface_query(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc,
EGLint attribute,
EGLint *value)
{
return true;
}
-static void yagl_egl_offscreen_surface_swap_buffers(struct yagl_eglb_surface *sfc)
+static void yagl_egl_offscreen_surface_swap_buffers(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc)
{
struct yagl_egl_offscreen_surface *osfc =
(struct yagl_egl_offscreen_surface*)sfc;
- struct yagl_egl_offscreen_context *octx = egl_offscreen_ts->ctx;
+ struct yagl_egl_offscreen_context *octx = egl_offscreen_ts->ctx; // TODO get from cur_ts
YAGL_LOG_FUNC_SET(yagl_egl_offscreen_surface_swap_buffers);
assert(octx);
- if (!yagl_egl_offscreen_context_read_pixels(octx,
+ if (!yagl_egl_offscreen_context_read_pixels(cur_ts,
+ octx,
osfc->width,
osfc->height,
osfc->bpp,
yagl_compiled_transfer_exec(osfc->bimage_ct, osfc->host_pixels);
}
-static void yagl_egl_offscreen_surface_copy_buffers(struct yagl_eglb_surface *sfc)
+static void yagl_egl_offscreen_surface_copy_buffers(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc)
{
struct yagl_egl_offscreen_surface *osfc =
(struct yagl_egl_offscreen_surface*)sfc;
- struct yagl_egl_offscreen_context *octx = egl_offscreen_ts->ctx;
+ struct yagl_egl_offscreen_context *octx = egl_offscreen_ts->ctx; // TODO get from cur_ts
YAGL_LOG_FUNC_SET(yagl_egl_offscreen_surface_copy_buffers);
assert(octx);
- if (!yagl_egl_offscreen_context_read_pixels(octx,
+ if (!yagl_egl_offscreen_context_read_pixels(cur_ts,
+ octx,
osfc->width,
osfc->height,
osfc->bpp,
yagl_compiled_transfer_exec(osfc->bimage_ct, osfc->host_pixels);
}
-static void yagl_egl_offscreen_surface_wait_gl(struct yagl_eglb_surface *sfc)
+static void yagl_egl_offscreen_surface_wait_gl(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc)
{
}
{
struct yagl_egl_offscreen_surface *egl_offscreen_sfc =
(struct yagl_egl_offscreen_surface*)sfc;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_surface_destroy, NULL);
}
struct yagl_egl_offscreen_surface
- *yagl_egl_offscreen_surface_create(struct yagl_egl_offscreen_display *dpy,
+ *yagl_egl_offscreen_surface_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_offscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
EGLenum type,
const void *attribs,
return NULL;
}
- bimage_ct = yagl_compiled_transfer_create(pixels,
+ bimage_ct = yagl_compiled_transfer_create(cur_ts,
+ pixels,
(width * height * bpp),
true);
sfc->base.copy_buffers = &yagl_egl_offscreen_surface_copy_buffers;
sfc->base.wait_gl = &yagl_egl_offscreen_surface_wait_gl;
sfc->base.destroy = &yagl_egl_offscreen_surface_destroy;
+ sfc->base.ps = cur_ts->ps;
YAGL_LOG_FUNC_EXIT(NULL);
};
struct yagl_egl_offscreen_surface
- *yagl_egl_offscreen_surface_create(struct yagl_egl_offscreen_display *dpy,
+ *yagl_egl_offscreen_surface_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_offscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
EGLenum type,
const void *attribs,
#include "yagl_gles_driver.h"
#include "hw/vigs/winsys_gl.h"
+// TODO remove and pass via argument
YAGL_DEFINE_TLS(struct yagl_egl_onscreen_ts*, egl_onscreen_ts);
static void yagl_egl_onscreen_setup_framebuffer_zero(struct yagl_egl_onscreen *egl_onscreen)
cur_fb);
}
-static void yagl_egl_onscreen_thread_init(struct yagl_egl_backend *backend)
+static void yagl_egl_onscreen_thread_init(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
YAGL_LOG_FUNC_EXIT(NULL);
}
-static void yagl_egl_onscreen_batch_start(struct yagl_egl_backend *backend)
+static void yagl_egl_onscreen_batch_start(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
}
}
-static void yagl_egl_onscreen_batch_end(struct yagl_egl_backend *backend)
+static void yagl_egl_onscreen_batch_end(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
return dpy ? &dpy->base : NULL;
}
-static bool yagl_egl_onscreen_make_current(struct yagl_egl_backend *backend,
+static bool yagl_egl_onscreen_make_current(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend,
struct yagl_eglb_display *dpy,
struct yagl_eglb_context *ctx,
struct yagl_eglb_surface *draw,
return res;
}
-static bool yagl_egl_onscreen_release_current(struct yagl_egl_backend *backend, bool force)
+static bool yagl_egl_onscreen_release_current(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend,
+ bool force)
{
struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
bool res;
return res || force;
}
-static void yagl_egl_onscreen_thread_fini(struct yagl_egl_backend *backend)
+static void yagl_egl_onscreen_thread_fini(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_backend *backend)
{
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_thread_fini, NULL);
static void yagl_egl_onscreen_destroy(struct yagl_egl_backend *backend)
{
struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_destroy, NULL);
EGLContext ctx = EGL_NO_CONTEXT;
EGLContext global_ctx = EGL_NO_CONTEXT;
struct winsys_gl_info *ws_info = (struct winsys_gl_info*)wsi->ws_info;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_create, NULL);
(struct yagl_egl_onscreen_display*)ctx->dpy;
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen*)ctx->dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_context_destroy, NULL);
if (egl_onscreen_ctx->fb) {
- yagl_ensure_ctx(egl_onscreen_ctx->fb_ctx_id);
+ yagl_ensure_ctx(ctx->ps, egl_onscreen_ctx->fb_ctx_id);
egl_onscreen->gles_driver->DeleteFramebuffers(1, &egl_onscreen_ctx->fb);
- yagl_unensure_ctx(egl_onscreen_ctx->fb_ctx_id);
+ yagl_unensure_ctx(ctx->ps, egl_onscreen_ctx->fb_ctx_id);
}
if (egl_onscreen_ctx->null_sfc != EGL_NO_SURFACE) {
}
struct yagl_egl_onscreen_context
- *yagl_egl_onscreen_context_create(struct yagl_egl_onscreen_display *dpy,
+ *yagl_egl_onscreen_context_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
struct yagl_egl_onscreen_context *share_context,
int version)
yagl_eglb_context_init(&ctx->base, &dpy->base);
ctx->base.destroy = &yagl_egl_onscreen_context_destroy;
+ ctx->base.ps = cur_ts->ps;
ctx->native_ctx = native_ctx;
}
egl_onscreen->gles_driver->GenFramebuffers(1, &ctx->fb);
- ctx->fb_ctx_id = yagl_get_ctx_id();
+ ctx->fb_ctx_id = yagl_get_ctx_id(ctx->base.ps);
}
bool yagl_egl_onscreen_context_setup_surfaceless(struct yagl_egl_onscreen_context *ctx)
};
struct yagl_egl_onscreen_context
- *yagl_egl_onscreen_context_create(struct yagl_egl_onscreen_display *dpy,
+ *yagl_egl_onscreen_context_create(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
struct yagl_egl_onscreen_context *share_context,
int version);
static void yagl_egl_onscreen_image_destroy(struct yagl_object *obj)
{
struct yagl_egl_onscreen_image *image = (struct yagl_egl_onscreen_image*)obj;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_image_destroy, "%u", obj->global_name);
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen*)dpy->backend;
struct yagl_egl_native_config *native_configs;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_display_config_enum,
"dpy = %p", dpy);
(struct yagl_egl_onscreen_display*)dpy;
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen*)dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_display_config_cleanup,
"dpy = %p, cfg = %d",
}
static struct yagl_eglb_context
- *yagl_egl_onscreen_display_create_context(struct yagl_eglb_display *dpy,
+ *yagl_egl_onscreen_display_create_context(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
const struct yagl_egl_native_config *cfg,
struct yagl_eglb_context *share_context,
int version)
struct yagl_egl_onscreen_display *egl_onscreen_dpy =
(struct yagl_egl_onscreen_display*)dpy;
struct yagl_egl_onscreen_context *ctx =
- yagl_egl_onscreen_context_create(egl_onscreen_dpy,
+ yagl_egl_onscreen_context_create(cur_ts,
+ egl_onscreen_dpy,
cfg,
(struct yagl_egl_onscreen_context*)share_context,
version);
}
static struct yagl_eglb_surface
- *yagl_egl_onscreen_display_create_window_surface(struct yagl_eglb_display *dpy,
+ *yagl_egl_onscreen_display_create_window_surface(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_window_attribs *attribs,
yagl_winsys_id id)
struct yagl_egl_onscreen_display *egl_onscreen_dpy =
(struct yagl_egl_onscreen_display*)dpy;
struct yagl_egl_onscreen_surface *sfc =
- yagl_egl_onscreen_surface_create_window(egl_onscreen_dpy,
+ yagl_egl_onscreen_surface_create_window(cur_ts,
+ egl_onscreen_dpy,
cfg,
attribs,
id);
}
static struct yagl_eglb_surface
- *yagl_egl_onscreen_display_create_pixmap_surface(struct yagl_eglb_display *dpy,
+ *yagl_egl_onscreen_display_create_pixmap_surface(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_pixmap_attribs *attribs,
yagl_winsys_id id)
struct yagl_egl_onscreen_display *egl_onscreen_dpy =
(struct yagl_egl_onscreen_display*)dpy;
struct yagl_egl_onscreen_surface *sfc =
- yagl_egl_onscreen_surface_create_pixmap(egl_onscreen_dpy,
+ yagl_egl_onscreen_surface_create_pixmap(cur_ts,
+ egl_onscreen_dpy,
cfg,
attribs,
id);
}
static struct yagl_eglb_surface
- *yagl_egl_onscreen_display_create_pbuffer_surface(struct yagl_eglb_display *dpy,
+ *yagl_egl_onscreen_display_create_pbuffer_surface(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_pbuffer_attribs *attribs,
yagl_winsys_id id)
struct yagl_egl_onscreen_display *egl_onscreen_dpy =
(struct yagl_egl_onscreen_display*)dpy;
struct yagl_egl_onscreen_surface *sfc =
- yagl_egl_onscreen_surface_create_pbuffer(egl_onscreen_dpy,
+ yagl_egl_onscreen_surface_create_pbuffer(cur_ts,
+ egl_onscreen_dpy,
cfg,
attribs,
id);
return sfc ? &sfc->base : NULL;
}
-static struct yagl_object *yagl_egl_onscreen_display_create_image(struct yagl_eglb_display *dpy,
+static struct yagl_object *yagl_egl_onscreen_display_create_image(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_display *dpy,
yagl_winsys_id buffer)
{
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen_display*)dpy;
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen*)dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_display_destroy,
"dpy = %p", dpy);
{
struct yagl_egl_onscreen_display *dpy;
EGLNativeDisplayType native_dpy;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_display_create, NULL);
#include "yagl_gles_driver.h"
#include "hw/vigs/winsys_gl.h"
+// TODO remove and pass via argument
YAGL_DECLARE_TLS(struct yagl_egl_onscreen_ts*, egl_onscreen_ts);
-static void yagl_egl_onscreen_surface_invalidate(struct yagl_eglb_surface *sfc,
+static void yagl_egl_onscreen_surface_invalidate(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc,
yagl_winsys_id id)
{
struct yagl_egl_onscreen_surface *osfc =
if (((osfc->ws_sfc->base.width != ws_sfc->base.width) ||
(osfc->ws_sfc->base.height != ws_sfc->base.height)) &&
osfc->rb) {
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(cur_ts->ps, 0);
egl_onscreen->gles_driver->DeleteRenderbuffers(1, &osfc->rb);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(cur_ts->ps, 0);
osfc->rb = 0;
}
YAGL_LOG_FUNC_EXIT(NULL);
}
-static bool yagl_egl_onscreen_surface_query(struct yagl_eglb_surface *sfc,
- EGLint attribute,
- EGLint *value)
+static bool yagl_egl_onscreen_surface_query(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc,
+ EGLint attribute,
+ EGLint *value)
{
struct yagl_egl_onscreen_surface *osfc =
(struct yagl_egl_onscreen_surface*)sfc;
return true;
}
-static void yagl_egl_onscreen_surface_swap_buffers(struct yagl_eglb_surface *sfc)
+static void yagl_egl_onscreen_surface_swap_buffers(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc)
{
struct yagl_egl_onscreen_surface *osfc =
(struct yagl_egl_onscreen_surface*)sfc;
osfc->ws_sfc->base.set_dirty(&osfc->ws_sfc->base);
}
-static void yagl_egl_onscreen_surface_copy_buffers(struct yagl_eglb_surface *sfc)
+static void yagl_egl_onscreen_surface_copy_buffers(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc)
{
struct yagl_egl_onscreen_surface *osfc =
(struct yagl_egl_onscreen_surface*)sfc;
osfc->ws_sfc->base.set_dirty(&osfc->ws_sfc->base);
}
-static void yagl_egl_onscreen_surface_wait_gl(struct yagl_eglb_surface *sfc)
+static void yagl_egl_onscreen_surface_wait_gl(struct yagl_thread_state *cur_ts,
+ struct yagl_eglb_surface *sfc)
{
struct yagl_egl_onscreen_surface *osfc =
(struct yagl_egl_onscreen_surface*)sfc;
(struct yagl_egl_onscreen_surface*)sfc;
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen*)sfc->dpy->backend;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_surface_destroy, NULL);
}
if (osfc->rb) {
- yagl_ensure_ctx(0);
+ yagl_ensure_ctx(sfc->ps, 0);
egl_onscreen->gles_driver->DeleteRenderbuffers(1, &osfc->rb);
- yagl_unensure_ctx(0);
+ yagl_unensure_ctx(sfc->ps, 0);
}
yagl_eglb_surface_cleanup(sfc);
}
struct yagl_egl_onscreen_surface
- *yagl_egl_onscreen_surface_create_window(struct yagl_egl_onscreen_display *dpy,
+ *yagl_egl_onscreen_surface_create_window(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_window_attribs *attribs,
yagl_winsys_id id)
sfc->base.copy_buffers = &yagl_egl_onscreen_surface_copy_buffers;
sfc->base.wait_gl = &yagl_egl_onscreen_surface_wait_gl;
sfc->base.destroy = &yagl_egl_onscreen_surface_destroy;
+ sfc->base.ps = cur_ts->ps;
YAGL_LOG_FUNC_EXIT(NULL);
}
struct yagl_egl_onscreen_surface
- *yagl_egl_onscreen_surface_create_pixmap(struct yagl_egl_onscreen_display *dpy,
+ *yagl_egl_onscreen_surface_create_pixmap(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_pixmap_attribs *attribs,
yagl_winsys_id id)
sfc->base.copy_buffers = &yagl_egl_onscreen_surface_copy_buffers;
sfc->base.wait_gl = &yagl_egl_onscreen_surface_wait_gl;
sfc->base.destroy = &yagl_egl_onscreen_surface_destroy;
+ sfc->base.ps = cur_ts->ps;
YAGL_LOG_FUNC_EXIT(NULL);
}
struct yagl_egl_onscreen_surface
- *yagl_egl_onscreen_surface_create_pbuffer(struct yagl_egl_onscreen_display *dpy,
- const struct yagl_egl_native_config *cfg,
- const struct yagl_egl_pbuffer_attribs *attribs,
- yagl_winsys_id id)
+ *yagl_egl_onscreen_surface_create_pbuffer(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
+ const struct yagl_egl_native_config *cfg,
+ const struct yagl_egl_pbuffer_attribs *attribs,
+ yagl_winsys_id id)
{
struct yagl_egl_onscreen *egl_onscreen =
(struct yagl_egl_onscreen*)dpy->base.backend;
sfc->base.copy_buffers = &yagl_egl_onscreen_surface_copy_buffers;
sfc->base.wait_gl = &yagl_egl_onscreen_surface_wait_gl;
sfc->base.destroy = &yagl_egl_onscreen_surface_destroy;
+ sfc->base.ps = cur_ts->ps;
YAGL_LOG_FUNC_EXIT(NULL);
};
struct yagl_egl_onscreen_surface
- *yagl_egl_onscreen_surface_create_window(struct yagl_egl_onscreen_display *dpy,
+ *yagl_egl_onscreen_surface_create_window(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_window_attribs *attribs,
yagl_winsys_id id);
struct yagl_egl_onscreen_surface
- *yagl_egl_onscreen_surface_create_pixmap(struct yagl_egl_onscreen_display *dpy,
+ *yagl_egl_onscreen_surface_create_pixmap(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
const struct yagl_egl_native_config *cfg,
const struct yagl_egl_pixmap_attribs *attribs,
yagl_winsys_id id);
struct yagl_egl_onscreen_surface
- *yagl_egl_onscreen_surface_create_pbuffer(struct yagl_egl_onscreen_display *dpy,
- const struct yagl_egl_native_config *cfg,
- const struct yagl_egl_pbuffer_attribs *attribs,
- yagl_winsys_id id);
+ *yagl_egl_onscreen_surface_create_pbuffer(struct yagl_thread_state *cur_ts,
+ struct yagl_egl_onscreen_display *dpy,
+ const struct yagl_egl_native_config *cfg,
+ const struct yagl_egl_pbuffer_attribs *attribs,
+ yagl_winsys_id id);
void yagl_egl_onscreen_surface_setup(struct yagl_egl_onscreen_surface *sfc);
}
struct yagl_compiled_transfer
- *yagl_compiled_transfer_create(target_ulong va,
+ *yagl_compiled_transfer_create(struct yagl_thread_state *cur_ts,
+ target_ulong va,
uint32_t len,
bool is_write)
{
QLIST_INSERT_HEAD(&cur_ts->t->compiled_transfers, ct, entry);
ct->in_list = true;
+ ct->ts = cur_ts;
return ct;
}
g_free(ct);
}
-void yagl_compiled_transfer_prepare(struct yagl_compiled_transfer *ct)
+void yagl_compiled_transfer_prepare(struct yagl_thread_state *cur_ts,
+ struct yagl_compiled_transfer *ct)
{
struct yagl_vector v;
target_ulong last_page_va = YAGL_TARGET_PAGE_VA(ct->va + ct->len - 1);
struct yagl_compiled_transfer
{
QLIST_ENTRY(yagl_compiled_transfer) entry;
+ struct yagl_thread_state *ts;
target_ulong va;
uint32_t len;
};
struct yagl_compiled_transfer
- *yagl_compiled_transfer_create(target_ulong va,
+ *yagl_compiled_transfer_create(struct yagl_thread_state *cur_ts,
+ target_ulong va,
uint32_t len,
bool is_write);
void yagl_compiled_transfer_destroy(struct yagl_compiled_transfer *ct);
-void yagl_compiled_transfer_prepare(struct yagl_compiled_transfer *ct);
+void yagl_compiled_transfer_prepare(struct yagl_thread_state *cur_ts,
+ struct yagl_compiled_transfer *ct);
void yagl_compiled_transfer_exec(struct yagl_compiled_transfer *ct, void* data);
yagl_tid target_tid;
hwaddr buff_len = TARGET_PAGE_SIZE;
uint8_t *buff = NULL;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_device_operate,
"user_index = %d, buff_pa = %" PRIx64,
static void yagl_device_trigger(YaGLState *s, int user_index, bool sync)
{
+ YAGL_LOG_NO_TS;
+
YAGL_LOG_FUNC_ENTER(yagl_device_trigger, "%d, %d", user_index, sync);
if (s->users[user_index].activated) {
struct yagl_egl_driver *egl_driver = NULL;
struct yagl_egl_backend *egl_backend = NULL;
struct yagl_gles_driver *gles_driver = NULL;
+ YAGL_LOG_NO_TS;
if (s->protocol > 0) {
yagl_protocol_version = s->protocol;
{
YaGLState *s = container_of(d, YaGLState, dev.qdev);
int i;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_device_reset, NULL);
static void yagl_device_exit(PCIDevice *dev)
{
YaGLState *s = DO_UPCAST(YaGLState, dev, dev);
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_device_exit, NULL);
#include <GL/glx.h>
#define YAGL_EGL_GLX_ENTER(func, format, ...) \
+ YAGL_LOG_NO_TS; \
YAGL_LOG_FUNC_ENTER(func, format,##__VA_ARGS__)
#define YAGL_EGL_GLX_GET_PROC(proc_type, proc_name) \
static void yagl_egl_glx_destroy(struct yagl_egl_driver *driver)
{
struct yagl_egl_glx *egl_glx = (struct yagl_egl_glx*)driver;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_glx_destroy, NULL);
struct yagl_egl_driver *egl_driver;
struct yagl_egl_glx *egl_glx;
Display *x_display = display;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_egl_glx_create, NULL);
static void yagl_gles_ogl_destroy(struct yagl_gles_driver *driver)
{
+ YAGL_LOG_NO_TS;
+
YAGL_LOG_FUNC_ENTER(yagl_gles_ogl_destroy, NULL);
yagl_gles_driver_cleanup(driver);
yagl_gl_version gl_version)
{
struct yagl_gles_driver *driver = NULL;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_ogl_create, NULL);
struct yagl_gles_driver *orig_driver;
};
+// TODO remove and pass via argument
YAGL_DECLARE_TLS(struct yagl_egl_onscreen_ts*, egl_onscreen_ts);
static void YAGL_GLES_APIENTRY yagl_gles_onscreen_BindFramebuffer(GLenum target,
static void yagl_gles_onscreen_destroy(struct yagl_gles_driver *driver)
{
struct yagl_gles_onscreen *gles_onscreen = (struct yagl_gles_onscreen*)driver;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_onscreen_destroy, NULL);
*yagl_gles_onscreen_create(struct yagl_gles_driver *orig_driver)
{
struct yagl_gles_onscreen *driver = NULL;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_gles_onscreen_create, NULL);
yagl_gl_version gl_version;
- void (*thread_init)(struct yagl_egl_backend */*backend*/);
+ void (*thread_init)(struct yagl_thread_state */*cur_ts*/, struct yagl_egl_backend */*backend*/);
- void (*batch_start)(struct yagl_egl_backend */*backend*/);
+ void (*batch_start)(struct yagl_thread_state */*cur_ts*/, struct yagl_egl_backend */*backend*/);
struct yagl_eglb_display *(*create_display)(struct yagl_egl_backend */*backend*/);
- bool (*make_current)(struct yagl_egl_backend */*backend*/,
+ bool (*make_current)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_egl_backend */*backend*/,
struct yagl_eglb_display */*dpy*/,
struct yagl_eglb_context */*ctx*/,
struct yagl_eglb_surface */*draw*/,
struct yagl_eglb_surface */*read*/);
- bool (*release_current)(struct yagl_egl_backend */*backend*/,
+ bool (*release_current)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_egl_backend */*backend*/,
bool /*force*/);
- void (*batch_end)(struct yagl_egl_backend */*backend*/);
+ void (*batch_end)(struct yagl_thread_state */*cur_ts*/, struct yagl_egl_backend */*backend*/);
- void (*thread_fini)(struct yagl_egl_backend */*backend*/);
+ void (*thread_fini)(struct yagl_thread_state */*cur_ts*/, struct yagl_egl_backend */*backend*/);
/*
* Make sure that some GL context is currently active. Can
struct yagl_eglb_context
{
struct yagl_eglb_display *dpy;
+ struct yagl_process_state *ps;
void (*destroy)(struct yagl_eglb_context */*ctx*/);
};
void (*config_cleanup)(struct yagl_eglb_display */*dpy*/,
const struct yagl_egl_native_config */*cfg*/);
- struct yagl_eglb_context *(*create_context)(struct yagl_eglb_display */*dpy*/,
+ struct yagl_eglb_context *(*create_context)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_display */*dpy*/,
const struct yagl_egl_native_config */*cfg*/,
struct yagl_eglb_context */*share_context*/,
int /*version*/);
/*
* 'pixels' are locked in target's memory, no page fault possible.
*/
- struct yagl_eglb_surface *(*create_offscreen_surface)(struct yagl_eglb_display */*dpy*/,
+ struct yagl_eglb_surface *(*create_offscreen_surface)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_display */*dpy*/,
const struct yagl_egl_native_config */*cfg*/,
EGLenum /*type*/,
const void */*attribs*/,
uint32_t /*bpp*/,
target_ulong /*pixels*/);
- struct yagl_eglb_surface *(*create_onscreen_window_surface)(struct yagl_eglb_display */*dpy*/,
+ struct yagl_eglb_surface *(*create_onscreen_window_surface)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_display */*dpy*/,
const struct yagl_egl_native_config */*cfg*/,
const struct yagl_egl_window_attribs */*attribs*/,
yagl_winsys_id /*id*/);
- struct yagl_eglb_surface *(*create_onscreen_pixmap_surface)(struct yagl_eglb_display */*dpy*/,
+ struct yagl_eglb_surface *(*create_onscreen_pixmap_surface)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_display */*dpy*/,
const struct yagl_egl_native_config */*cfg*/,
const struct yagl_egl_pixmap_attribs */*attribs*/,
yagl_winsys_id /*id*/);
- struct yagl_eglb_surface *(*create_onscreen_pbuffer_surface)(struct yagl_eglb_display */*dpy*/,
+ struct yagl_eglb_surface *(*create_onscreen_pbuffer_surface)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_display */*dpy*/,
const struct yagl_egl_native_config */*cfg*/,
const struct yagl_egl_pbuffer_attribs */*attribs*/,
yagl_winsys_id /*id*/);
- struct yagl_object *(*create_image)(struct yagl_eglb_display */*dpy*/,
+ struct yagl_object *(*create_image)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_display */*dpy*/,
yagl_winsys_id /*buffer*/);
void (*destroy)(struct yagl_eglb_display */*dpy*/);
{
struct yagl_eglb_display *dpy;
+ struct yagl_process_state *ps;
+
EGLenum type;
union
* Surface has been invalidated on target, update it
* from 'id'.
*/
- void (*invalidate)(struct yagl_eglb_surface */*sfc*/,
+ void (*invalidate)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_surface */*sfc*/,
yagl_winsys_id /*id*/);
/*
* 'sfc' and 'with' must be of same type, but can have
* different formats.
*/
- void (*replace)(struct yagl_eglb_surface */*sfc*/,
+ void (*replace)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_surface */*sfc*/,
struct yagl_eglb_surface */*with*/);
/*
* Can be called for surfaces that were reset.
*/
- bool (*query)(struct yagl_eglb_surface */*sfc*/,
+ bool (*query)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_surface */*sfc*/,
EGLint /*attribute*/,
EGLint */*value*/);
- void (*swap_buffers)(struct yagl_eglb_surface */*sfc*/);
+ void (*swap_buffers)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_surface */*sfc*/);
- void (*copy_buffers)(struct yagl_eglb_surface */*sfc*/);
+ void (*copy_buffers)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_surface */*sfc*/);
- void (*wait_gl)(struct yagl_eglb_surface */*sfc*/);
+ void (*wait_gl)(struct yagl_thread_state */*cur_ts*/,
+ struct yagl_eglb_surface */*sfc*/);
void (*destroy)(struct yagl_eglb_surface */*sfc*/);
};
{
}
-uint32_t yagl_get_ctx_id(void)
+uint32_t yagl_get_ctx_id(struct yagl_process_state *ps)
{
- assert(cur_ts);
- return cur_ts->ps->egl_iface->get_ctx_id(cur_ts->ps->egl_iface);
+ assert(ps);
+ return ps->egl_iface->get_ctx_id(ps->egl_iface);
}
-void yagl_ensure_ctx(uint32_t ctx_id)
+void yagl_ensure_ctx(struct yagl_process_state *ps, uint32_t ctx_id)
{
- assert(cur_ts);
- cur_ts->ps->egl_iface->ensure_ctx(cur_ts->ps->egl_iface, ctx_id);
+ assert(ps);
+ ps->egl_iface->ensure_ctx(ps->egl_iface, ctx_id);
}
-void yagl_unensure_ctx(uint32_t ctx_id)
+void yagl_unensure_ctx(struct yagl_process_state *ps, uint32_t ctx_id)
{
- assert(cur_ts);
- cur_ts->ps->egl_iface->unensure_ctx(cur_ts->ps->egl_iface, ctx_id);
+ assert(ps);
+ ps->egl_iface->unensure_ctx(ps->egl_iface, ctx_id);
}
* @{
*/
-uint32_t yagl_get_ctx_id(void);
-void yagl_ensure_ctx(uint32_t ctx_id);
-void yagl_unensure_ctx(uint32_t ctx_id);
+uint32_t yagl_get_ctx_id(struct yagl_process_state *ps);
+void yagl_ensure_ctx(struct yagl_process_state *ps, uint32_t ctx_id);
+void yagl_unensure_ctx(struct yagl_process_state *ps, uint32_t ctx_id);
/*
* @}
bool yagl_log_is_enabled_for_func_tracing(void);
+// a helper to allow logging where acquiring PID/TID is not possible
+// ie. on a main server thread. This could be replaced with getting
+// PID/TID via getpid()/gettid()/Windows equivalents.
+#define YAGL_LOG_NO_TS struct yagl_thread_state *cur_ts = NULL
+
#ifndef YAGL_LOG_DISABLE
#define YAGL_LOG_EVENT(log_level, pid, tid, facility, format, ...) \
do \
} \
} while(0)
-// TODO _yagl_log_current_pid/tid must be restored to proper form
-// PID/TID must be read in a different way than via global cur_ts
-#define YAGL_LOG_FUNC_SET(func) \
- const char* _yagl_log_current_func = #func; \
- yagl_pid _yagl_log_current_pid = 0; \
- yagl_tid _yagl_log_current_tid = 0
+#define YAGL_LOG_FUNC_SET_TS(__func, __ts) \
+ const char* _yagl_log_current_func = #__func; \
+ yagl_pid _yagl_log_current_pid = (__ts ? __ts->ps->id : 0); \
+ yagl_tid _yagl_log_current_tid = (__ts ? __ts->id : 0)
+
+#define YAGL_LOG_FUNC_SET(__func) YAGL_LOG_FUNC_SET_TS(__func, cur_ts)
+
+#define YAGL_LOG_FUNC_ENTER_TS(func, __ts, format, ...) \
+ YAGL_LOG_FUNC_SET_TS(func, __ts); \
+ do \
+ { \
+ if ( yagl_log_is_enabled_for_func_tracing() && \
+ yagl_log_is_enabled_for_facility(_yagl_log_current_func) ) \
+ { \
+ yagl_log_func_enter(_yagl_log_current_pid, _yagl_log_current_tid, _yagl_log_current_func, __LINE__, format,##__VA_ARGS__); \
+ } \
+ } while(0)
#define YAGL_LOG_FUNC_ENTER(func, format, ...) \
YAGL_LOG_FUNC_SET(func); \
#include "yagl_log.h"
#include "exec/cpu-all.h"
-bool yagl_mem_put(target_ulong va, const void* data, uint32_t len)
+bool yagl_mem_put(struct yagl_thread_state* cur_ts, target_ulong va, const void* data, uint32_t len)
{
int ret;
return ret != -1;
}
-bool yagl_mem_get(target_ulong va, uint32_t len, void* data)
+bool yagl_mem_get(struct yagl_thread_state* cur_ts, target_ulong va, uint32_t len, void* data)
{
int ret;
#include "yagl_types.h"
-bool yagl_mem_put(target_ulong va, const void *data, uint32_t len);
+bool yagl_mem_put(struct yagl_thread_state* cur_ts, target_ulong va, const void *data, uint32_t len);
-bool yagl_mem_get(target_ulong va, uint32_t len, void *data);
+bool yagl_mem_get(struct yagl_thread_state* cur_ts, target_ulong va, uint32_t len, void *data);
#endif
struct yagl_object
{
yagl_object_name global_name;
+ struct yagl_process_state *ps;
void (*destroy)(struct yagl_object */*obj*/);
};
struct yagl_object_map
{
GHashTable *entries;
+ // TODO object map is per process, might be touched by multiple threads - add mutex
};
struct yagl_object_map *yagl_object_map_create(void);
void yagl_process_state_destroy(struct yagl_process_state *ps)
{
- struct yagl_thread_state *ts, *next;
+ struct yagl_thread_state *ts = NULL, *next = NULL;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_process_state_destroy, NULL);
void yagl_process_register_egl_interface(struct yagl_process_state *ps,
struct yagl_egl_interface *egl_iface)
{
+ YAGL_LOG_NO_TS;
+
YAGL_LOG_FUNC_ENTER(yagl_process_register_egl_interface, NULL);
assert(egl_iface);
void yagl_process_unregister_egl_interface(struct yagl_process_state *ps)
{
+ YAGL_LOG_NO_TS;
+
YAGL_LOG_FUNC_ENTER(yagl_process_unregister_egl_interface, NULL);
assert(ps->egl_iface);
struct yagl_process_state *ps = NULL;
struct yagl_thread_state *ts = NULL;
uint8_t **pages;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_server_dispatch_init, NULL);
yagl_tid target_tid,
uint8_t *buff)
{
- struct yagl_thread_state *ts;
+ struct yagl_thread_state *ts = NULL;
uint32_t i, count = 0;
uint8_t **pages = NULL;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_server_dispatch_update, NULL);
bool sync)
{
struct yagl_thread_state *ts;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_server_dispatch_batch, NULL);
struct yagl_thread_state *ts =
yagl_server_find_thread(ss, target_pid, target_tid);
struct yagl_process_state *ps = NULL;
+ YAGL_LOG_NO_TS;
YAGL_LOG_FUNC_ENTER(yagl_server_dispatch_exit, NULL);
#include "sysemu/kvm.h"
#include "sysemu/hax.h"
-YAGL_DEFINE_TLS(struct yagl_thread_state*, cur_ts);
-
struct yagl_thread_work_item
{
struct work_queue_item base;
static void yagl_thread_work(struct work_queue_item *wq_item)
{
struct yagl_thread_work_item *item = (struct yagl_thread_work_item*)wq_item;
+ struct yagl_thread_state *ts = item->ts;
int i;
uint32_t num_calls = 0;
- struct yagl_transport *t = item->ts->t;
- struct winsys_interface *wsi = item->ts->ps->ss->wsi;
-
- cur_ts = item->ts;
+ struct yagl_transport *t = ts->t;
+ struct winsys_interface *wsi = ts->ps->ss->wsi;
- YAGL_LOG_FUNC_SET(yagl_thread_work);
+ YAGL_LOG_FUNC_SET_TS(yagl_thread_work, ts);
YAGL_LOG_TRACE("batch started");
for (i = 0; i < YAGL_NUM_APIS; ++i) {
- if (cur_ts->ps->api_states[i]) {
- cur_ts->ps->api_states[i]->batch_start(cur_ts->ps->api_states[i]);
+ if (ts->ps->api_states[i]) {
+ ts->ps->api_states[i]->batch_start(ts, ts->ps->api_states[i]);
}
}
break;
}
- api_ps = cur_ts->ps->api_states[api_id - 1];
+ api_ps = ts->ps->api_states[api_id - 1];
if (!api_ps) {
YAGL_LOG_CRITICAL("uninitialized api - %u. host logic error", api_id);
YAGL_LOG_TRACE("batch ended: %u calls", num_calls);
for (i = 0; i < YAGL_NUM_APIS; ++i) {
- if (cur_ts->ps->api_states[i]) {
- cur_ts->ps->api_states[i]->batch_end(cur_ts->ps->api_states[i]);
+ if (ts->ps->api_states[i]) {
+ ts->ps->api_states[i]->batch_end(ts, ts->ps->api_states[i]);
}
}
- cur_ts = NULL;
-
- --item->ts->num_in_progress;
+ --ts->num_in_progress;
if (wsi && item->fence_seq) {
wsi->fence_ack(wsi, item->fence_seq);
ts->ps = ps;
ts->id = id;
ts->t = yagl_transport_create();
-
- cur_ts = ts;
+ ts->t->ts = ts;
if (is_first) {
/*
*/
for (i = 0; i < YAGL_NUM_APIS; ++i) {
- if (ts->ps->ss->apis[i]) {
- ts->ps->api_states[i] = ts->ps->ss->apis[i]->process_init(ts->ps->ss->apis[i]);
- assert(ts->ps->api_states[i]);
+ if (ps->ss->apis[i]) {
+ ps->api_states[i] = ps->ss->apis[i]->process_init(ps, ps->ss->apis[i]);
+ assert(ps->api_states[i]);
}
}
}
*/
for (i = 0; i < YAGL_NUM_APIS; ++i) {
- if (ts->ps->api_states[i]) {
- ts->ps->api_states[i]->thread_init(ts->ps->api_states[i]);
+ if (ps->api_states[i]) {
+ ps->api_states[i]->thread_init(ts, ps->api_states[i]);
}
}
{
int i;
- cur_ts = ts;
-
/*
* Fini APIs (thread).
*/
for (i = 0; i < YAGL_NUM_APIS; ++i) {
if (ts->ps->api_states[i]) {
- ts->ps->api_states[i]->thread_fini(ts->ps->api_states[i]);
+ ts->ps->api_states[i]->thread_fini(ts, ts->ps->api_states[i]);
}
}
for (i = 0; i < YAGL_NUM_APIS; ++i) {
if (ts->ps->api_states[i]) {
- ts->ps->api_states[i]->destroy(ts->ps->api_states[i]);
+ ts->ps->api_states[i]->destroy(ts, ts->ps->api_states[i]);
ts->ps->api_states[i] = NULL;
}
}
}
- cur_ts = NULL;
-
yagl_thread_set_buffer(ts, NULL);
yagl_transport_destroy(ts->t);
*/
};
-YAGL_DECLARE_TLS(struct yagl_thread_state*, cur_ts);
-
struct yagl_thread_state
*yagl_thread_state_create(struct yagl_process_state *ps,
yagl_tid id,
uint32_t size = yagl_transport_uint32_t_at(t,
YAGL_TRANSPORT_BATCH_HEADER_SIZE + *batch_size + ((2 * i + 1) * 8));
- if (!yagl_mem_get(va, size, tmp)) {
+ if (!yagl_mem_get(t->ts, va, size, tmp)) {
yagl_transport_uint32_t_to(t, 0, yagl_call_result_retry);
g_free(batch_data);
return NULL;
struct yagl_transport_in_array *in_array = &t->in_arrays[i];
if ((*in_array->count > 0) && t->direct) {
- if (!yagl_mem_put(in_array->va,
+ if (!yagl_mem_put(t->ts,
+ in_array->va,
yagl_vector_data(&in_array->v),
*in_array->count * in_array->el_size)) {
yagl_transport_uint32_t_to(t, 0, yagl_call_result_retry);
}
QLIST_FOREACH_SAFE(ct, &t->compiled_transfers, entry, tmp) {
- yagl_compiled_transfer_prepare(ct);
+ yagl_compiled_transfer_prepare(t->ts, ct);
}
t->direct = false;
}
}
-const char **yagl_transport_get_out_string_array(const char *data,
+const char **yagl_transport_get_out_string_array(struct yagl_transport *t,
+ const char *data,
int32_t data_count,
int32_t *array_count)
{
struct yagl_vector v;
char *tmp;
- YAGL_LOG_FUNC_SET(yagl_transport_get_out_string_array);
+ YAGL_LOG_FUNC_SET_TS(yagl_transport_get_out_string_array, t->ts);
if (!data) {
*array_count = 0;
*/
uint8_t **pages;
+ struct yagl_thread_state *ts;
/*
* @}
int32_t *maxcount,
int32_t **count);
-const char **yagl_transport_get_out_string_array(const char *data,
+const char **yagl_transport_get_out_string_array(struct yagl_transport *t,
+ const char *data,
int32_t data_count,
int32_t *array_count);
typedef uint32_t yagl_winsys_id;
struct yagl_transport;
+struct yagl_thread_state;
+struct yagl_process_state;
/*
* YaGL supported render types.