public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options, new VoidBlock2<Long, Long>() { @Override public void invoke(Long a, Long b) { byte[] bytes = VM.newByteArray(a, b.intValue()); deallocator.invoke(bytes); } }); } public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor, MTLPipelineOption options) throws NSErrorException {
public MTLComputePipelineState newComputePipelineState(MTLFunction computeFunction, MTLPipelineOption options) throws NSErrorException { return newComputePipelineState(computeFunction, options, (MTLComputePipelineReflection.MTLComputePipelineReflectionPtr)null); } /*<methods>*/
@WeaklyLinked @Method(selector = "newLibraryWithData:error:") private native MTLLibrary newLibraryWithData(DispatchData data, NSError.NSErrorPtr error); public MTLLibrary newLibraryWithSource(String source, MTLCompileOptions options) throws NSErrorException {
public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor, MTLPipelineOption options) throws NSErrorException { return newRenderPipelineState(descriptor, options, (MTLRenderPipelineReflection.MTLRenderPipelineReflectionPtr)null); } public MTLComputePipelineState newComputePipelineState(MTLFunction computeFunction, MTLPipelineOption options) throws NSErrorException {
@Method(selector = "newLibraryWithFile:error:") private native MTLLibrary newLibraryWithFile(String filepath, NSError.NSErrorPtr error); @WeaklyLinked
@Method(selector = "newLibraryWithSource:options:completionHandler:") public native void newLibraryWithSource(String source, MTLCompileOptions options, @Block VoidBlock2<MTLLibrary, NSError> completionHandler); public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor) throws NSErrorException {
/** * @since Available in iOS 10.0 and later. */ public MTLLibrary newDefaultLibrary(NSBundle bundle) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); MTLLibrary result = newDefaultLibrary(bundle, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 11.0 and later. */ public MTLLibrary newLibrary(NSURL url) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); MTLLibrary result = newLibrary(url, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); MTLRenderPipelineState result = newRenderPipelineState(descriptor, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } @Method(selector = "newRenderPipelineStateWithDescriptor:error:")
@Method(selector = "newLibraryWithFile:error:") private native MTLLibrary newLibraryWithFile(String filepath, NSError.NSErrorPtr error); /**
@Method(selector = "newLibraryWithSource:options:completionHandler:") public native void newLibraryWithSource(String source, MTLCompileOptions options, @Block VoidBlock2<MTLLibrary, NSError> completionHandler); public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor) throws NSErrorException {
/** * @since Available in iOS 10.0 and later. */ public MTLLibrary newDefaultLibrary(NSBundle bundle) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); MTLLibrary result = newDefaultLibrary(bundle, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
/** * @since Available in iOS 11.0 and later. */ public MTLLibrary newLibrary(NSURL url) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); MTLLibrary result = newLibrary(url, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } /**
public MTLComputePipelineState newComputePipelineState(MTLFunction computeFunction) throws NSErrorException { NSError.NSErrorPtr ptr = new NSError.NSErrorPtr(); MTLComputePipelineState result = newComputePipelineState(computeFunction, ptr); if (ptr.get() != null) { throw new NSErrorException(ptr.get()); } return result; } @Method(selector = "newComputePipelineStateWithFunction:error:")
@Method(selector = "newRenderPipelineStateWithDescriptor:completionHandler:") public native void newRenderPipelineState(MTLRenderPipelineDescriptor descriptor, @Block VoidBlock2<MTLRenderPipelineState, NSError> completionHandler); @Method(selector = "newRenderPipelineStateWithDescriptor:options:completionHandler:")
public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options) { return newBuffer(VM.getArrayValuesAddress(bytes), bytes.length, options); } public MTLBuffer newBuffer(byte[] bytes, MTLResourceOptions options, final VoidBlock1<byte[]> deallocator) {
@WeaklyLinked @Method(selector = "newLibraryWithData:error:") private native MTLLibrary newLibraryWithData(DispatchData data, NSError.NSErrorPtr error); public MTLLibrary newLibraryWithSource(String source, MTLCompileOptions options) throws NSErrorException {
@Method(selector = "newLibraryWithFile:error:") private native MTLLibrary newLibraryWithFile(String filepath, NSError.NSErrorPtr error); /**
@Method(selector = "newLibraryWithSource:options:completionHandler:") public native void newLibraryWithSource(String source, MTLCompileOptions options, @Block VoidBlock2<MTLLibrary, NSError> completionHandler); public MTLRenderPipelineState newRenderPipelineState(MTLRenderPipelineDescriptor descriptor) throws NSErrorException {
@Method(selector = "newComputePipelineStateWithFunction:options:reflection:error:") private native MTLComputePipelineState newComputePipelineState(MTLFunction computeFunction, MTLPipelineOption options, MTLComputePipelineReflection.MTLComputePipelineReflectionPtr reflection, NSError.NSErrorPtr error); @Method(selector = "newComputePipelineStateWithFunction:completionHandler:")