mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-06 06:46:29 -04:00
vulkan: handle mmap failure
This commit is contained in:
parent
59a5392850
commit
bceaf1a212
1 changed files with 5 additions and 0 deletions
|
|
@ -176,6 +176,11 @@ static VkShaderModule createShaderModule(struct vulkan_compute_state *s, const c
|
|||
}
|
||||
|
||||
data = mmap(NULL, stat.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||
if (data == MAP_FAILED) {
|
||||
spa_log_error(s->log, "can't mmap %s: %m", shaderFile);
|
||||
close(fd);
|
||||
return VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
const VkShaderModuleCreateInfo shaderModuleCreateInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue