summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorAndres Rodriguez <[email protected]>2017-07-12 18:45:24 -0400
committerTimothy Arceri <[email protected]>2017-08-06 12:42:07 +1000
commitb2aaa91e8db006adbd2ca672756b3fdb23c5b589 (patch)
tree58ecbc664e2fdd195680c3f44d27ffa24333e672 /src/mesa/state_tracker
parent95cb7760493f92410faaf2214d5abe4b5fdaf308 (diff)
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 <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_context.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2420e743630..ef2e73e7415 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -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;
}