Skip to content

Feature/lwjgl vulkan#1250

Draft
arcturus2 wants to merge 165 commits into
masterfrom
feature/LWJGL-Vulkan
Draft

Feature/lwjgl vulkan#1250
arcturus2 wants to merge 165 commits into
masterfrom
feature/LWJGL-Vulkan

Conversation

@arcturus2

Copy link
Copy Markdown
Contributor

Description of the Change

Alternate Designs

Why Should This Be In Core?

Benefits

Possible Drawbacks

Verification Process

Applicable Issues

TheTimurid and others added 30 commits May 13, 2020 16:46
* Stubbed in some of the JOGL specific classes we need to functionally
 replace and commented out a bunch of code.
* This will compile but do not expect new graph to work yet.
* attempt to add LWJGL-GLFW but so far importing it in code reports a
 package not found.
… the JPanel. Rendering callbacks are not occurring as expected though.
* pulled out all of the JOGAMP packages and references.
* pulled out JOCL (JOGAMP and Apache) as it wasn't used.
* pulled out newt as it wasn't used.
* replaced some of the direct buffer creation calls with LWJGL BufferUtils
  equivalents.  Code hasn't run and thus is not tested.
* replaced a bunch of instance gl.blah with GL30.blah for static methods.
* This may need to be revisited but atm I just wanted to reduce the large
  number of warnings.
* added resize listener to visual processor
* Added CoreVulkanDisplay object.
* Vulkan initialisation of instance and physical device.
* Added another step to the graph open to split the Vulkan resources initialisation so the latter can be done after the outer JPanel has been added to its parent chain.  Before then we cannot lock the surface in order to get the native handle to it needed for some of the Vulkan setup.
* Removed LWJGL-OpenGL dependency.
* Pull javadoc and sources for some LWJGL dependencies.
* Commented out most of the functions of the GL helper and renderable classes.
* More Vulkan init code
* Added logger setup, it's not formatted in a readable way atm though.
* Start interfacing the display modules.
* Refactored the VKRenderer into 6 logical classes.
* Finally clearing the back buffer.
* Added a hack for constant rendering (debugging only)
* Fix a crash resizing as CVKVisualProcessor was calling the canvas's paint in it's own thread.  Repaint will queue a paint in the AWT thread.
* Other changes around resizing.
* CVKScenemanager will now be the input handler.  In the OpenGL display module this is handled by GraphRenderable.
…murid/constellation into feature/Migrate-renderer-to-Vulkan
* CVKSceneManger -> CVKScene as we only have one scene per graph
* Hackity hack hack
* Started a rough (hackity hack hack) go at a simple icon (name is deceptive, definitely not simple).  When this is rendering I'll refactor it.
* Got vertex binding and attributes creation done for simple icon.
* Did some reading up on Vulkan GLSL and was able to change the simple icon shaders so they all compiled with the script I wrote last week.
* Started on pipeline for simple icon.
- Added lwjgl-shaderc library for compiling shaders at runtime (WIP)
- Shader utils - compile shader, compileShaderModule functions
…murid/constellation into feature/Migrate-renderer-to-Vulkan
* Shader compilation maybe?
FPSRenderable
* Added descriptor set layout.
* Added descrptor set init.  Currently commented out textures.
* Added (but not used) uniform buffer objects (verts and geom).
* Create a complete pipeline for each swapchain image.  This is probably wasteful, revisit.

CVKDevice
* Request geometry shader support (off by default even if available)
* Added memory type to index function (differs per GPU)

CVKRenderable-CVKSwapchain
* Added a mechanism for resizing the descriptor pool when new renderable are added.  This is probably not correct and may need to be redone.
* Added again sychonised class to track the current demand on the descriptor pool.  This is probably not correct and will almost certainly bite in the tail.  Revisit when we have a consistent plan for handling asynchronous tasks.
* Added check to some functions to ensure they're called from the render thread.
* Added a couple of missing struct types that were raising errors through the KHR validation layer.
* More fluffing about the Display method.

Misc.
* Added a CVKBuffer class that has a factory function to create, allocate and bind a buffer.
* checkVKret wasn't logging, now it is.
…murid/constellation into feature/Migrate-renderer-to-Vulkan
TheTimurid and others added 28 commits November 24, 2020 15:07
- added try catch to visual manager construction which may throw when constructing a Vulkan visual manager
- modified build.xml to append the classifier to any packages downloaded in the ivy step that have them
- project properties and xml modified, probably automatic thanks to Netbeans
…murid/constellation into feature/Migrate-renderer-to-Vulkan
- OpenGL and Vulkan should be together for easier navigation as if you're poking in one you probably want to look at the other.
* Fixed continuous rendering not working
* Fixed dragging a node not refreshing the display
* Added error logging if an exception is thrown during visual change processing
* Fixed more cases where consumers of the position buffer weren't checking it existed.
* Fixed an issue where we didn't recieve a CAMERA visual change.  Should investigate this further and find out why it never arrived.
* Started removing per image resources.  This needs to be done across all the renderables.
* result of moving some shared classes to core utilities
* applied Nova's threading of ligature rendering to the Vulkan equivalent classes.
* fixed loop shader to work with the dynamically sized icon atlas.
* made export icon atlas immediate as with our rendering optimisation (only renders on change) we can't wait until the next render.
* added file extension to export icon atlas.
* fixed hit test exception which occurred when we attempted to sample the pick buffer before it existed
* applied Nova's threading of ligature rendering to the Vulkan equivalent classes.
* fixed loop shader to work with the dynamically sized icon atlas.
* made export icon atlas immediate as with our rendering optimisation (only renders on change) we can't wait until the next render.
* added file extension to export icon atlas.
* fixed hit test exception which occurred when we attempted to sample the pick buffer before it existed
* someone who knows how config variables should be managed should revisit this change
* select renderer from variable in new renderer.conf if it exists, serviceprovider default otherwise
* CVK now gets its debug level from config
* moved the selection box renderable so both renderers can access it.
* changed the path building code for finding renderer.conf and loading shaders.  This should likely fix shader compilation happening unnecessarily.
* Renderer now explicitly calls the hit tester to do hittests rather than enumerating all rendrables
* Removed descriptorPoolResourcesDirty and swapChainResourcesDirty which were a pre resource state attempt to deal with dirty resources.
* Use icon extended name which eliminated some erroneous duplication.
* Added runtime swizzle via imageview for the icon atlas to save load time swizzling.
* Threaded icon copying.  Didn't have the speed up I was hoping for.  This whole generation process needs to be rewritten.
* Added a safe exit to CVKImage's ReadPixel incase we attempt a hittest before we have a pick buffer to sample.
* Added Linux and MacOS shader compiler dependencies

* 🎨 Added warning message for error caused when there is no VULKAN support.

Co-authored-by: Nova-2119 <liam.banks@defence.gov.au>
Rationalise resource states and added runtime icon swizzling
* Added new flag to renderer.conf to allow caching icon atlas to and from disk.
* Fixed CVKImage only ever writing and mapping the first layer.
* Made renderer.conf variable parsing exception tolerant.
* Some TODOs in this MR that need to be addressed before this feature could be called robust.
[Load times] Icon atlas caching
@github-actions

Copy link
Copy Markdown

This pull request is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants