scenerygraphics / scenery

Flexible VR Visualisation for Volumetric and Geometric Data on the Java VM, powered by Kotlin and Vulkan.
https://scenery.graphics
GNU Lesser General Public License v3.0
128 stars 31 forks source link

LineExample renders triangles instead of lines #679

Closed kephale closed 3 months ago

kephale commented 5 months ago

Describe the bug

When I run LineExample on the current version of main with azul zulu 21, the lines are rendered as triangles.

image

I also get this output:

[main] INFO LineExample - Started application as PID 84806 on MACOSX/ARM64
[main] INFO VulkanRenderer - Loaded Deferred Shading (Deferred Shading, with HDR postprocessing and FXAA)
2024-02-02 20:35:08.762 java[84806:801407] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
[main] INFO VulkanRenderer - Creating Vulkan instance with extensions VK_MVK_macos_surface,VK_KHR_surface,VK_KHR_surface,VK_EXT_metal_surface and layers 
[main] INFO VulkanRenderer - Available special-purpose swapchains are: SwingSwapchain, HeadlessSwapchain, OpenGLSwapchain
[main] INFO Companion - Physical devices: 
[main] INFO Companion -   0: 🍎 Apple M1 Pro (IntegratedGPU, driver version 0.2.2014, Vulkan API 1.2.261) (selected)
[main] INFO VulkanDevice - Creating 1 distinct queue groups
[main] INFO VulkanRenderer - Using swapchain SwingSwapchain
[main] INFO VulkanRenderer - Renderer initialisation complete.
[main] INFO InputHandler - No custom key configuration found, using default keybindings.
[main] INFO VulkanRenderer - Recreating Swapchain at frame 0 (SwingSwapchain)
[main] INFO SwingSwapchain - Present queue is 0, graphics queue is 0
[main] INFO SwingSwapchain - Selected present mode: VK_PRESENT_MODE_FIFO_KHR with 3 images
[main] INFO Companion - Creating render framebuffer GeometryBuffer for pass Scene (1024x1024)
[main] INFO Companion -  + attachment NormalsMaterial, RGBA_Float16
[main] INFO Companion -  + attachment DiffuseAlbedo, RGBA_UInt8
[main] INFO Companion -  + attachment ZBuffer, Depth32
[main] INFO Companion - Creating render framebuffer AOTemp1 for pass AO (1024x1024)
[main] INFO Companion -  + attachment Occlusion, RGBA_UInt8
[main] INFO Companion - Creating render framebuffer AOTemp2 for pass AOBlurV (1024x1024)
[main] INFO Companion -  + attachment Occlusion, RGBA_UInt8
[main] INFO Companion - Creating render framebuffer AOBuffer for pass AOBlurH (512x512)
[main] INFO Companion -  + attachment Occlusion, RGBA_UInt8
[main] INFO Companion - Creating render framebuffer ForwardBuffer for pass DeferredLighting (1024x1024)
[main] INFO Companion -  + attachment Color, RGBA_Float16
[main] INFO Companion - Creating render framebuffer HDRBuffer for pass ForwardShading (1024x1024)
[main] INFO Companion -  + attachment Color, RGBA_Float16
[main] INFO Companion -  + attachment Depth, Depth32
[main] INFO Companion - Creating render framebuffer FXAABuffer for pass HDR (1024x1024)
[main] INFO Companion -  + attachment Color, RGBA_UInt8
[main] INFO VulkanRenderer - Scene initialization started.
[main] INFO VulkanRenderer - Scene initialization complete, took 37.904675 ms.
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[Thread-0] INFO LineExample - Full startup took 3159ms
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline
[main] ERROR VulkanPipeline - Pipeline VulkanPipeline (LINE -> 0x29E840200, TRIANGLE_STRIP -> 0x29D8C7000, POINTS -> 0x29E835200, POLYGON -> 0x119353000, TRIANGLES -> 0x29D8A6E00) does not contain a fitting pipeline for LINE_STRIP_ADJACENCY, return triangle pipeline

Desktop (please complete the following information):

Additional context

This was first reported in https://github.com/scenerygraphics/sciview/issues/467

skalarproduktraum commented 3 months ago

This is not directly fixable, macOS does not support geometry shaders.

kephale commented 3 months ago

LOL, but should we pull out the Line demo from sciview then?

skalarproduktraum commented 3 months ago

Either that, or fall back to the regular line primitive.

kephale commented 3 months ago

Ok, I'll just pull it from sciview. This would need to be fixed in Line in scenery otherwise. Plus we have Line3D in sciview which is what we use for SNT anyway.