mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 00:11:11 +01:00
FIx raw Vulkan API
This commit is contained in:
1 parent
29282a3981
commit
d46c39af1d
3 files changed
+7
-4
No files matched your search
@@ -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,
|
||||
|
||||
@@ -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
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user