Path: blob/master/thirdparty/metal-cpp/Metal/MTL4CommitFeedback.hpp
21082 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTL4CommitFeedback.hpp3//4// Copyright 2020-2025 Apple Inc.5//6// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.17//18//-------------------------------------------------------------------------------------------------------------------------------------------------------------1920#pragma once2122#include "../Foundation/Foundation.hpp"23#include "MTLDefines.hpp"24#include "MTLHeaderBridge.hpp"25#include "MTLPrivate.hpp"26#include <CoreFoundation/CoreFoundation.h>2728#include <functional>2930namespace MTL431{32class CommitFeedback;3334using CommitFeedbackHandler = void (^)(MTL4::CommitFeedback*);35using CommitFeedbackHandlerFunction = std::function<void(MTL4::CommitFeedback*)>;3637class CommitFeedback : public NS::Referencing<CommitFeedback>38{39public:40CFTimeInterval GPUEndTime() const;4142CFTimeInterval GPUStartTime() const;4344NS::Error* error() const;45};4647}48_MTL_INLINE CFTimeInterval MTL4::CommitFeedback::GPUEndTime() const49{50return Object::sendMessage<CFTimeInterval>(this, _MTL_PRIVATE_SEL(GPUEndTime));51}5253_MTL_INLINE CFTimeInterval MTL4::CommitFeedback::GPUStartTime() const54{55return Object::sendMessage<CFTimeInterval>(this, _MTL_PRIVATE_SEL(GPUStartTime));56}5758_MTL_INLINE NS::Error* MTL4::CommitFeedback::error() const59{60return Object::sendMessage<NS::Error*>(this, _MTL_PRIVATE_SEL(error));61}626364