-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rhi] MetalSurface functions (#8274)
Issue: # ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at a89e235</samp> This pull request adds the ability to create and use a Metal surface for rendering graphics using the RHI interface. It introduces the `MetalSurface` class in `metal_device.h` and `metal_device.mm`, and links the QuartzCore framework in `CMakeLists.txt`. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at a89e235</samp> * Add the MetalSurface class and the create_surface method to support rendering on Metal ([link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-5b304e188996abd217fad85fd8b2434e729ad9c089eb9ef48a848c0fcc74d614R249-R292), [link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-5b304e188996abd217fad85fd8b2434e729ad9c089eb9ef48a848c0fcc74d614L260-R310), [link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-c350a27659df1ebcf2c854e2c21a80f82de87d3b325a80e00f6a6dd6ca53303bR608-R682), [link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-c350a27659df1ebcf2c854e2c21a80f82de87d3b325a80e00f6a6dd6ca53303bR707-R711)) * Add the QuartzCore framework and header to use the CAMetalLayer and CAMetalDrawable classes for the MetalSurface ([link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-464e3a16b2cf83d04b813312367cf6b4d56b4d313af162dde3237c8352374667L21-R21), [link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-5b304e188996abd217fad85fd8b2434e729ad9c089eb9ef48a848c0fcc74d614L13-R18), [link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-5b304e188996abd217fad85fd8b2434e729ad9c089eb9ef48a848c0fcc74d614L29-R36)) * Add helper functions to convert RHI enums to Metal enums for buffer format, image dimension, and image usage ([link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-c350a27659df1ebcf2c854e2c21a80f82de87d3b325a80e00f6a6dd6ca53303bR10-R84)) * Add a TODO comment to the MetalShaderResourceSet class to indicate the need for raster resources support ([link](https://github.com/taichi-dev/taichi/pull/8274/files?diff=unified&w=0#diff-5b304e188996abd217fad85fd8b2434e729ad9c089eb9ef48a848c0fcc74d614L174-R180)) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Proton <feisuzhu@163.com> Co-authored-by: Bob Cao <bobcaocheng@gmail.com>
- Loading branch information
1 parent
edf8b9e
commit 6994dbd
Showing
4 changed files
with
211 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters