Description
FunGT currently uses OpenGL for rasterization. Vulkan provides better interoperability with SYCL via Level Zero external memory extensions, enabling zero-copy buffer sharing between the rasterization pipeline and SYCL compute kernels without the limitations imposed by cl_khr_gl_sharing.
Implementation Tasks
- Add
FUNGT_USE_VULKAN CMake option
- Implement
VulkanContext wrapping VkInstance, VkPhysicalDevice, VkDevice
- Replace OpenGL swapchain and framebuffer with
VkSwapchainKHR and VkRenderPass
- Implement
VulkanShader using SPIR-V pipeline stages
- Port
SceneManager::renderScene() uniforms to push constants and descriptor sets
- Replace VAO/VBO abstractions with
VkBuffer via VulkanMemoryAllocator
- Implement Vulkan/Level Zero external memory interop replacing
cl_khr_gl_sharing
- Port ImGui to
imgui_impl_vulkan
Acceptance Criteria
- Rasterization output on Arc and RTX 4060 is equivalent to the current OpenGL path
- Particle simulation runs via Vulkan/Level Zero interop
FUNGT_USE_VULKAN=OFF preserves the existing OpenGL path
Dependencies
- Vulkan SDK 1.3+
- VulkanMemoryAllocator
VK_KHR_external_memory_fd
- Intel Level Zero SDK
Description
FunGT currently uses OpenGL for rasterization. Vulkan provides better interoperability with SYCL via Level Zero external memory extensions, enabling zero-copy buffer sharing between the rasterization pipeline and SYCL compute kernels without the limitations imposed by
cl_khr_gl_sharing.Implementation Tasks
FUNGT_USE_VULKANCMake optionVulkanContextwrappingVkInstance,VkPhysicalDevice,VkDeviceVkSwapchainKHRandVkRenderPassVulkanShaderusing SPIR-V pipeline stagesSceneManager::renderScene()uniforms to push constants and descriptor setsVkBuffervia VulkanMemoryAllocatorcl_khr_gl_sharingimgui_impl_vulkanAcceptance Criteria
FUNGT_USE_VULKAN=OFFpreserves the existing OpenGL pathDependencies
VK_KHR_external_memory_fd