#we really need a VK_ERROR_LAYER_NOT_USEABLE
37 messages ยท Page 1 of 1 (latest)
That sounds like a loader bugโฆ.
๐
If dlopen failed then that should be reported as layer failure. Can you create a github issue for this?
i mean the layer's lib is found but a dependency it needs it not found
Is that dependency not being satisfied during dlopen? Or later during the call down the chain?
i would expect during dlopen
ERROR: /nix/store/y3kdn61k93rq2jx1lj2x72lnsk0l92qh-gcc-13.3.0-lib/lib/libstdc++.so.6: version `CXXABI_1.3.15' not found (required by /nix/store/0njhf38b3dqdlsv6pxpvc14acr5qgm4h-vulkan-validation-layers-1.3.296.0/lib/libVkLayer_khronos_validation.so)
Then def a loader bug
sooo what should be the title?
Good question. Loader should report failure to dlopen library as layer not found. Wait how is the layer being enabled? The error is only returned when enabling the layer through the instance create info struct
yeah it's during instance creation but enumerate returns the layer as found
soo vkEnumerateInstanceLayerProperties says "yes I have layer"
but vkCreateInstance says "no"
which is why the topic of this thread is "give us a new code to say found but can't dlopen" ๐
OH
right
enumerate doesn't check that you can load the layer.
so there really isn't any way to know that the layer isn't possible to use
IDK how this could be implemented without loading all layers found during vkEnumerate, which adds a non-trivial perf overhead :/
hence the "just tell me it can't dlopen" ๐
but... how do I know it can't be dlopene'd without first dlopening it?
do it on vkCreateInstance
doesn't need to say which layer, tho that would be nice
maybe hook the why into debug utils messenger
but at least say "hey I tried to open but can't"
Ahhh okay hmmm so the things to check are that the error logging output of the loader clearly indicates "I TRIED TO LOAD THIS AND IT DIDN"T WORK". Adding a new error message is a LOT of work due to needing an extension. Or does it... but can I return an error code for an extension? Would that have to be enabled to get the error code?!? Frick instance creation nonsense
lol even if it's just "say something if there's a debug utils messenger" that would be great
oh just thought of a better extension, have a VK_EXT_WHY with a VkExplainStruct
you pass this struct to the pnext and then if the function fails it contains some message hinting why
Idle thought - do any of the current device fault extensions support this use case? "reporting more than just an error code?"
I mean the loader will pass messages to that, but its a bit of a 'you have to set it up in the pNext chain of instance create info, and ignore the other warnings'
yeahh
This is a good idea. There's no guarantee that whatever was discovered during vkEnumerate is still valid by the time the app calls vkCreateInstance anyway, right? The new extension thing sounds like the right approach to me: I would make it contain an array of VkResult, with 1 entry per layer requested. Throw in some new VkResult's if needed along with the new struct.
Is the underlying issue that "layer_not_present" isn't sufficient for the nature of how the Vulkan-Loader works?
Imho, it seems a bit nonsensical to develop a big extension when a simple "layer_present_but_failed_to_load" error code would be more sufficient? Sure, per-layer VkResults would be ideal, just thinking about cost of development vs benefit.
I agree. But we also want to make sure we don't have to address this problem twice by not doing enough the first time. I guess it depends on how we would expect applications to react to this error in the best possible way.