util: Fix surface usage
authorJakob Bornecrantz <jakob@vmware.com>
Wed, 15 Apr 2009 21:33:07 +0000 (23:33 +0200)
committerJakob Bornecrantz <jakob@vmware.com>
Wed, 15 Apr 2009 21:33:07 +0000 (23:33 +0200)
src/gallium/auxiliary/util/u_surface.c

index 8c2c227915073a158de2d841649a189374e1b0c6..85e443204e312a2e1d6270f12230220c7ccc53c9 100644 (file)
@@ -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;
    }