diff options
Diffstat (limited to 'src/mesa/pipe/p_context.h')
-rw-r--r-- | src/mesa/pipe/p_context.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/pipe/p_context.h b/src/mesa/pipe/p_context.h index 08b9b18393d..3062eda3298 100644 --- a/src/mesa/pipe/p_context.h +++ b/src/mesa/pipe/p_context.h @@ -130,6 +130,10 @@ struct pipe_context { struct pipe_surface *(*surface_alloc)(struct pipe_context *pipe, GLuint format); + struct pipe_surface *(*get_tex_surface)(struct pipe_context *pipe, + struct pipe_mipmap_tree *texture, + GLuint face, GLuint level, + GLuint zslice); /* * Memory region functions @@ -230,5 +234,16 @@ pipe_region_reference(struct pipe_region **dst, struct pipe_region *src) } +static INLINE void +pipe_surface_reference(struct pipe_surface **dst, struct pipe_surface *src) +{ + assert(*dst == NULL); + if (src) { + src->refcount++; + *dst = src; + } +} + + #endif /* PIPE_CONTEXT_H */ |