Skip to content

Add Vulkan Rasterization Backend #96

Description

@juanchuletas

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions