Ray tracing samples fail to run on Vulkan 1.2+ Adreno devices due to unnecessary extension requirements
The ray tracing samples (ray_queries, ray_tracing_basic, ray_tracing_extended, etc.) unconditionally request VK_KHR_spirv_1_4 and VK_KHR_shader_float_controls , even though unnecessary on Vulkan 1.2+ devices, On Adreno proprietary drivers (Vulkan 1.2+ as I specified) , this causes device creation to fail with VK_ERROR_EXTENSION_NOT_PRESENT, even though the hardware fully supports ray queries and ray tracing pipelines.
Suggested solution:
Wrap the extension requests in a Vulkan version check, So that if device is Vulkan 1.2+ It'd by nature already have these , Doing that fixes the crash and allows the Sample to run as normal, I have tested it and the crash stops happening, I have confirmed this on My snapdragon 8s gen 4 (Adreno 825) Which supports Vulkan 1.3+ Note: device exposes shader float controls but crash happens anyway.
Thanks. Doing a version test and adjust accordingly is indeed an option we could easily implement.
Just checked and there is one issue with doing this: We're getting validation errors for the shaders due to the SPIR-V version we use to compile them.
But I just looked at a device with the GPU you refer to (lin and that does support both VK_KHR_spirv_1_4 and VK_KHR_shader_float_controls. Can you post a link to your device, so I can check?
ok so It seems to be way more complicated than I thought, I have to check if the profiler IS what's causing this bug (it adds extra extensions to my phone but it might be causing the bug) , it claims VK_KHR_spirv_1_4 and VK_KHR_shader_float_controls indeed but it just doesn't work, This is either: due to profiler Messing it up or driver , I'll redownload the samples without modification and compare, note that at the time of writing this report I had no idea profiler did this.
alright, I have confirmed: this wouldn't happen on a normal device, the profiler itself messed with the driver and made it fail if an app requested VK_KHR_spirv_1_4 and VK_KHR_shader_float_controls even though they're listed in extension list, Sorry about this I didn't know the profiler enabled extras (Infact it even added extensions like ray tracing pipeline which weren't present on my device before)
No need to be sorry ;) Thanks for confirming 👍🏻