Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rhi] MetalCommandList store unique_ptr to resource set (#8312)
Issue: # ### Brief Summary Directly storing a pointer to the resource set is bad because the resource set can be destroyed before the command list is done. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at f7a1b72</samp> * Initialize members to avoid dangling pointers and use `std::unique_ptr` to manage shader resource set lifetime in `MetalCommandList` class ([link](https://github.com/taichi-dev/taichi/pull/8312/files?diff=unified&w=0#diff-5b304e188996abd217fad85fd8b2434e729ad9c089eb9ef48a848c0fcc74d614L268-R269), ) * Copy shader resource set argument instead of modifying it and cast it to `MetalShaderResourceSet` pointer in `bindShaderResourceSet` method ([link](https://github.com/taichi-dev/taichi/pull/8312/files?diff=unified&w=0#diff-c350a27659df1ebcf2c854e2c21a80f82de87d3b325a80e00f6a6dd6ca53303bL428-R429)) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information