Fixed crash with NULL current_descriptor_sets.

After we create image we consider it becomes bound to current tmu, so we should update current_descriptor_sets in vk_create_image.
This commit is contained in:
Artem Kharytoniuk
2017-05-09 23:35:43 +03:00
parent 4b18f5b2ad
commit 626cc415d9
2 changed files with 1 additions and 1 deletions

View File

@@ -718,7 +718,6 @@ void RE_UploadCinematic (int w, int h, int cols, int rows, const byte *data, int
vkFreeDescriptorSets(vk.device, vk.descriptor_pool, 1, &image.descriptor_set);
image = vk_create_image(cols, rows, 1, false);
vk_upload_image_data(image.handle, cols, rows, false, data);
vk_resources.current_descriptor_sets[glState.currenttmu] = image.descriptor_set;
}
} else {
if (dirty) {

View File

@@ -1292,6 +1292,7 @@ Vk_Image vk_create_image(int width, int height, int mip_levels, bool repeat_text
VK_CHECK(vkAllocateDescriptorSets(vk.device, &desc, &image.descriptor_set));
vk_update_descriptor_set(image.descriptor_set, image.view, mip_levels > 1, repeat_texture);
vk_resources.current_descriptor_sets[glState.currenttmu] = image.descriptor_set;
}
return image;