leios / quibble

An experimental meshless rendering engine
MIT License
2 stars 0 forks source link

OpenCL / Vulkan Interop #7

Open leios opened 2 months ago

leios commented 2 months ago
  1. https://docs.vulkan.org/samples/latest/samples/extensions/open_cl_interop/README.html
  2. https://docs.vulkan.org/samples/latest/samples/extensions/open_cl_interop_arm/README.html
leios commented 2 months ago

Another strat: I could "just use" vulkan compute shaders. Notes:

  1. Guide to OpenCL -> Vulkan: https://www.neilhenning.dev/posts/opencl-vulkan-a-porting-guide-1/
  2. glslangvalidator C api: https://github.com/KhronosGroup/glslang?tab=readme-ov-file#c-functional-interface-new

I think this should be doable with much less boilerplate than typical vulkan applications because I won't need to make use of any standard mesh machinery and can directly write the the swap chain images.

leios commented 2 months ago

I think (for simplicity), it is best to finish #4 with OpenCL and then come back to target Vulkan once everything is in place.

Again note that this is only if we care about realtime output. For anything that will be rendered as standalone images or videos, I don't need Vulkan

Another another option is to do what FlidX3D does and go straight OpenCL without Vulkan: https://github.com/ProjectPhysX/FluidX3D.

I think this involves mucking around with some X / Wayland code though.

leios commented 1 month ago

Note that it seems to be relatively easy to remain compliant with Vulkan swap chain buffers: https://vulkan-tutorial.com/Drawing_a_triangle/Presentation/Swap_chain

We can just specify that the VkSurfaceFormatKHR is something like VK_FORMAT_B8G8R8A8_SRGB, which would be an 8 bit R, G, B, A in that order.