Skip to content
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

Add support for VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN. #1962

Merged
merged 1 commit into from
Jul 1, 2023

Commits on Jun 28, 2023

  1. Add support for VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN.

    To reduce complexity and repetitive copy-pasted spaghetti code,
    the design approach here was to implement triangle fan conversion on
    MVKCmdDrawIndexedIndirect, as the most general of the draw commands,
    and then populate and invoke a synthetic MVKCmdDrawIndexedIndirect
    command from the other draw commands.
    
    - Rename pipeline factory shader cmdDrawIndexedIndirectMultiviewConvertBuffers()
      to cmdDrawIndexedIndirectConvertBuffers, and in addition to original support
      for modifying indirect content to support multiview, add support for
      converting triangle fan indirect content and indexes to triangle list.
    - Modify MVKCmdDrawIndexedIndirect to track need to convert triangle fans
      to triangle list, and invoke kernel function when needed.
    - Modify MVKCmdDraw, MVKCmdDrawIndexed, and MVKCmdDrawIndirect to populate
      and invoke a synthetic MVKCmdDrawIndexedIndirect command to convert triangle
      fans to triangle lists.
    - Add pipeline factory shader cmdDrawIndirectPopulateIndexes() to convert
      non-indexed indirect content to indexed indirect content.
    - MVKCmdDrawIndexedIndirect add support for zero divisor vertex buffers
      potentially coming from MVKCmdDraw and MVKCmdDrawIndexed.
    
    - Rename pipeline factory shader cmdDrawIndexedIndirectConvertBuffers()
      to cmdDrawIndexedIndirectTessConvertBuffers() so it will be invoked from
      MVKCommandEncodingPool::getCmdDrawIndirectTessConvertBuffersMTLComputePipelineState()
      (unrelated).
    billhollings committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    e5d3939 View commit details
    Browse the repository at this point in the history