Fix some use-before-initialize in bufmgr_fake.
authorEric Anholt <eric@anholt.net>
Fri, 18 May 2007 18:55:00 +0000 (11:55 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 18 May 2007 18:55:00 +0000 (11:55 -0700)
src/mesa/drivers/dri/common/dri_bufmgr_fake.c

index 2519808851e64f8582b665f5907b46f8102a5216..0ef3199d5f3eb232455267572eebd3391d4db877 100644 (file)
@@ -846,6 +846,7 @@ dri_bufmgr_fake_init(unsigned long low_offset, void *low_virtual,
    make_empty_list(&bufmgr_fake->referenced);
    make_empty_list(&bufmgr_fake->fenced);
    make_empty_list(&bufmgr_fake->on_hardware);
+   make_empty_list(&bufmgr_fake->lru);
 
    bufmgr_fake->low_offset = low_offset;
    bufmgr_fake->virtual = low_virtual;
@@ -867,5 +868,9 @@ dri_bufmgr_fake_init(unsigned long low_offset, void *low_virtual,
    bufmgr_fake->bufmgr.fence_reference = dri_fake_fence_reference;
    bufmgr_fake->bufmgr.fence_unreference = dri_fake_fence_unreference;
 
+   bufmgr_fake->fence_emit = fence_emit;
+   bufmgr_fake->fence_wait = fence_wait;
+   bufmgr_fake->driver_priv = driver_priv;
+
    return &bufmgr_fake->bufmgr;
 }