aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_surface.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-11 08:18:52 +0100
committermarha <marha@users.sourceforge.net>2012-01-11 08:18:52 +0100
commit38e661c7d82fa0b34fbe9b3f3261295787bb6427 (patch)
treeef71c86cfe741318555e06dec3e9e2817d731e7a /mesalib/src/gallium/auxiliary/util/u_surface.c
parenta1e97828c89278770cb249039ec92d959440c640 (diff)
downloadvcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.tar.gz
vcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.tar.bz2
vcxsrv-38e661c7d82fa0b34fbe9b3f3261295787bb6427.zip
mesa pixman xserver git update 11 jan 2012
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_surface.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_surface.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_surface.c b/mesalib/src/gallium/auxiliary/util/u_surface.c
index c7fbd3657..a541a38ff 100644
--- a/mesalib/src/gallium/auxiliary/util/u_surface.c
+++ b/mesalib/src/gallium/auxiliary/util/u_surface.c
@@ -42,17 +42,21 @@
#include "util/u_surface.h"
#include "util/u_pack_color.h"
+
+/**
+ * Initialize a pipe_surface object. 'view' is considered to have
+ * uninitialized contents.
+ */
void
-u_surface_default_template(struct pipe_surface *view,
+u_surface_default_template(struct pipe_surface *surf,
const struct pipe_resource *texture,
unsigned bind)
{
- view->format = texture->format;
- view->u.tex.level = 0;
- view->u.tex.first_layer = 0;
- view->u.tex.last_layer = 0;
+ memset(surf, 0, sizeof(*surf));
+
+ surf->format = texture->format;
/* XXX should filter out all non-rt/ds bind flags ? */
- view->usage = bind;
+ surf->usage = bind;
}
/**
@@ -108,7 +112,6 @@ util_create_rgba_surface(struct pipe_context *pipe,
return FALSE;
/* create surface */
- memset(&surf_templ, 0, sizeof(surf_templ));
u_surface_default_template(&surf_templ, *textureOut, bind);
/* create surface / view into texture */
*surfaceOut = pipe->create_surface(pipe,