From b8640b4752ddc6b751a6447501d6f8f248503e39 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 10 Jun 2015 16:16:22 -0600 Subject: tri: Must destroy object before freeing it's memory Due to spec change that makes a bound object immutable, an object must be destroyed before any memory bound to it is freed. --- demos/tri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/tri.c b/demos/tri.c index ffebfe89..1eca9b6e 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -602,8 +602,8 @@ static void demo_prepare_texture_image(struct demo *demo, static void demo_destroy_texture_image(struct demo *demo, struct texture_object *tex_obj) { /* clean up staging resources */ - vkFreeMemory(demo->device, tex_obj->mem); vkDestroyObject(demo->device, VK_OBJECT_TYPE_IMAGE, tex_obj->image); + vkFreeMemory(demo->device, tex_obj->mem); } static void demo_prepare_textures(struct demo *demo) -- cgit v1.2.3