compiler: Add mesa_scope_name() function
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23328>
This commit is contained in:
@@ -444,3 +444,18 @@ num_mesh_vertices_per_primitive(unsigned prim)
|
||||
unreachable("invalid mesh shader primitive type");
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
mesa_scope_name(mesa_scope scope)
|
||||
{
|
||||
static const char *names[] = {
|
||||
ENUM(SCOPE_NONE),
|
||||
ENUM(SCOPE_INVOCATION),
|
||||
ENUM(SCOPE_SUBGROUP),
|
||||
ENUM(SCOPE_SHADER_CALL),
|
||||
ENUM(SCOPE_WORKGROUP),
|
||||
ENUM(SCOPE_QUEUE_FAMILY),
|
||||
ENUM(SCOPE_DEVICE),
|
||||
};
|
||||
return NAME(scope);
|
||||
}
|
||||
|
||||
@@ -1387,6 +1387,8 @@ typedef enum {
|
||||
SCOPE_DEVICE,
|
||||
} mesa_scope;
|
||||
|
||||
const char *mesa_scope_name(mesa_scope scope);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user