diff options
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_resource.h')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_resource.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_resource.h b/src/gallium/drivers/ilo/ilo_resource.h index 5af9cc1b440..b0eab5b9c0e 100644 --- a/src/gallium/drivers/ilo/ilo_resource.h +++ b/src/gallium/drivers/ilo/ilo_resource.h @@ -160,6 +160,16 @@ ilo_buffer_rename_bo(struct ilo_buffer *buf); bool ilo_texture_rename_bo(struct ilo_texture *tex); +/** + * Return the bo of the resource. + */ +static inline struct intel_bo * +ilo_resource_get_bo(struct pipe_resource *res) +{ + return (res->target == PIPE_BUFFER) ? + ilo_buffer(res)->bo : ilo_texture(res)->bo; +} + static inline struct ilo_texture_slice * ilo_texture_get_slice(const struct ilo_texture *tex, unsigned level, unsigned slice) |