Compare commits

..

10 Commits

Author SHA1 Message Date
cosmonaut b5325e6d03 1.15.0 2023-09-18 23:16:38 -07:00
cosmonaut 60a7523fac Refresh 1.14.0 (#8)
Reviewed-on: MoonsideGames/RefreshCS#8
2023-06-07 21:16:32 +00:00
cosmonaut ebf511133a Refresh 1.13.0 2023-04-18 23:49:14 -07:00
cosmonaut fb5fee5f56 1.12.0 2023-04-03 17:27:34 -07:00
cosmonaut 10f54d6b03 1.11.0 2023-02-07 12:28:36 -08:00
TheSpydog 52d3355120 ABI update + enum fix (#7)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/RefreshCS#7
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-31 20:27:06 +00:00
TheSpydog 880bf79f3a Remove isFixed param from AcquireCommandBuffer (#6)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/RefreshCS#6
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-14 18:04:17 +00:00
cosmonaut 1643061386 1.10.0 2023-01-04 11:35:22 -08:00
TheSpydog e828f9b7fb Add indirect draw command struct (#5)
Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
Reviewed-on: MoonsideGames/RefreshCS#5
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2023-01-04 18:44:44 +00:00
TheSpydog 9068263afc RasterizerState / BlendFactor ABI break (#4)
Updates RasterizerState and BlendFactor for the ABI changes introduced in [this PR](MoonsideGames/Refresh#27).

Reviewed-on: MoonsideGames/RefreshCS#4
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
2022-12-29 03:16:50 +00:00
1 changed files with 56 additions and 23 deletions

View File

@ -36,7 +36,7 @@ namespace RefreshCS
/* Version */ /* Version */
public const uint REFRESH_MAJOR_VERSION = 1; public const uint REFRESH_MAJOR_VERSION = 1;
public const uint REFRESH_MINOR_VERSION = 9; public const uint REFRESH_MINOR_VERSION = 15;
public const uint REFRESH_PATCH_VERSION = 0; public const uint REFRESH_PATCH_VERSION = 0;
public const uint REFRESH_COMPILED_VERSION = ( public const uint REFRESH_COMPILED_VERSION = (
@ -136,10 +136,7 @@ namespace RefreshCS
One, One,
Two, Two,
Four, Four,
Eight, Eight
Sixteen,
ThirtyTwo,
SixtyFour
} }
public enum CubeMapFace : uint public enum CubeMapFace : uint
@ -367,6 +364,15 @@ namespace RefreshCS
public uint level; public uint level;
} }
[StructLayout(LayoutKind.Sequential)]
public struct IndirectDrawCommand
{
public uint vertexCount;
public uint instanceCount;
public uint firstVertex;
public uint firstInstance;
}
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct SamplerStateCreateInfo public struct SamplerStateCreateInfo
{ {
@ -452,6 +458,7 @@ namespace RefreshCS
public uint depth; public uint depth;
public byte isCube; public byte isCube;
public uint levelCount; public uint levelCount;
public SampleCount sampleCount;
public TextureFormat format; public TextureFormat format;
public TextureUsageFlags usageFlags; /* Refresh_TextureUsageFlags */ public TextureUsageFlags usageFlags; /* Refresh_TextureUsageFlags */
} }
@ -546,7 +553,6 @@ namespace RefreshCS
public uint depth; public uint depth;
public uint layer; public uint layer;
public uint level; public uint level;
public SampleCount sampleCount;
public Vec4 clearColor; public Vec4 clearColor;
public LoadOp loadOp; public LoadOp loadOp;
public StoreOp storeOp; public StoreOp storeOp;
@ -711,8 +717,13 @@ namespace RefreshCS
uint yHeight, uint yHeight,
uint uvWidth, uint uvWidth,
uint uvHeight, uint uvHeight,
IntPtr data, IntPtr yDataPtr,
uint dataLength IntPtr uDataPtr,
IntPtr vDataPtr,
uint yDataLength,
uint uvDataLength,
uint yStride,
uint uvStride
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -945,8 +956,7 @@ namespace RefreshCS
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_AcquireCommandBuffer( public static extern IntPtr Refresh_AcquireCommandBuffer(
IntPtr device, IntPtr device
byte isFixed
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -961,8 +971,13 @@ namespace RefreshCS
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Submit( public static extern void Refresh_Submit(
IntPtr device, IntPtr device,
uint commandBufferCount, IntPtr commandBuffer
IntPtr pCommandBuffers );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_SubmitAndAcquireFence(
IntPtr device,
IntPtr commandBuffer
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -970,26 +985,44 @@ namespace RefreshCS
IntPtr device IntPtr device
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_WaitForFences(
IntPtr device,
byte waitAll,
uint fenceCount,
IntPtr pFences
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int Refresh_QueryFence(
IntPtr device,
IntPtr fence
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_ReleaseFence(
IntPtr device,
IntPtr fence
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_Image_Load( public static extern IntPtr Refresh_Image_Load(
[MarshalAs(UnmanagedType.LPStr)] string filename, IntPtr bufferPtr,
out int width, int bufferLength,
out int height, out int w,
out int numChannels out int h,
out int len
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Image_Free( public static extern void Refresh_Image_Free(IntPtr mem);
IntPtr mem
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Image_SavePNG( public static extern IntPtr Refresh_Image_SavePNG(
[MarshalAs(UnmanagedType.LPStr)] string filename, [MarshalAs(UnmanagedType.LPStr)] string filename,
IntPtr data,
int w, int w,
int h, int h
byte bgra,
IntPtr data
); );
} }
} }