Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #1904

Merged
merged 3 commits into from
May 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vulkano-shaders/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ proc-macro = true
heck = "0.4"
proc-macro2 = "1.0"
quote = "1.0"
shaderc = "0.7.4"
shaderc = "0.8"
syn = { version = "1.0", features = ["full", "extra-traits"] }
vulkano = { version = "0.29.0", path = "../vulkano" }

Expand Down
2 changes: 1 addition & 1 deletion vulkano-shaders/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub fn compile(
spirv_version: Option<SpirvVersion>,
) -> Result<(CompilationArtifact, Vec<String>), String> {
let includes_tracker = RefCell::new(Vec::new());
let mut compiler = Compiler::new().ok_or("failed to create GLSL compiler")?;
let compiler = Compiler::new().ok_or("failed to create GLSL compiler")?;
let mut compile_options = CompileOptions::new().ok_or("failed to initialize compile option")?;

compile_options.set_target_env(
Expand Down
10 changes: 5 additions & 5 deletions vulkano-win/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ winit_ = ["winit", "metal", "cocoa", "objc"]
raw-window-handle_ = ["raw-window-handle"]

[dependencies]
winit = { version = "0.26", optional = true }
vulkano = { version = "0.29.0", path = "../vulkano" }
raw-window-handle = { version = "0.4", optional = true }
vulkano = { version = "0.29.0", path = "../vulkano" }
winit = { version = "0.26", optional = true }

[target.'cfg(target_os = "macos")'.dependencies]
metal = { version = "0.18.0", optional = true }
cocoa = { version = "0.20.0", optional = true }
objc = { version = "0.2.7", optional = true }
cocoa = { version = "0.24", optional = true }
metal = { version = "0.23", optional = true }
objc = { version = "0.2", optional = true }
4 changes: 2 additions & 2 deletions vulkano-win/src/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ use cocoa::{
base::id as cocoa_id,
};
#[cfg(target_os = "macos")]
use metal::CoreAnimationLayer;
use metal::MetalLayer;
#[cfg(target_os = "macos")]
use objc::runtime::YES;
#[cfg(target_os = "macos")]
Expand All @@ -183,7 +183,7 @@ unsafe fn set_ca_metal_layer_to_winit<W: SafeBorrow<Window>>(win: W) {
use winit::platform::macos::WindowExtMacOS;

let wnd: cocoa_id = mem::transmute(win.borrow().ns_window());
let layer = CoreAnimationLayer::new();
let layer = MetalLayer::new();

layer.set_edge_antialiasing_mask(0);
layer.set_presents_with_transaction(false);
Expand Down
4 changes: 2 additions & 2 deletions vulkano/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ build = "build.rs"
[dependencies]
# When updating Ash, also update vk.xml to the same Vulkan patch version that Ash uses.
# All versions of vk.xml can be found at https://github.com/KhronosGroup/Vulkan-Headers/commits/main/registry/vk.xml.
ash = "0.36"
ash = "0.37"
bytemuck = { version = "1.7", features = ["derive", "extern_crate_std", "min_const_generics"] }
crossbeam-queue = "0.3"
half = "1.8"
lazy_static = "1.4"
nalgebra = { version = "0.30.0", optional = true }
nalgebra = { version = "0.31.0", optional = true }
parking_lot = { version = "0.12", features = ["send_guard"] }
rangemap = { git = "https://github.com/vulkano-rs/rangemap", branch = "range-split" }
shared_library = "0.1"
Expand Down
25 changes: 12 additions & 13 deletions vulkano/src/buffer/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl UnsafeBuffer {
let handle = unsafe {
let fns = device.fns();
let mut output = MaybeUninit::uninit();
check_errors(fns.v1_0.create_buffer(
check_errors((fns.v1_0.create_buffer)(
device.internal_object(),
&create_info.build(),
ptr::null(),
Expand Down Expand Up @@ -218,21 +218,21 @@ impl UnsafeBuffer {
.khr_get_memory_requirements2
{
if self.device.api_version() >= Version::V1_1 {
fns.v1_1.get_buffer_memory_requirements2(
(fns.v1_1.get_buffer_memory_requirements2)(
self.device.internal_object(),
&buffer_memory_requirements_info2,
&mut memory_requirements2,
);
} else {
fns.khr_get_memory_requirements2
.get_buffer_memory_requirements2_khr(
self.device.internal_object(),
&buffer_memory_requirements_info2,
&mut memory_requirements2,
);
(fns.khr_get_memory_requirements2
.get_buffer_memory_requirements2_khr)(
self.device.internal_object(),
&buffer_memory_requirements_info2,
&mut memory_requirements2,
);
}
} else {
fns.v1_0.get_buffer_memory_requirements(
(fns.v1_0.get_buffer_memory_requirements)(
self.device.internal_object(),
self.handle,
&mut memory_requirements2.memory_requirements,
Expand Down Expand Up @@ -286,7 +286,7 @@ impl UnsafeBuffer {
// We check for correctness in debug mode.
debug_assert!({
let mut mem_reqs = MaybeUninit::uninit();
fns.v1_0.get_buffer_memory_requirements(
(fns.v1_0.get_buffer_memory_requirements)(
self.device.internal_object(),
self.handle,
mem_reqs.as_mut_ptr(),
Expand All @@ -312,7 +312,7 @@ impl UnsafeBuffer {
}
}

check_errors(fns.v1_0.bind_buffer_memory(
check_errors((fns.v1_0.bind_buffer_memory)(
self.device.internal_object(),
self.handle,
memory.internal_object(),
Expand Down Expand Up @@ -349,8 +349,7 @@ impl Drop for UnsafeBuffer {
fn drop(&mut self) {
unsafe {
let fns = self.device.fns();
fns.v1_0
.destroy_buffer(self.device.internal_object(), self.handle, ptr::null());
(fns.v1_0.destroy_buffer)(self.device.internal_object(), self.handle, ptr::null());
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions vulkano/src/buffer/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ pub unsafe trait BufferAccess: DeviceOwned + Send + Sync {
buffer: inner.buffer.internal_object(),
..Default::default()
};
let ptr = device
.fns()
.ext_buffer_device_address
.get_buffer_device_address_ext(device.internal_object(), &info);
let fns = device.fns();
let ptr = (fns.ext_buffer_device_address.get_buffer_device_address_ext)(
device.internal_object(),
&info,
);

if ptr == 0 {
panic!("got null ptr from a valid GetBufferDeviceAddressEXT call");
Expand Down
4 changes: 2 additions & 2 deletions vulkano/src/buffer/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ where
let handle = unsafe {
let fns = device.fns();
let mut output = MaybeUninit::uninit();
check_errors(fns.v1_0.create_buffer_view(
check_errors((fns.v1_0.create_buffer_view)(
device.internal_object(),
&create_info,
ptr::null(),
Expand Down Expand Up @@ -241,7 +241,7 @@ where
fn drop(&mut self) {
unsafe {
let fns = self.buffer.inner().buffer.device().fns();
fns.v1_0.destroy_buffer_view(
(fns.v1_0.destroy_buffer_view)(
self.buffer.inner().buffer.device().internal_object(),
self.handle,
ptr::null(),
Expand Down
14 changes: 7 additions & 7 deletions vulkano/src/command_buffer/commands/bind_push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ impl UnsafeCommandBufferBuilder {
let num_bindings = sets.len() as u32;
debug_assert!(first_set + num_bindings <= pipeline_layout.set_layouts().len() as u32);

fns.v1_0.cmd_bind_descriptor_sets(
(fns.v1_0.cmd_bind_descriptor_sets)(
self.handle,
pipeline_bind_point.into(),
pipeline_layout.internal_object(),
Expand All @@ -849,7 +849,7 @@ impl UnsafeCommandBufferBuilder {
debug_assert!(inner.offset < inner.buffer.size());
debug_assert!(inner.buffer.usage().index_buffer);

fns.v1_0.cmd_bind_index_buffer(
(fns.v1_0.cmd_bind_index_buffer)(
self.handle,
inner.buffer.internal_object(),
inner.offset,
Expand All @@ -861,7 +861,7 @@ impl UnsafeCommandBufferBuilder {
#[inline]
pub unsafe fn bind_pipeline_compute(&mut self, pipeline: &ComputePipeline) {
let fns = self.device.fns();
fns.v1_0.cmd_bind_pipeline(
(fns.v1_0.cmd_bind_pipeline)(
self.handle,
ash::vk::PipelineBindPoint::COMPUTE,
pipeline.internal_object(),
Expand All @@ -872,7 +872,7 @@ impl UnsafeCommandBufferBuilder {
#[inline]
pub unsafe fn bind_pipeline_graphics(&mut self, pipeline: &GraphicsPipeline) {
let fns = self.device.fns();
fns.v1_0.cmd_bind_pipeline(
(fns.v1_0.cmd_bind_pipeline)(
self.handle,
ash::vk::PipelineBindPoint::GRAPHICS,
pipeline.internal_object(),
Expand Down Expand Up @@ -909,7 +909,7 @@ impl UnsafeCommandBufferBuilder {
first_binding + num_bindings <= max_bindings
});

fns.v1_0.cmd_bind_vertex_buffers(
(fns.v1_0.cmd_bind_vertex_buffers)(
self.handle,
first_binding,
num_bindings,
Expand Down Expand Up @@ -938,7 +938,7 @@ impl UnsafeCommandBufferBuilder {
debug_assert_eq!(offset % 4, 0);
debug_assert!(size_of_val(data) >= size as usize);

fns.v1_0.cmd_push_constants(
(fns.v1_0.cmd_push_constants)(
self.handle,
pipeline_layout.internal_object(),
stages.into(),
Expand Down Expand Up @@ -1000,7 +1000,7 @@ impl UnsafeCommandBufferBuilder {

let fns = self.device.fns();

fns.khr_push_descriptor.cmd_push_descriptor_set_khr(
(fns.khr_push_descriptor.cmd_push_descriptor_set_khr)(
self.handle,
pipeline_bind_point.into(),
pipeline_layout.internal_object(),
Expand Down
9 changes: 3 additions & 6 deletions vulkano/src/command_buffer/commands/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,7 @@ impl UnsafeCommandBufferBuilder {
};

let fns = self.device.instance().fns();
fns.ext_debug_utils
.cmd_begin_debug_utils_label_ext(self.handle, &label_info);
(fns.ext_debug_utils.cmd_begin_debug_utils_label_ext)(self.handle, &label_info);
}

/// Calls `vkCmdEndDebugUtilsLabelEXT` on the builder.
Expand All @@ -254,8 +253,7 @@ impl UnsafeCommandBufferBuilder {
#[inline]
pub unsafe fn end_debug_utils_label(&mut self) {
let fns = self.device.instance().fns();
fns.ext_debug_utils
.cmd_end_debug_utils_label_ext(self.handle);
(fns.ext_debug_utils.cmd_end_debug_utils_label_ext)(self.handle);
}

/// Calls `vkCmdInsertDebugUtilsLabelEXT` on the builder.
Expand All @@ -279,8 +277,7 @@ impl UnsafeCommandBufferBuilder {
};

let fns = self.device.instance().fns();
fns.ext_debug_utils
.cmd_insert_debug_utils_label_ext(self.handle, &label_info);
(fns.ext_debug_utils.cmd_insert_debug_utils_label_ext)(self.handle, &label_info);
}
}

Expand Down
Loading