| 1871 | } |
| 1872 | |
| 1873 | static void demo_destroy_texture(struct demo *demo, struct texture_object *tex_objs) { |
| 1874 | /* clean up staging resources */ |
| 1875 | vkFreeMemory(demo->device, tex_objs->mem, NULL); |
| 1876 | if (tex_objs->image) vkDestroyImage(demo->device, tex_objs->image, NULL); |
| 1877 | if (tex_objs->buffer) vkDestroyBuffer(demo->device, tex_objs->buffer, NULL); |
| 1878 | } |
| 1879 | |
| 1880 | static void demo_prepare_textures(struct demo *demo) { |
| 1881 | const VkFormat tex_format = VK_FORMAT_R8G8B8A8_SRGB; |