fix some native mappings

pull/1/head
cosmonaut 2021-01-05 23:41:56 -08:00
parent 982ebac944
commit b55229db35
3 changed files with 13 additions and 11 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
bin/ bin/
obj/ obj/
.vs

View File

@ -5,6 +5,7 @@
<RootNamespace>RefreshCS</RootNamespace> <RootNamespace>RefreshCS</RootNamespace>
<Platform>x64</Platform> <Platform>x64</Platform>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

View File

@ -550,13 +550,13 @@ namespace RefreshCS
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct ColorBlendState public unsafe struct ColorBlendState
{ {
public byte logicOpEnable; public byte logicOpEnable;
public LogicOp logicOp; public LogicOp logicOp;
public IntPtr blendStates; public IntPtr blendStates;
public uint blendStateCount; public uint blendStateCount;
public IntPtr blendConstants; public fixed float blendConstants[4];
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
@ -934,8 +934,8 @@ namespace RefreshCS
IntPtr commandBuffer, IntPtr commandBuffer,
uint firstBinding, uint firstBinding,
uint bindingCount, uint bindingCount,
IntPtr[] pBuffers, IntPtr pBuffers,
UInt64[] pOffsets IntPtr pOffsets
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -951,16 +951,16 @@ namespace RefreshCS
public static extern void Refresh_BindVertexSamplers( public static extern void Refresh_BindVertexSamplers(
IntPtr device, IntPtr device,
IntPtr commandBuffer, IntPtr commandBuffer,
IntPtr[] pTextures, IntPtr pTextures,
IntPtr[] pSamplers IntPtr pSamplers
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_BindFragmentSamplers( public static extern void Refresh_BindFragmentSamplers(
IntPtr device, IntPtr device,
IntPtr commandBuffer, IntPtr commandBuffer,
IntPtr[] pTextures, IntPtr pTextures,
IntPtr[] pSamplers IntPtr pSamplers
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -974,14 +974,14 @@ namespace RefreshCS
public static extern void Refresh_BindComputeBuffers( public static extern void Refresh_BindComputeBuffers(
IntPtr device, IntPtr device,
IntPtr commandBuffer, IntPtr commandBuffer,
IntPtr[] pBuffers IntPtr pBuffers
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_BindComputeTextures( public static extern void Refresh_BindComputeTextures(
IntPtr device, IntPtr device,
IntPtr commandBuffer, IntPtr commandBuffer,
IntPtr[] pTextures IntPtr pTextures
); );
/* Submission/Presentation */ /* Submission/Presentation */
@ -1014,7 +1014,7 @@ namespace RefreshCS
public static extern void Refresh_Submit( public static extern void Refresh_Submit(
IntPtr device, IntPtr device,
uint commandBufferCount, uint commandBufferCount,
IntPtr[] pCommandBuffers IntPtr pCommandBuffers
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]