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 ash to 0.34 #2313

Merged
merged 1 commit into from
Dec 23, 2021
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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ block = { version = "0.1", optional = true }
foreign-types = { version = "0.3", optional = true }

# backend: Vulkan
ash = { version = "0.33", optional = true }
ash = { version = "0.34", optional = true, default-features = false, features = ["debug", "loaded"] }
cwfitzgerald marked this conversation as resolved.
Show resolved Hide resolved
gpu-alloc = { version = "0.5", optional = true }
gpu-descriptor = { version = "0.2", optional = true }
inplace_it = { version ="0.3.3", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,8 +1116,8 @@ impl super::Adapter {
let timeline_semaphore_fn = if enabled_extensions.contains(&khr::TimelineSemaphore::name())
{
Some(super::ExtensionFn::Extension(khr::TimelineSemaphore::new(
&self.instance.entry,
&self.instance.raw,
&raw_device,
)))
} else if self.phd_capabilities.properties.api_version >= vk::API_VERSION_1_2 {
Some(super::ExtensionFn::Promoted)
Expand Down
8 changes: 5 additions & 3 deletions wgpu-hal/src/vulkan/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,11 @@ impl crate::CommandEncoder<super::Api> for super::CommandEncoder {
.cmd_set_scissor(self.active, 0, &vk_scissors);
}
unsafe fn set_stencil_reference(&mut self, value: u32) {
self.device
.raw
.cmd_set_stencil_reference(self.active, vk::StencilFaceFlags::all(), value);
self.device.raw.cmd_set_stencil_reference(
self.active,
vk::StencilFaceFlags::FRONT_AND_BACK,
value,
);
}
unsafe fn set_blend_constants(&mut self, color: &[f32; 4]) {
self.device.raw.cmd_set_blend_constants(self.active, color);
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ impl crate::Device<super::Api> for super::Device {
.values(&values);
let result = match self.shared.extension_fns.timeline_semaphore {
Some(super::ExtensionFn::Extension(ref ext)) => {
ext.wait_semaphores(self.shared.raw.handle(), &vk_info, timeout_us)
ext.wait_semaphores(&vk_info, timeout_us)
}
Some(super::ExtensionFn::Promoted) => {
self.shared.raw.wait_semaphores(&vk_info, timeout_us)
Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ impl super::Instance {
let vk_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
.flags(vk::DebugUtilsMessengerCreateFlagsEXT::empty())
.message_severity(severity)
.message_type(vk::DebugUtilsMessageTypeFlagsEXT::all())
.message_type(!vk::DebugUtilsMessageTypeFlagsEXT::empty())
.pfn_user_callback(Some(debug_utils_messenger_callback));
let messenger = extension
.create_debug_utils_messenger(&vk_info, None)
Expand Down Expand Up @@ -438,7 +438,7 @@ impl Drop for super::InstanceShared {

impl crate::Instance<super::Api> for super::Instance {
unsafe fn init(desc: &crate::InstanceDescriptor) -> Result<Self, crate::InstanceError> {
let entry = match ash::Entry::new() {
let entry = match ash::Entry::load() {
Ok(entry) => entry,
Err(err) => {
log::info!("Missing Vulkan entry points: {:?}", err);
Expand Down
4 changes: 1 addition & 3 deletions wgpu-hal/src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,7 @@ impl Fence {
match *self {
Self::TimelineSemaphore(raw) => unsafe {
Ok(match *extension.unwrap() {
ExtensionFn::Extension(ref ext) => {
ext.get_semaphore_counter_value(device.handle(), raw)?
}
ExtensionFn::Extension(ref ext) => ext.get_semaphore_counter_value(raw)?,
ExtensionFn::Promoted => device.get_semaphore_counter_value(raw)?,
})
},
Expand Down