Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a work-in-progress Vulkan backend (#236).
Currently, only the SDL platform is supported together with the Vulkan renderer. To use this backend, set the CMake configuration `SAMPLES_BACKEND=SDL_Vulkan`. Development commits by @wh1t3lord (#236): - Started Vulkan implementation - Keep codebase simple, but easy to use. - ADD: instance creation - ADD: physical device and device properties - ADD: The commentaries about ShellRenderInterfaceVulkan and trying to create Surface - ADD: Destroying functions but get HWND from RMLUI - ADD: obtaining HWND - FIX: compilation - ADD: standard way to initialize and shutdown - ADD: Queues and Queues Indecies - ADD: device creation - ADD: swapchain - ADD: OnResize method - ADD: correct swapchain creation - ADD: sync primitives - ADD: presenting, but without resources - ADD: start implementing resource management, creating descriptor set layout - You must compile shaders by your own. So engine operates with SPV format only, not raw strings, not compiling files. - ADD: creating shaders, but I need to implement that - ADD: creating VkShaderModule - ADD: remove not capable method in that arch - ADD: Physical device wrapper, pipeline layout creation - ADD: continue creating VkFramebuffer for swapchain - FIX: compilation thing and waiting before destroying everything - ADD: continue work - FIX: swapchain creation - FIX: formatting for commentary - ADD: something new - ADD: command list ring - ADD: implemented command list ring - ADD: added explanation commentary about using multiple logical frames for rendering - ADD: added allocator for another allocator, but I need to implement it first - ADD: added final allocator for dynamic buffer - ADD: ring buffer pool implementation - FIX: compilation fixes - FIX: vma uses implementation in cpp - ADD: successful creation and deletion - ADD: started rendering begin and end scopes - ADD: stable rendering - ADD: correct rendering body - ADD: clearing back buffer is working well - ADD: something new - ADD: texture data wrapper - ADD: writing thing for uploading - ADD: need to create separate queue for uploading resources - ADD: continue work, added upload manager - ADD: many stuff - ADD: uploading textures is fine, but think about better memory handling, now it is just simple and trivial - ADD: successful init/destroy state for app - ADD: shaders for Vulkan, they are compiled with SPIR-V otherwise you can't load your shaders... - ADD: successful init/destroy - FIX: inserting data into descriptor set layout bindings - FIX: shaders, binding must unique! - ADD: continue at home - ADD: Descriptors - ADD: continue - ADD: continue - FIX: obtaining texture from handle - ADD: continue work about pipeline creation, use VkDescriptorSetLayoutBinding info from CreateDescriptorSetLayout method. - ADD: creating pipelines, continue testing later - ADD: successful creation pipelines - ADD: continue work, because for every compile geometry you need to have own descriptor set, so we cache all vkCmds after all CompileGeometry->RenderCompiledGeometry - ADD: allocated more than one descriptor set, but still I need to test my thing - ADD: well it seems drawing functions are recorded, but nothing to show on screen. It is strange. Have to fix it and analyze what is wrong with it. - ADD: cached compiled geometry_handle_t - FIX: data uploading was incorrect - FIX: commentary - FIX: correct format for color - ADD: something, but geometry is discarded somehow... - ADD: Now this renders the scene, but font textures are not valid - ADD: something new - ADD: FINAL - ADD: commentary - ADD: in order to test you have to uncomment those lines - FIX: removed pointless commentary due to release of backends branch - ADD: all necessary commentaries - ADD: vulkan renderer - ADD: continue work about releasing stuff - ADD: continue work, use one large Descriptor with offsets - ADD: updated out-dated VMA allocator version, deleted some todos, need to finish ring pool - ADD: using virtual allocator - ADD: FINAL, but I didn't test the other scenes. Reusing descriptors, Resizing is working - FIX: message - ADD: stuff, but WE REALLY need to solve the thing with Descriptors - ADD: continue at home - ADD: test at home - FIX: if we have descriptors, but remove that functionality after tests - FIX: descriptor set picking - FIX: descriptor set creation - ADD: continue testing - ADD: continue at home - ADD: one descriptor set for geometry and descriptors per texture - ADD: something - ADD: resizing works - ADD: need for tests - FIX: with allocation - ADD: possibly final things Development by @mikke89: - Ported the Vulkan shell code to the new backend architecture for RmlUi 5.0. - Made a script to compile the GLSL shaders to SPIR-V binary C character arrays. This allows directly including the shaders in the renderer source code. Co-authored-by: wh1t3lord <git.matvey@yandex.ru>
- Loading branch information