diff options
author | Michal Krol <michal@vmware.com> | 2009-09-04 15:38:43 +0200 |
---|---|---|
committer | Michal Krol <michal@vmware.com> | 2009-09-04 15:38:43 +0200 |
commit | ecd8d638c423b71c2e09713f60274ccb389f9be1 (patch) | |
tree | bf911cd1349bb91e1804b46b5594620e3bead4ab /src/gallium/auxiliary/util/u_surface.h | |
parent | c2670f621e6ea338cef2a955cf15cea2ad0525f8 (diff) | |
parent | 4ba872b49bf9412a4b285169381255978d2ccec5 (diff) |
Merge branch 'master' into glsl-pp-rework-1glsl-pp-rework-1
Diffstat (limited to 'src/gallium/auxiliary/util/u_surface.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_surface.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_surface.h b/src/gallium/auxiliary/util/u_surface.h index a5b73cfc20..ce84ed7ad0 100644 --- a/src/gallium/auxiliary/util/u_surface.h +++ b/src/gallium/auxiliary/util/u_surface.h @@ -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, |