vulkan: compute return from process on invalid buffer id

Combined with the blit filter the process function of the source is
often called without a valid buffer, which results in a crash. This hack
mitigates this.
This commit is contained in:
columbarius 2023-08-28 15:51:00 +02:00
parent 560b26a5b5
commit f7b036764a

View file

@ -149,6 +149,11 @@ static int updateDescriptors(struct vulkan_compute_state *s)
};
descriptorSetLen++;
}
// Abort process if any buffer is not valid
if (s->streams[0].current_buffer_id == SPA_ID_INVALID
|| (s->n_streams == 2 && s->streams[1].current_buffer_id == SPA_ID_INVALID))
return -1;
vkUpdateDescriptorSets(s->base.device, descriptorSetLen,
writeDescriptorSet, 0, NULL);