u_gralloc: Add a function that returns gralloc type
This is needed by some drivers to reject the fallback gralloc. Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25256>
This commit is contained in:
committed by
Marge Bot
parent
d923d6234d
commit
8f513813b1
@@ -58,6 +58,7 @@ u_gralloc_create(enum u_gralloc_type type)
|
||||
assert(u_gralloc_cache[type].u_gralloc->ops.get_buffer_basic_info);
|
||||
assert(u_gralloc_cache[type].u_gralloc->ops.destroy);
|
||||
|
||||
u_gralloc_cache[type].u_gralloc->type = u_grallocs[i].type;
|
||||
u_gralloc_cache[type].refcount = 1;
|
||||
|
||||
out_gralloc = u_gralloc_cache[type].u_gralloc;
|
||||
@@ -148,3 +149,9 @@ u_gralloc_get_front_rendering_usage(struct u_gralloc *gralloc,
|
||||
|
||||
return gralloc->ops.get_front_rendering_usage(gralloc, out_usage);
|
||||
}
|
||||
|
||||
int
|
||||
u_gralloc_get_type(struct u_gralloc *gralloc)
|
||||
{
|
||||
return gralloc->type;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user