yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
master
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLBuffer.hpp 4// 5// Copyright 2020-2021 Apple Inc. 6// 7// Licensed under the Apache License, Version 2.0 (the "License"); 8// you may not use this file except in compliance with the License. 9// You may obtain a copy of the License at 10// 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// See the License for the specific language governing permissions and 17// limitations under the License. 18// 19//------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 21#pragma once 22 23#include "MTLDefines.hpp" 24#include "MTLHeaderBridge.hpp" 25#include "MTLPrivate.hpp" 26 27#include <Foundation/Foundation.hpp> 28 29#include "MTLResource.hpp" 30 31namespace MTL 32{ 33class Buffer :public NS ::Referencing < Buffer ,Resource > 34{ 35public : 36NS ::UInteger length ()const ; 37 38void * contents (); 39 40void didModifyRange (NS ::Range range ); 41 42class Texture * newTexture (const class TextureDescriptor * descriptor ,NS ::UInteger offset ,NS ::UInteger bytesPerRow ); 43 44void addDebugMarker (const NS ::String * marker ,NS ::Range range ); 45 46void removeAllDebugMarkers (); 47 48class Buffer * remoteStorageBuffer ()const ; 49 50class Buffer * newRemoteBufferViewForDevice (const class Device * device ); 51}; 52 53} 54 55// property: length 56_MTL_INLINE NS ::UInteger MTL ::Buffer ::length ()const 57{ 58return Object ::sendMessage < NS ::UInteger > (this ,_MTL_PRIVATE_SEL (length )); 59} 60 61// method: contents 62_MTL_INLINE void * MTL ::Buffer ::contents () 63{ 64return Object ::sendMessage < void *> (this ,_MTL_PRIVATE_SEL (contents )); 65} 66 67// method: didModifyRange: 68_MTL_INLINE voidMTL ::Buffer ::didModifyRange (NS ::Range range ) 69{ 70Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (didModifyRange_ ),range ); 71} 72 73// method: newTextureWithDescriptor:offset:bytesPerRow: 74_MTL_INLINE MTL ::Texture * MTL ::Buffer ::newTexture (const MTL ::TextureDescriptor * descriptor ,NS ::UInteger offset ,NS ::UInteger bytesPerRow ) 75{ 76return Object ::sendMessage < MTL ::Texture *> (this ,_MTL_PRIVATE_SEL (newTextureWithDescriptor_offset_bytesPerRow_ ),descriptor ,offset ,bytesPerRow ); 77} 78 79// method: addDebugMarker:range: 80_MTL_INLINE voidMTL ::Buffer ::addDebugMarker (const NS ::String * marker ,NS ::Range range ) 81{ 82Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (addDebugMarker_range_ ),marker ,range ); 83} 84 85// method: removeAllDebugMarkers 86_MTL_INLINE voidMTL ::Buffer ::removeAllDebugMarkers () 87{ 88Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (removeAllDebugMarkers )); 89} 90 91// property: remoteStorageBuffer 92_MTL_INLINE MTL ::Buffer * MTL ::Buffer ::remoteStorageBuffer ()const 93{ 94return Object ::sendMessage < MTL ::Buffer *> (this ,_MTL_PRIVATE_SEL (remoteStorageBuffer )); 95} 96 97// method: newRemoteBufferViewForDevice: 98_MTL_INLINE MTL ::Buffer * MTL ::Buffer ::newRemoteBufferViewForDevice (const MTL ::Device * device ) 99{ 100return Object ::sendMessage < MTL ::Buffer *> (this ,_MTL_PRIVATE_SEL (newRemoteBufferViewForDevice_ ),device ); 101}