diff options
author | Emil Velikov <[email protected]> | 2015-10-28 11:14:02 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-30 17:37:09 +0000 |
commit | 7af46b9c747cbd503a2b97f00f1c603f1b75aaff (patch) | |
tree | 0970fb5071007a6b88d7448841b11a2a85450e8d /src/gallium/drivers/virgl/virgl_resource.h | |
parent | 6b123fa07ff9d73d6e67416c2372eab5c17282b6 (diff) |
virgl: introduce and use virgl_transfer/texture/resource inline wrappers
The only two remaining cases of (struct virgl_resource *) require a
closer look. Either the error checking is missing or the arguments
provided feel wrong.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_resource.h')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_resource.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_resource.h b/src/gallium/drivers/virgl/virgl_resource.h index 2d0bd8b6400..cae83214ae3 100644 --- a/src/gallium/drivers/virgl/virgl_resource.h +++ b/src/gallium/drivers/virgl/virgl_resource.h @@ -94,6 +94,16 @@ static inline struct virgl_buffer *virgl_buffer(struct pipe_resource *r) return (struct virgl_buffer *)r; } +static inline struct virgl_texture *virgl_texture(struct pipe_resource *r) +{ + return (struct virgl_texture *)r; +} + +static inline struct virgl_transfer *virgl_transfer(struct pipe_transfer *trans) +{ + return (struct virgl_transfer *)trans; +} + struct pipe_resource *virgl_buffer_create(struct virgl_screen *vs, const struct pipe_resource *templ); |