diff options
author | Emil Velikov <[email protected]> | 2015-10-28 10:48:31 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-10-30 17:37:08 +0000 |
commit | 6b123fa07ff9d73d6e67416c2372eab5c17282b6 (patch) | |
tree | 4a77a0546c32450d71a7d49608ba1f9725f07c24 /src/gallium/drivers/virgl/virgl_context.h | |
parent | 1f43e4e1a3395592a9d0843cdba725a2ea45fa74 (diff) |
virgl: add virgl_context/sampler_view/so_target() upcast wrappers
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_context.h')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_context.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_context.h b/src/gallium/drivers/virgl/virgl_context.h index 948ea2d552b..3d8d3ce8bd4 100644 --- a/src/gallium/drivers/virgl/virgl_context.h +++ b/src/gallium/drivers/virgl/virgl_context.h @@ -79,6 +79,23 @@ struct virgl_context { uint32_t hw_sub_ctx_id; }; +static inline struct virgl_sampler_view * +virgl_sampler_view(struct pipe_sampler_view *view) +{ + return (struct virgl_sampler_view *)view; +}; + +static inline struct virgl_so_target * +virgl_so_target(struct pipe_stream_output_target *target) +{ + return (struct virgl_so_target *)target; +} + +static inline struct virgl_context *virgl_context(struct pipe_context *ctx) +{ + return (struct virgl_context *)ctx; +} + struct pipe_context *virgl_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags); |