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:
Andres Rodriguez
2017-07-12 18:45:24 -04:00
committed by Timothy Arceri
parent 95cb776049
commit b2aaa91e8d
5 changed files with 73 additions and 0 deletions

View File

@@ -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;
}