/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/ThirdParty/Jolt/Compute/MTL/ComputeSystemMTL.h
40 строк
1 KB
Jan Krassnigg
Updated Jolt (#1921)
28 апр 2026, 12:24
Не верифицирован
28 апр 2026, 12:24
600d1da
Код
Авторство
О чём код?
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics) // SPDX-FileCopyrightText: 2025 Jorrit Rouwe // SPDX-License-Identifier: MIT #pragma once #include <Jolt/Compute/ComputeSystem.h> #ifdef JPH_USE_MTL #include <MetalKit/MetalKit.h> JPH_NAMESPACE_BEGIN /// Interface to run a workload on the GPU class JPH_EXPORT ComputeSystemMTL : public ComputeSystem { public: JPH_DECLARE_RTTI_VIRTUAL(JPH_EXPORT, ComputeSystemMTL) // Initialize / shutdown the compute system bool Initialize(id<MTLDevice> inDevice); void Shutdown(); // See: ComputeSystem virtual ComputeShaderResult CreateComputeShader(const char *inName, uint32 inGroupSizeX, uint32 inGroupSizeY, uint32 inGroupSizeZ) override; virtual ComputeBufferResult CreateComputeBuffer(ComputeBuffer::EType inType, uint64 inSize, uint inStride, const void *inData = nullptr) override; virtual ComputeQueueResult CreateComputeQueue() override; /// Get the metal device id<MTLDevice> GetDevice() const { return mDevice; } private: id<MTLDevice> mDevice; id<MTLLibrary> mShaderLibrary; }; JPH_NAMESPACE_END #endif // JPH_USE_MTL