From: Jakob Bornecrantz Date: Wed, 15 Apr 2009 21:33:07 +0000 (+0200) Subject: util: Fix surface usage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a118d46507f4d551cba64014ac0dbbbad493742;p=mesa.git util: Fix surface usage --- diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index 8c2c2279150..85e443204e3 100644 --- a/src/gallium/auxiliary/util/u_surface.c +++ b/src/gallium/auxiliary/util/u_surface.c @@ -90,9 +90,9 @@ util_create_rgba_surface(struct pipe_screen *screen, return FALSE; /* create surface / view into texture */ - *surfaceOut = screen->get_tex_surface(screen, *textureOut, 0, 0, 0, usage); + *surfaceOut = screen->get_tex_surface(screen, *textureOut, 0, 0, 0, PIPE_BUFFER_USAGE_GPU_WRITE); if (!*surfaceOut) { - screen->texture_destroy(*textureOut); + pipe_texture_reference(textureOut, NULL); return FALSE; }