VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
metalComputePipeline.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025-2026 Arnis Lektauers
3//
4// Created by Arnis Lektauers on 05.11.2025.
5//
6#pragma once
7
8#include <unordered_map>
9
10#include "metalPipeline.h"
12
13namespace visutwin::canvas
14{
15 class Shader;
16
17 // Metal compute pipeline cache and creation
19 {
20 public:
21 explicit MetalComputePipeline(const MetalGraphicsDevice* device): MetalPipeline(device) {}
23
24 MTL::ComputePipelineState* get(const std::shared_ptr<Shader>& shader);
25
26 private:
27 MTL::ComputePipelineState* create(const std::shared_ptr<Shader>& shader);
28
29 std::unordered_map<int, MTL::ComputePipelineState*> _cache;
30 };
31}
MTL::ComputePipelineState * get(const std::shared_ptr< Shader > &shader)
MetalComputePipeline(const MetalGraphicsDevice *device)
MetalPipeline(const MetalGraphicsDevice *device)