mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 22:41:07 +01:00
fix(vulkan): Remove extra restriction in OOM check (#9838)
This commit is contained in:
1 parent
0f8b114e16
commit
2ea5880317
1 file changed
-6
@@ -911,10 +911,6 @@ impl super::Device {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
// memory types not used by gpu-allocator
|
||||
let invalid_flags =
|
||||
vk::MemoryPropertyFlags::LAZILY_ALLOCATED | vk::MemoryPropertyFlags::PROTECTED;
|
||||
|
||||
let preferred_flags = match location {
|
||||
MemoryLocation::GpuOnly => vk::MemoryPropertyFlags::DEVICE_LOCAL,
|
||||
MemoryLocation::CpuToGpu => {
|
||||
@@ -937,7 +933,6 @@ impl super::Device {
|
||||
.find(|(i, ty)| {
|
||||
(1 << i) & requirements.memory_type_bits != 0
|
||||
&& ty.property_flags.contains(preferred_flags)
|
||||
&& !ty.property_flags.intersects(invalid_flags)
|
||||
});
|
||||
|
||||
if selected_heap.is_none() {
|
||||
@@ -955,7 +950,6 @@ impl super::Device {
|
||||
.find(|(i, ty)| {
|
||||
(1 << i) & requirements.memory_type_bits != 0
|
||||
&& ty.property_flags.contains(required_flags)
|
||||
&& !ty.property_flags.intersects(invalid_flags)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user