capi: remove potential panics
This commit is contained in:
parent
9b7d6fc014
commit
6782f08820
4 changed files with 5 additions and 5 deletions
|
@ -226,8 +226,8 @@ impl<T: GLInterface> FilterChainImpl<T> {
|
|||
|
||||
// todo: split this out.
|
||||
let (program, ubo_location) = unsafe {
|
||||
let vertex = util::gl_compile_shader(gl::VERTEX_SHADER, glsl.vertex.as_str());
|
||||
let fragment = util::gl_compile_shader(gl::FRAGMENT_SHADER, glsl.fragment.as_str());
|
||||
let vertex = util::gl_compile_shader(gl::VERTEX_SHADER, glsl.vertex.as_str())?;
|
||||
let fragment = util::gl_compile_shader(gl::FRAGMENT_SHADER, glsl.fragment.as_str())?;
|
||||
|
||||
let program = gl::CreateProgram();
|
||||
gl::AttachShader(program, vertex);
|
||||
|
|
|
@ -49,7 +49,7 @@ impl LutTexture {
|
|||
&vulkan.memory_properties,
|
||||
mem_reqs.memory_type_bits,
|
||||
vk::MemoryPropertyFlags::DEVICE_LOCAL,
|
||||
);
|
||||
)?;
|
||||
VulkanImageMemory::new(
|
||||
&vulkan.device,
|
||||
&vk::MemoryAllocateInfo::builder()
|
||||
|
|
|
@ -66,7 +66,7 @@ impl OwnedImage {
|
|||
&mem_props,
|
||||
mem_reqs.memory_type_bits,
|
||||
vk::MemoryPropertyFlags::DEVICE_LOCAL,
|
||||
))
|
||||
)?)
|
||||
.build();
|
||||
|
||||
// todo: optimize by reusing existing memory.
|
||||
|
|
|
@ -71,7 +71,7 @@ impl VulkanBuffer {
|
|||
mem_props,
|
||||
memory_reqs.memory_type_bits,
|
||||
vk::MemoryPropertyFlags::HOST_VISIBLE | vk::MemoryPropertyFlags::HOST_COHERENT,
|
||||
))
|
||||
)?)
|
||||
.build();
|
||||
|
||||
let alloc = device.allocate_memory(&alloc_info, None)?;
|
||||
|
|
Loading…
Add table
Reference in a new issue