9 PipelineMTL::PipelineMTL(std::weak_ptr<PipelineLibrary> library,
10 const PipelineDescriptor& desc,
11 id<MTLRenderPipelineState> state,
12 id<MTLDepthStencilState> depth_stencil_state)
13 : Pipeline(
std::move(library), desc),
14 pipeline_state_(state),
15 depth_stencil_state_(depth_stencil_state) {
16 if (!pipeline_state_) {
22 PipelineMTL::~PipelineMTL() =
default;
24 bool PipelineMTL::IsValid()
const {
28 id<MTLRenderPipelineState> PipelineMTL::GetMTLRenderPipelineState()
const {
29 return pipeline_state_;
32 id<MTLDepthStencilState> PipelineMTL::GetMTLDepthStencilState()
const {
33 return depth_stencil_state_;