So I wanted to modify the VrCuvbeWorld_Vulkan sample provided on the facebook website: https://developer.oculus.com/documentation/native/android/mobile-vrapi/ to add a geometry shader for the Oculus Quest 2. However when I tried to enable the multiviewGeometryShader feature, I was granted by a VK_ERROR_FEATURE_NOT_PRESENT error. And on http://vulkan.gpuinfo.org/displayreport.php?id=10024#features_extensions the feature is said to not be supported.
I just need a geometry shader to calculate a value for each triangle. What would be a viable alternative? On http://vulkan.gpuinfo.org they say that the geometryShader feature is supported. Therefore, is rendering eye by eye without the multiview extension a possible solution ?
If a device supports geometry shaders and also VK_KHR_multiview
, that doesn't mean that both can be used in conjunction. That only works if the multiviewGeometryShader
property is true
. When we looked at this in detail last year, we couldn't find any device (besides some NVIDIA Quardo, I think) that supported multiview with geometry or tessellation shaders.
That means that you'll not be able to use geometry shaders with the VK_KHR_multiview
extension for now. A good alternative could be to use geometry shader instancing and use the geometry shader instance's invocation id to direct rendering into different layers:
gl_Layer = gl_InvocationID;
We have actually written a paper about different variants for multi view rendering in 2020: Fast Multi-View Rendering for Real-Time Applications. The geometry shader instancing variant turned out to be one of the most performant alternatives. We only analyzed desktop, though. Performance characteristics could be different on mobile.