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

vk: ignore non-coherent host-visible memory types #153

Merged
merged 1 commit into from
Aug 4, 2024
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
21 changes: 18 additions & 3 deletions blade-graphics/src/vulkan/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,10 +608,25 @@ impl super::Context {
| vk::MemoryPropertyFlags::HOST_CACHED
| vk::MemoryPropertyFlags::LAZILY_ALLOCATED;
let valid_ash_memory_types = memory_types.iter().enumerate().fold(0, |u, (i, mem)| {
if known_memory_flags.contains(mem.property_flags) {
u | (1 << i)
} else {
if !known_memory_flags.contains(mem.property_flags) {
log::debug!(
"Skipping memory type={} for having unknown flags: {:?}",
i,
mem.property_flags & !known_memory_flags
);
u
} else if mem
.property_flags
.contains(vk::MemoryPropertyFlags::HOST_VISIBLE)
&& !mem
.property_flags
.contains(vk::MemoryPropertyFlags::HOST_COHERENT)
{
//TODO: see if and how we can support this
log::debug!("Skipping memory type={} for lack of host coherency", i);
u
} else {
u | (1 << i)
}
});
super::MemoryManager {
Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ Changelog for Blade
- option to disable exclusive fullscreen
- VK: using linear sRGB color space if available
- exposed initialization errors
- exposed device information
- Vk:
- fixed initial RAM consumption
- worked around Intel descriptor memory allocation bug
- fixed coherent memory requirements
- GLES:
- support for storage buffer and compute
- scissor rects, able to run "particle" example
Expand Down
Loading