mesa: hook up UUID queries for driver and device
v2: respective changes for new gallium interface v3: fix UUID size asserts Signed-off-by: Andres Rodriguez <andresx7@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:

committed by
Timothy Arceri

parent
95cb776049
commit
b2aaa91e8d
@@ -665,6 +665,26 @@ st_set_background_context(struct gl_context *ctx,
|
||||
smapi->set_background_context(&st->iface, queue_info);
|
||||
}
|
||||
|
||||
static void
|
||||
st_get_device_uuid(struct gl_context *ctx, char *uuid)
|
||||
{
|
||||
struct pipe_screen *screen = st_context(ctx)->pipe->screen;
|
||||
|
||||
assert(GL_UUID_SIZE_EXT >= PIPE_UUID_SIZE);
|
||||
memset(uuid, 0, GL_UUID_SIZE_EXT);
|
||||
screen->get_device_uuid(screen, uuid);
|
||||
}
|
||||
|
||||
static void
|
||||
st_get_driver_uuid(struct gl_context *ctx, char *uuid)
|
||||
{
|
||||
struct pipe_screen *screen = st_context(ctx)->pipe->screen;
|
||||
|
||||
assert(GL_UUID_SIZE_EXT >= PIPE_UUID_SIZE);
|
||||
memset(uuid, 0, GL_UUID_SIZE_EXT);
|
||||
screen->get_driver_uuid(screen, uuid);
|
||||
}
|
||||
|
||||
void st_init_driver_functions(struct pipe_screen *screen,
|
||||
struct dd_function_table *functions)
|
||||
{
|
||||
@@ -711,4 +731,6 @@ void st_init_driver_functions(struct pipe_screen *screen,
|
||||
functions->UpdateState = st_invalidate_state;
|
||||
functions->QueryMemoryInfo = st_query_memory_info;
|
||||
functions->SetBackgroundContext = st_set_background_context;
|
||||
functions->GetDriverUuid = st_get_device_uuid;
|
||||
functions->GetDeviceUuid = st_get_driver_uuid;
|
||||
}
|
||||
|
Reference in New Issue
Block a user