diff --git a/examples/src/bin/texture.rs b/examples/src/bin/texture.rs index 62d6bea..3e12002 100644 --- a/examples/src/bin/texture.rs +++ b/examples/src/bin/texture.rs @@ -523,7 +523,7 @@ fn main() { }; let tex_descriptor = vk::DescriptorImageInfo { - image_layout: vk::ImageLayout::GENERAL, + image_layout: vk::ImageLayout::SHADER_READ_ONLY_OPTIMAL, image_view: tex_image_view, sampler: sampler, }; diff --git a/examples/src/lib.rs b/examples/src/lib.rs index f25f514..b2463b1 100644 --- a/examples/src/lib.rs +++ b/examples/src/lib.rs @@ -40,7 +40,6 @@ use std::default::Default; use std::ffi::{CStr, CString}; use std::ops::Drop; use std::os::raw::{c_char, c_void}; -use std::ptr; // Simple offset_of macro akin to C++ offsetof #[macro_export] @@ -127,6 +126,7 @@ unsafe fn create_surface( instance: &I, window: &winit::Window, ) -> Result { + use std::ptr; use winit::os::macos::WindowExt; let wnd: cocoa_id = mem::transmute(window.get_nswindow()); @@ -160,6 +160,7 @@ unsafe fn create_surface( instance: &I, window: &winit::Window, ) -> Result { + use std::ptr; use winapi::shared::windef::HWND; use winapi::um::libloaderapi::GetModuleHandleW; use winit::os::windows::WindowExt;