diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h index 1f1215c7ff0..1e6ec06c95f 100644 --- a/src/gallium/auxiliary/util/u_inlines.h +++ b/src/gallium/auxiliary/util/u_inlines.h @@ -319,6 +319,13 @@ pipe_surface_equal(struct pipe_surface *s1, struct pipe_surface *s2) */ +static inline unsigned +pipe_buffer_size(const struct pipe_resource *buffer) +{ + return buffer->width0; +} + + /** * Create a new resource. * \param bind bitmask of PIPE_BIND_x flags