FIx raw Vulkan API

This commit is contained in:
Riccardo Zaglia authored and Dzmitry Malyshau committed 2021-10-22 21:53:20 -04:00
1 parent 29282a3981
commit d46c39af1d
3 files changed
+7 -4

No files matched your search

+3
View File
@@ -85,6 +85,9 @@ pub mod api {
pub use super::vulkan::Api as Vulkan;
}
#[cfg(feature = "vulkan")]
pub use vulkan::UpdateAfterBindTypes;
use std::{
borrow::Borrow,
fmt,
+1 -1
View File
@@ -238,7 +238,7 @@ bitflags::bitflags! {
}
impl UpdateAfterBindTypes {
fn from_limits(limits: &wgt::Limits, phd_limits: &vk::PhysicalDeviceLimits) -> Self {
pub fn from_limits(limits: &wgt::Limits, phd_limits: &vk::PhysicalDeviceLimits) -> Self {
let mut uab_types = UpdateAfterBindTypes::empty();
uab_types.set(
UpdateAfterBindTypes::UNIFORM_BUFFER,
+3 -3
View File
@@ -2158,12 +2158,12 @@ impl Texture {
///
/// - The raw handle obtained from the hal Texture must not be manually destroyed
#[cfg(not(target_arch = "wasm32"))]
pub unsafe fn as_hal<A: wgc::hub::HalApi>(
pub unsafe fn as_hal<A: wgc::hub::HalApi, F: FnOnce(Option<&A::Texture>)>(
&self,
hal_texture_callback: impl FnOnce(Option<&A::Texture>),
hal_texture_callback: F,
) {
self.context
.texture_as_hal::<A, _>(&self.id, hal_texture_callback)
.texture_as_hal::<A, F>(&self.id, hal_texture_callback)
}
/// Creates a view of this texture.