/ include / Metal / MTLParallelRenderCommandEncoder.hpp
MTLParallelRenderCommandEncoder.hpp
 1  //-------------------------------------------------------------------------------------------------------------------------------------------------------------
 2  //
 3  // Metal/MTLParallelRenderCommandEncoder.hpp
 4  //
 5  // Copyright 2020-2024 Apple Inc.
 6  //
 7  // Licensed under the Apache License, Version 2.0 (the "License");
 8  // you may not use this file except in compliance with the License.
 9  // You may obtain a copy of the License at
10  //
11  //     http://www.apache.org/licenses/LICENSE-2.0
12  //
13  // Unless required by applicable law or agreed to in writing, software
14  // distributed under the License is distributed on an "AS IS" BASIS,
15  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  // See the License for the specific language governing permissions and
17  // limitations under the License.
18  //
19  //-------------------------------------------------------------------------------------------------------------------------------------------------------------
20  
21  #pragma once
22  
23  #include "MTLDefines.hpp"
24  #include "MTLHeaderBridge.hpp"
25  #include "MTLPrivate.hpp"
26  
27  #include <Foundation/Foundation.hpp>
28  
29  #include "MTLCommandEncoder.hpp"
30  #include "MTLRenderPass.hpp"
31  
32  namespace MTL
33  {
34  class ParallelRenderCommandEncoder : public NS::Referencing<ParallelRenderCommandEncoder, CommandEncoder>
35  {
36  public:
37      class RenderCommandEncoder* renderCommandEncoder();
38  
39      void                        setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex);
40  
41      void                        setDepthStoreAction(MTL::StoreAction storeAction);
42  
43      void                        setStencilStoreAction(MTL::StoreAction storeAction);
44  
45      void                        setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex);
46  
47      void                        setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions);
48  
49      void                        setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions);
50  };
51  
52  }
53  
54  // method: renderCommandEncoder
55  _MTL_INLINE MTL::RenderCommandEncoder* MTL::ParallelRenderCommandEncoder::renderCommandEncoder()
56  {
57      return Object::sendMessage<MTL::RenderCommandEncoder*>(this, _MTL_PRIVATE_SEL(renderCommandEncoder));
58  }
59  
60  // method: setColorStoreAction:atIndex:
61  _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setColorStoreAction(MTL::StoreAction storeAction, NS::UInteger colorAttachmentIndex)
62  {
63      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setColorStoreAction_atIndex_), storeAction, colorAttachmentIndex);
64  }
65  
66  // method: setDepthStoreAction:
67  _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setDepthStoreAction(MTL::StoreAction storeAction)
68  {
69      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setDepthStoreAction_), storeAction);
70  }
71  
72  // method: setStencilStoreAction:
73  _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setStencilStoreAction(MTL::StoreAction storeAction)
74  {
75      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setStencilStoreAction_), storeAction);
76  }
77  
78  // method: setColorStoreActionOptions:atIndex:
79  _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setColorStoreActionOptions(MTL::StoreActionOptions storeActionOptions, NS::UInteger colorAttachmentIndex)
80  {
81      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setColorStoreActionOptions_atIndex_), storeActionOptions, colorAttachmentIndex);
82  }
83  
84  // method: setDepthStoreActionOptions:
85  _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setDepthStoreActionOptions(MTL::StoreActionOptions storeActionOptions)
86  {
87      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setDepthStoreActionOptions_), storeActionOptions);
88  }
89  
90  // method: setStencilStoreActionOptions:
91  _MTL_INLINE void MTL::ParallelRenderCommandEncoder::setStencilStoreActionOptions(MTL::StoreActionOptions storeActionOptions)
92  {
93      Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setStencilStoreActionOptions_), storeActionOptions);
94  }