[vulkan] Wait on device idle before deleting models
This fixes the textures (and presumably mesh data) being deleted while still in use. Oddly, the wait was needed in both brush and alias models (I expected brush to always come first).
This commit is contained in:
parent
7e6928d7d5
commit
e2f545eb23
|
@ -83,6 +83,8 @@ vulkan_alias_clear (model_t *m, void *data)
|
|||
aliashdr_t *hdr;
|
||||
qfv_alias_mesh_t *mesh;
|
||||
|
||||
QFV_DeviceWaitIdle (device);
|
||||
|
||||
m->needload = true; //FIXME is this right?
|
||||
if (!(hdr = m->aliashdr)) {
|
||||
hdr = Cache_Get (&m->cache);
|
||||
|
|
|
@ -71,6 +71,8 @@ static void vulkan_brush_clear (model_t *mod, void *data)
|
|||
qfv_devfuncs_t *dfunc = device->funcs;
|
||||
mod_brush_t *brush = &mod->brush;
|
||||
|
||||
QFV_DeviceWaitIdle (device);
|
||||
|
||||
for (int i = 0; i < brush->numtextures; i++) {
|
||||
texture_t *tx = brush->textures[i];
|
||||
if (!tx) {
|
||||
|
|
Loading…
Reference in New Issue