-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[meta][ll] Vulkan portability issues #1354
Comments
The SwapChain implementation I wrote uses an API that is considered private by Apple on iOS prior to the upcoming iOS 11. If we want to support Metal 1 on iOS that's another sticking point. |
Events will probably be hard to implement for both APIs, requiring to split command buffers. |
I think we should migrate all the points from #1241 here, describe them in great detail, and close the other issue as a duplicate. |
Not sure if this is the right place to share some of our findings so let me know if I should move this.
|
Issues (Portability API)Aspects where vulkan portability is not straightforward. In particular, hard to map towards D3D12, which exposes a smaller and more restricted API surface: Memory mappingSummary: Vulkan allows to map arbitrary slices of Vulkan
D3D12
Metal(Metal uses API DesignWe currently follow D3D12 in Resource viewsSummary:
Vulkan
D3D12
Metal
API DesignWe currently follow D3D12 in |
Triangle fans seem like they should be easy to implement just with strips or lists; if I remember I should someday do a good rummage around and see if I can write something that handles them. |
Khronos - Vulkan Portability Initiative
Here is a rough list of areas where Vulkan translation to other next-gen APIs is not straightforward.
Related to #1226,
#1241, and #1102cc @msiglreith @JohnColanduoni
The following Vulkan pipeline states are not represented in D3D12 and Metal (see gpuweb/gpuweb#26 for detailed PSO comparison):
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN
Direct3D 12
vkDescriptorPool
can't be mapped toID3D12DescriptorHeap
, because only one of the latter can be active (for each type: samplers and non-samplers) at any given time during command encoding.CreateHeap
requires the resource type specified in advance on Tier-1 hardware, whilevkAllocateMemory
is typeless.CopyTextureRegion
from a source buffer requires minimum alignment of 0x100 for the rows and 0x200 for the depth slices, while Vulkan supports tight packing.vkCmdSetStencil*
supports face selection, whileOMSetStencilRef
and stencil descriptors only support a single value for the reference and masks.vkCmdBlitImage
unsupported, only 1:1 copying possiblevkCmdClearColorImage
/vkCmdClearDepthStencilImage
: Only clearing via RenderTargetView/DepthStencilViews possiblevkCmdFillBuffer
: Only clearing via UAVs possiblevkCmdUpdateBuffer
: Unsupported, d3d12 only allows map/unmap and copyingvkCmdResolveImage
:ResolveSubresource
doens't allow to specify offset+extent for subresources, only whole subresources can be resolved. Format compatibility needs to be enforced.ID3D12GraphicsCommandList
can be recorded at same time for eachID3D12CommandAllocator
(source: https://msdn.microsoft.com/en-us/library/windows/desktop/dn899205(v=vs.85).aspx#recording_command_lists)
Metal
vkCmdClearColorImage
/vkCmdClearDepthStencilImage
: Clearing seems to be only possible via renderpasses. Potential issue with clearing multiple subregions.vkCmdUpdateBuffer
: UnsupportedvkCmdCopyImage
doesn't work with non-equal but compatible formatsTODO
Sort the remaining of #1241:
Suggested new feature flags
The text was updated successfully, but these errors were encountered: