Path: blob/master/thirdparty/metal-cpp/Metal/MTLCaptureScope.hpp
21082 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Metal/MTLCaptureScope.hpp3//4// Copyright 2020-2024 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//-------------------------------------------------------------------------------------------------------------------------------------------------------------2324#include "MTLDefines.hpp"25#include "MTLPrivate.hpp"2627#include "../Foundation/Foundation.hpp"2829//-------------------------------------------------------------------------------------------------------------------------------------------------------------3031namespace MTL32{33class CaptureScope : public NS::Referencing<CaptureScope>34{35public:36class Device* device() const;3738NS::String* label() const;39void setLabel(const NS::String* pLabel);4041class CommandQueue* commandQueue() const;4243void beginScope();44void endScope();45};46}4748//-------------------------------------------------------------------------------------------------------------------------------------------------------------4950_MTL_INLINE MTL::Device* MTL::CaptureScope::device() const51{52return Object::sendMessage<Device*>(this, _MTL_PRIVATE_SEL(device));53}5455//-------------------------------------------------------------------------------------------------------------------------------------------------------------5657_MTL_INLINE NS::String* MTL::CaptureScope::label() const58{59return Object::sendMessage<NS::String*>(this, _MTL_PRIVATE_SEL(label));60}6162//-------------------------------------------------------------------------------------------------------------------------------------------------------------6364_MTL_INLINE void MTL::CaptureScope::setLabel(const NS::String* pLabel)65{66Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setLabel_), pLabel);67}6869//-------------------------------------------------------------------------------------------------------------------------------------------------------------7071_MTL_INLINE MTL::CommandQueue* MTL::CaptureScope::commandQueue() const72{73return Object::sendMessage<CommandQueue*>(this, _MTL_PRIVATE_SEL(commandQueue));74}7576//-------------------------------------------------------------------------------------------------------------------------------------------------------------7778_MTL_INLINE void MTL::CaptureScope::beginScope()79{80return Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(beginScope));81}8283//-------------------------------------------------------------------------------------------------------------------------------------------------------------8485_MTL_INLINE void MTL::CaptureScope::endScope()86{87return Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(endScope));88}8990//-------------------------------------------------------------------------------------------------------------------------------------------------------------919293