util: added util_same_surface() helper function
This commit is contained in:
@@ -37,6 +37,23 @@ struct pipe_texture;
|
||||
struct pipe_surface;
|
||||
|
||||
|
||||
/**
|
||||
* Are s1 and s2 the same surface?
|
||||
* Surfaces are basically views into textures so check if the two surfaces
|
||||
* name the same part of the same texture.
|
||||
*/
|
||||
static INLINE boolean
|
||||
util_same_surface(const struct pipe_surface *s1, const struct pipe_surface *s2)
|
||||
{
|
||||
return (s1->texture == s2->texture &&
|
||||
s1->face == s2->face &&
|
||||
s1->level == s2->level &&
|
||||
s1->zslice == s2->zslice);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extern boolean
|
||||
util_create_rgba_surface(struct pipe_screen *screen,
|
||||
uint width, uint height,
|
||||
|
Reference in New Issue
Block a user