/*@}*/
/**
- * Indicate that this thread is being used by Mesa as a background drawing
- * thread for the given GL context.
- *
- * If this function is called more than once from any given thread, each
- * subsequent call overrides the context that was passed in the previous
- * call. Mesa takes advantage of this to re-use a background thread to
- * perform drawing on behalf of multiple contexts.
- *
- * Mesa may sometimes call this function from a non-background thread
- * (i.e. a thread that has already been bound to a context using
- * __DriverAPIRec::MakeCurrent()); when this happens, ctx will be equal to
- * the context that is bound to this thread.
- *
- * Mesa will only call this function if GL multithreading is enabled.
- */
- void (*SetBackgroundContext)(struct gl_context *ctx,
- struct util_queue_monitoring *queue_info);
-
- /**
* \name GL_ARB_sparse_buffer interface
*/
/*@{*/
struct gl_buffer_object *bufObj);
/**
- * Fill uuid with an unique identifier for this driver
- *
- * uuid must point to GL_UUID_SIZE_EXT bytes of available memory
- */
- void (*GetDriverUuid)(struct gl_context *ctx, char *uuid);
-
- /**
- * Fill uuid with an unique identifier for the device associated
- * to this driver
- *
- * uuid must point to GL_UUID_SIZE_EXT bytes of available memory
- */
- void (*GetDeviceUuid)(struct gl_context *ctx, char *uuid);
-
- /*@}*/
-
- /**
* \name GL_ARB_get_program_binary
*/
/*@{*/
#include "util/u_thread.h"
#include "util/u_cpu_detect.h"
+#include "state_tracker/st_context.h"
static void
glthread_unmarshal_batch(void *job, void *gdata, int thread_index)
{
struct gl_context *ctx = (struct gl_context*)job;
- ctx->Driver.SetBackgroundContext(ctx, &ctx->GLThread.stats);
+ st_set_background_context(ctx, &ctx->GLThread.stats);
_glapi_set_context(ctx);
}
#include "version.h"
#include "git_sha1.h"
+#include "state_tracker/st_context.h"
+
static simple_mtx_t override_lock = _SIMPLE_MTX_INITIALIZER_NP;
/**
void
_mesa_get_driver_uuid(struct gl_context *ctx, GLint *uuid)
{
- ctx->Driver.GetDriverUuid(ctx, (char*) uuid);
+ st_get_driver_uuid(ctx, (char*) uuid);
}
void
_mesa_get_device_uuid(struct gl_context *ctx, GLint *uuid)
{
- ctx->Driver.GetDeviceUuid(ctx, (char*) uuid);
+ st_get_device_uuid(ctx, (char*) uuid);
}
/**
}
-static void
+void
st_set_background_context(struct gl_context *ctx,
struct util_queue_monitoring *queue_info)
{
}
-static void
+void
st_get_device_uuid(struct gl_context *ctx, char *uuid)
{
struct pipe_screen *screen = st_context(ctx)->screen;
}
-static void
+void
st_get_driver_uuid(struct gl_context *ctx, char *uuid)
{
struct pipe_screen *screen = st_context(ctx)->screen;
if (screen->get_param(screen, PIPE_CAP_STRING_MARKER))
functions->EmitStringMarker = st_emit_string_marker;
- functions->SetBackgroundContext = st_set_background_context;
- functions->GetDriverUuid = st_get_driver_uuid;
- functions->GetDeviceUuid = st_get_device_uuid;
-
/* GL_ARB_get_program_binary */
functions->GetProgramBinaryDriverSHA1 = st_get_program_binary_driver_sha1;
void st_query_memory_info(struct gl_context *ctx, struct gl_memory_info *out);
void st_invalidate_state(struct gl_context *ctx);
-
+void st_get_driver_uuid(struct gl_context *ctx, char *uuid);
+void st_get_device_uuid(struct gl_context *ctx, char *uuid);
+void st_set_background_context(struct gl_context *ctx,
+ struct util_queue_monitoring *queue_info);
#ifdef __cplusplus
}
#endif