@@ -175,15 +175,18 @@ struct MetalShaderBindingMapping {
175175 // Map GLSL binding to MSL index (buffer/texture index, sampler index)
176176 std::unordered_map<int , std::pair<int , int >> vertex;
177177 std::unordered_map<int , std::pair<int , int >> fragment;
178- // The highest used buffer index used in the MSL vertex function Vertex attributes use up vertex buffer indices in
179- // Metal, but SPIRV-cross generated MSL doesn't know how many buffer indices the vertex attributes will take. So bind
180- // vertex input after the other buffers.
178+ // The highest used buffer index used in the MSL vertex function
179+ // Vertex attributes use up vertex buffer indices in Metal, but
180+ // SPIRV-cross generated MSL doesn't know how many buffer indices
181+ // the vertex attributes will take. So bind vertex input after the other
182+ // buffers.
181183 int max_vert_buffer_index{-1 };
182184};
183185
184186class MetalPipeline final : public Pipeline, public rhi_impl::NonAssignable {
185187 public:
186- // `mtl_library`, `mtl_function`, `mtl_compute_pipeline_state` should be already retained.
188+ // `mtl_library`, `mtl_function`, `mtl_compute_pipeline_state` should be
189+ // already retained.
187190 explicit MetalPipeline (const MetalDevice &device,
188191 MTLLibrary_id mtl_library,
189192 MTLFunction_id mtl_function,
@@ -379,7 +382,8 @@ class MetalCommandList final : public CommandList {
379382 void set_line_width (float width) override;
380383
381384 MTLCommandBuffer_id finalize ();
382- // If noclear is false, ignore whatever is set in details This may be used to "resume" the current renderpass
385+ // If noclear is false, ignore whatever is set in details
386+ // This may be used to "resume" the current renderpass
383387 MTLRenderPassDescriptor *create_render_pass_desc (bool depth_write, bool noclear = false );
384388
385389 bool is_renderpass_active () const ;
@@ -405,12 +409,12 @@ class MetalCommandList final : public CommandList {
405409 std::vector<MTLTexture_id> render_targets_;
406410 MTLTexture_id depth_target_;
407411
408- // Buffers accessed via physical storage buffer pointers in the next dispatch. Needed for Metal hazard tracking since
409- // these are not explicitly bound.
412+ // Buffers accessed via physical storage buffer pointers in the next dispatch.
413+ // Needed for Metal hazard tracking since these are not explicitly bound.
410414 std::vector<DeviceAllocation> tracked_physical_buffers_;
411415
412- // For renderpass resuming, track whether a renderpass has been started Used to override LoadAction, to prevent
413- // uninteded clearing when resuming
416+ // For renderpass resuming, track whether a renderpass has been started
417+ // Used to override LoadAction, to prevent uninteded clearing when resuming
414418 bool is_renderpass_active_{false };
415419
416420 // Persistent compute command encoder reused across consecutive `dispatch()` calls so the GPU sees one
0 commit comments