Mesa (gallium-s3tc): util: Fix surface usage

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Wed Apr 15 21:38:55 UTC 2009


Module: Mesa
Branch: gallium-s3tc
Commit: 5a118d46507f4d551cba64014ac0dbbbad493742
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5a118d46507f4d551cba64014ac0dbbbad493742

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Wed Apr 15 23:33:07 2009 +0200

util: Fix surface usage

---

 src/gallium/auxiliary/util/u_surface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_surface.c b/src/gallium/auxiliary/util/u_surface.c
index 8c2c227..85e4432 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;
    }
 




More information about the mesa-commit mailing list