From a966244b91afe53855d868395d8bb0b0990f4cd4 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 5 Jan 2021 16:41:33 -0800 Subject: [PATCH] creation functions --- Refresh.cs | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/Refresh.cs b/Refresh.cs index e8beed9..83ff9b7 100644 --- a/Refresh.cs +++ b/Refresh.cs @@ -674,5 +674,95 @@ namespace RefreshSharp uint groupCountZ, uint computeParamOffset ); + + /* Creates */ + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateRenderPass( + IntPtr device, + ref RenderPassCreateInfo renderPassCreateInfo + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateComputePipeline( + IntPtr device, + ref ComputePipelineCreateInfo computePipelineCreateInfo + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateGraphicsPipeline( + IntPtr device, + ref GraphicsPipelineCreateInfo graphicsPipelineCreateInfo + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateSampler( + IntPtr device, + ref SamplerStateCreateInfo samplerStateCreateInfo + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateFramebuffer( + IntPtr device, + ref FramebufferCreateInfo framebufferCreateInfo + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateShaderModule( + IntPtr device, + ref ShaderModuleCreateInfo shaderModuleCreateInfo + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateTexture2D( + IntPtr device, + ColorFormat format, + uint width, + uint height, + uint levelCount, + uint usageFlags /* TextureUsageFlagBits */ + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateTexture3D( + IntPtr device, + ColorFormat format, + uint width, + uint height, + uint depth, + uint levelCount, + uint usageFlags /* TextureUsageFlagBits */ + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateTextureCube( + IntPtr device, + ColorFormat format, + uint size, + uint levelCount, + uint usageFlags /* TextureUsageFlagBits */ + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateColorTarget( + IntPtr device, + SampleCount multisampleCount, + ref TextureSlice textureSlice + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateDepthStencilTarget( + IntPtr device, + uint width, + uint height, + DepthFormat format + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_CreateBuffer( + IntPtr device, + uint usageFlags, /* BufferUsageFlagBits */ + uint sizeInBytes + ); } }