OSDN Git Service

softpipe: initialize refcount and winsys
authorJerome Glisse <glisse@freedesktop.org>
Thu, 18 Dec 2008 18:56:45 +0000 (19:56 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 22 Dec 2008 18:56:20 +0000 (18:56 +0000)
src/gallium/drivers/softpipe/sp_texture.c

index 84a497c..0cb4b2f 100644 (file)
@@ -219,6 +219,8 @@ softpipe_get_tex_surface(struct pipe_screen *screen,
    assert(level <= pt->last_level);
 
    ps = CALLOC_STRUCT(pipe_surface);
+   ps->refcount = 1;
+   ps->winsys = ws;
    if (ps) {
       assert(ps->refcount);
       assert(ps->winsys);