Swiftshader on macOS

204 views
Skip to first unread message

Richard Wright

unread,
Sep 21, 2020, 1:03:38 PM9/21/20
to swift...@googlegroups.com
Hello,

I'm having some difficulties using Swiftshader on macOS and I just want to check some of my assumptions. I have it configured so that the loader sees it as one of three available ICD's (the Intel and NVidia hardware being the other ones). When I select the Swiftshader ICD however I cannot get a valid surface. I'm hoping someone here has trod this path before and might have a pointer.

Notes:
1. I'm using the Qt framework, but not using the Qt's built in Vulkan support (doing it myself - and it works fine against the hardware ICD's).
2. I am creating a QWindow for rendering, and have the surface type set to QSurface::MetalSurface (I have also tried QSurface::VulkanSurface). Do I actually need a Metal Surface since this is a software renderer... which leads me to...

3. I'm using  VkMetalSurfaceCreateInfoEXT and vkCreateMetalSurfaceEXT to create the surface. The VkSurfaceCapabilitiesKHR structure comes back blank, but vkGetPhysicalDeviceSurfaceSupportKHR returns VK_SUCCESS. 

Since the ICD can supposedly be used as a drop in replacement, I assumed all the original metal calls were fine, and that Swiftshader was using Metal for perhaps very fast blits. Assumptions get us into trouble do they not?

Am I going about this the right way at all?

Thanks in advance for any tips or pointers,
Richard




Alexis Hétu

unread,
Sep 21, 2020, 2:20:29 PM9/21/20
to Richard Wright, swiftshader
Hi Richard,

  I don't have a lot of experience using Qt on MacOS, but I'm curious about one thing:

  Creating a surface through vkCreateMetalSurfaceEXT should go through here:
  and vkGetPhysicalDeviceSurfaceSupportKHR does always return VK_SUCCESS, no matter what:

  But using vkGetPhysicalDeviceSurfaceCapabilitiesKHR to query the VkSurfaceCapabilitiesKHR structure should end up here:
  which unconditionally calls SurfaceKHR::getSurfaceCapabilities, which should do something:

  So how is it possible for that "VkSurfaceCapabilitiesKHR structure comes back blank"? Can you double check that you're using the right surface when calling vkGetPhysicalDeviceSurfaceCapabilitiesKHR?


--
You received this message because you are subscribed to the Google Groups "swiftshader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftshader...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/swiftshader/CAGaq4HpvEsMF8L91%3D82OENeAZGs4Vs661jJHsVbB2jXVd%2Bj93Q%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages