mirror of
https://github.com/italicsjenga/portability.git
synced 2025-02-23 17:47:43 +11:00
Merge #130
130: Log gfx errors r=kvark a=grovesNL Adds `error!` to returned `Err`s in a few places – device creation, pipeline creation, and descriptor set allocation. Co-authored-by: Joshua Groves <josh@joshgroves.com>
This commit is contained in:
commit
92554e2d89
1 changed files with 15 additions and 1 deletions
|
@ -756,7 +756,10 @@ pub extern "C" fn gfxCreateDevice(
|
||||||
|
|
||||||
VkResult::VK_SUCCESS
|
VkResult::VK_SUCCESS
|
||||||
}
|
}
|
||||||
Err(err) => conv::map_err_device_creation(err),
|
Err(err) => {
|
||||||
|
error!("{}", err);
|
||||||
|
conv::map_err_device_creation(err)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2101,6 +2104,11 @@ pub extern "C" fn gfxCreateGraphicsPipelines(
|
||||||
};
|
};
|
||||||
|
|
||||||
if pipelines.iter().any(|p| p.is_err()) {
|
if pipelines.iter().any(|p| p.is_err()) {
|
||||||
|
for pipeline in pipelines {
|
||||||
|
if let Err(e) = pipeline {
|
||||||
|
error!("{}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
for op in out_pipelines {
|
for op in out_pipelines {
|
||||||
*op = Handle::null();
|
*op = Handle::null();
|
||||||
}
|
}
|
||||||
|
@ -2192,6 +2200,11 @@ pub extern "C" fn gfxCreateComputePipelines(
|
||||||
};
|
};
|
||||||
|
|
||||||
if pipelines.iter().any(|p| p.is_err()) {
|
if pipelines.iter().any(|p| p.is_err()) {
|
||||||
|
for pipeline in pipelines {
|
||||||
|
if let Err(e) = pipeline {
|
||||||
|
error!("{}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
for op in out_pipelines {
|
for op in out_pipelines {
|
||||||
*op = Handle::null();
|
*op = Handle::null();
|
||||||
}
|
}
|
||||||
|
@ -2457,6 +2470,7 @@ pub extern "C" fn gfxAllocateDescriptorSets(
|
||||||
for set in out_sets.iter_mut() {
|
for set in out_sets.iter_mut() {
|
||||||
*set = Handle::null();
|
*set = Handle::null();
|
||||||
}
|
}
|
||||||
|
error!("{}", e);
|
||||||
match e {
|
match e {
|
||||||
pso::AllocationError::OutOfHostMemory => VkResult::VK_ERROR_OUT_OF_HOST_MEMORY,
|
pso::AllocationError::OutOfHostMemory => VkResult::VK_ERROR_OUT_OF_HOST_MEMORY,
|
||||||
pso::AllocationError::OutOfDeviceMemory => VkResult::VK_ERROR_OUT_OF_DEVICE_MEMORY,
|
pso::AllocationError::OutOfDeviceMemory => VkResult::VK_ERROR_OUT_OF_DEVICE_MEMORY,
|
||||||
|
|
Loading…
Add table
Reference in a new issue