File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ class MTCommandList : public CommandList {
123123 MTDevice& device_;
124124 id <MTL4CommandAllocator> allocator_ = nullptr ;
125125 id <MTL4CommandBuffer> command_buffer_ = nullptr ;
126+ std::vector<id <MTLBuffer >> patch_buffers_;
126127
127128 static constexpr MTLStages kRenderStages = MTLStageVertex | MTLStageObject | MTLStageMesh | MTLStageFragment;
128129 static constexpr MTLStages kComputeStages = MTLStageDispatch | MTLStageBlit | MTLStageAccelerationStructure;
@@ -143,7 +144,6 @@ class MTCommandList : public CommandList {
143144 std::shared_ptr<MTBindingSet> binding_set;
144145 std::map<ShaderType, id <MTL4ArgumentTable>> argument_tables;
145146 id <MTLResidencySet> residency_set = nullptr ;
146- std::vector<id <MTLBuffer >> patch_buffers;
147147 bool need_apply_pipeline = false ;
148148 bool need_apply_binding_set = false ;
149149 MTLStages render_barrier_after_stages = MTLStageAll;
Original file line number Diff line number Diff line change @@ -597,7 +597,7 @@ MTLStages ResourceStateToMTLStages(ResourceState state)
597597 acceleration_structure_desc.instanceDescriptorBuffer =
598598 MTL4BufferRangeMake (patched_instance_data.gpuAddress , patched_instance_data.length );
599599 acceleration_structure_desc.instanceDescriptorType = MTLAccelerationStructureInstanceDescriptorTypeIndirect;
600- state_-> patch_buffers .push_back (patched_instance_data);
600+ patch_buffers_ .push_back (patched_instance_data);
601601
602602 decltype (auto ) mt_dst = dst->As <MTResource>();
603603 decltype (auto ) mt_scratch = scratch->As <MTResource>();
You can’t perform that action at this time.
0 commit comments