gallium/util: add a new helper function pipe_buffer_size()
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn> Reviewed-by: Liming Sun <sunliming@kylinos.cn> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17157>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user