Closed Octaeon closed 4 months ago
Sorry for the long delay in responding.
The error is referring to an unknown bitflag being provided for the message_type
field here:
So the issue is that vk::DebugUtilsMessageTypeFlagsEXT::all()
is returning one or more bitflags not supported by your Vulkan implementation. Taking a look at the definition provided by vulkanalia
:
I imagine the culprit here is DEVICE_ADDRESS_BINDING
which is seemingly only provided by this extension:
https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_device_address_binding_report.html
Despite that, it works on my machine, but perhaps this flag gets rejected by some Vulkan implementations if that extension is not enabled. I think if you replaced the relevant in the code in the tutorial with this so that you avoid using that non-standard flag it should work:
let mut debug_info = vk::DebugUtilsMessengerCreateInfoEXT::builder()
.message_severity(vk::DebugUtilsMessageSeverityFlagsEXT::all())
.message_type(
vk::DebugUtilsMessageTypeFlagsEXT::GENERAL
| vk::DebugUtilsMessageTypeFlagsEXT::PERFORMANCE
| vk::DebugUtilsMessageTypeFlagsEXT::VALIDATION,
)
.user_callback(Some(debug_callback));
More generally, this sort of thing is probably a good reason to avoid using ::all()
for bitmasks with this library. I'll update the tutorial with this change and add a note about why ::all()
can cause problems.
Thanks! I did what you suggested and it works fine.
I'm trying to follow along the vulkan tutorial in Rust and I'm at the validation layers chapter. After setting the custom message callback, I get this error:
At first, I thought I did something wrong, so I went to the source code of the tutorial and copied the entirety of it, replacing my entire main.rs file (at some points I wrote the code myself instead of simply copy-pasting, so I thought I made an error somewhere), but it's still there.
I didn't want to bother with rewriting the dependencies, so I copied them wholesale from the tutorial, so no possibility of issue there (I checked). I noticed that the
Cargo.toml
file in the tutorial section of the repo hasedition = "2018"
, while I had 2021, so I changed it to 2018, it didn't fix the issue.I also have the newest version of Vulkan (installed through apt, I checked, it's up to date), and I'm regularly updating my OS.
Some OS/program info: I'm on Linux, specifically Pop Os 22.04 LTS x86_64. I'm using the newest version of Rust, and this is the output I get from
rustc --version
:vkcube runs without problems. I will attach the full output of the
vulkaninfo
command as a file here, since it's way too long for a GitHub issue.One last relevant fact I can give is that when I ran
vulkaninfo
, this showed up at the very beginning of the output:That's all that I was able to gather. I tried to read the vulkan docs, but there's a reason I'm following the tutorial and not them... they're damn near impenetrable.
If there's anything else I should share about what I did, do tell.
Thanks.