From 5a118d46507f4d551cba64014ac0dbbbad493742 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 15 Apr 2009 23:33:07 +0200 Subject: util: Fix surface usage --- src/gallium/auxiliary/util/u_surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c index 8c2c227915..85e443204e 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; } -- cgit v1.2.3