Compare commits

..

No commits in common. "main" and "main" have entirely different histories.
main ... main

1 changed files with 53 additions and 57 deletions

View File

@ -36,7 +36,7 @@ namespace RefreshCS
/* Version */
public const uint REFRESH_MAJOR_VERSION = 1;
public const uint REFRESH_MINOR_VERSION = 15;
public const uint REFRESH_MINOR_VERSION = 8;
public const uint REFRESH_PATCH_VERSION = 0;
public const uint REFRESH_COMPILED_VERSION = (
@ -136,7 +136,10 @@ namespace RefreshCS
One,
Two,
Four,
Eight
Eight,
Sixteen,
ThirtyTwo,
SixtyFour
}
public enum CubeMapFace : uint
@ -247,7 +250,11 @@ namespace RefreshCS
OneMinusDestinationAlpha,
ConstantColor,
OneMinusConstantColor,
SourceAlphaSaturate
SourceAlphaSaturate,
SourceOneColor,
OneMinusSourceOneColor,
SourceOneAlpha,
OneMinusSourceOneAlpha
}
[Flags]
@ -364,15 +371,6 @@ namespace RefreshCS
public uint level;
}
[StructLayout(LayoutKind.Sequential)]
public struct IndirectDrawCommand
{
public uint vertexCount;
public uint instanceCount;
public uint firstVertex;
public uint firstInstance;
}
[StructLayout(LayoutKind.Sequential)]
public struct SamplerStateCreateInfo
{
@ -457,8 +455,8 @@ namespace RefreshCS
public uint height;
public uint depth;
public byte isCube;
public uint levelCount;
public SampleCount sampleCount;
public uint levelCount;
public TextureFormat format;
public TextureUsageFlags usageFlags; /* Refresh_TextureUsageFlags */
}
@ -487,6 +485,7 @@ namespace RefreshCS
[StructLayout(LayoutKind.Sequential)]
public struct RasterizerState
{
public byte depthClampEnable;
public FillMode fillMode;
public CullMode cullMode;
public FrontFace frontFace;
@ -521,6 +520,7 @@ namespace RefreshCS
public struct ColorAttachmentDescription
{
public TextureFormat format;
public SampleCount sampleCount;
public ColorAttachmentBlendState blendState;
}
@ -553,6 +553,7 @@ namespace RefreshCS
public uint depth;
public uint layer;
public uint level;
public SampleCount sampleCount;
public Vec4 clearColor;
public LoadOp loadOp;
public StoreOp storeOp;
@ -717,13 +718,8 @@ namespace RefreshCS
uint yHeight,
uint uvWidth,
uint uvHeight,
IntPtr yDataPtr,
IntPtr uDataPtr,
IntPtr vDataPtr,
uint yDataLength,
uint uvDataLength,
uint yStride,
uint uvStride
IntPtr data,
uint dataLength
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -829,6 +825,17 @@ namespace RefreshCS
public static extern void Refresh_BeginRenderPass(
IntPtr device,
IntPtr commandBuffer,
in Rect renderArea,
IntPtr colorAttachmentInfos,
uint colorAttachmentCount,
IntPtr depthStencilAttachmentInfo /* can be NULL */
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_BeginRenderPass(
IntPtr device,
IntPtr commandBuffer,
IntPtr renderArea, /* can be NULL */
IntPtr colorAttachmentInfos,
uint colorAttachmentCount,
IntPtr depthStencilAttachmentInfo /* can be NULL */
@ -838,6 +845,17 @@ namespace RefreshCS
public static unsafe extern void Refresh_BeginRenderPass(
IntPtr device,
IntPtr commandBuffer,
in Rect renderArea,
ColorAttachmentInfo* colorAttachmentInfos,
uint colorAttachmentCount,
DepthStencilAttachmentInfo* depthStencilAttachmentInfo /* can be NULL */
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static unsafe extern void Refresh_BeginRenderPass(
IntPtr device,
IntPtr commandBuffer,
IntPtr renderArea, /* can be NULL */
ColorAttachmentInfo* colorAttachmentInfos,
uint colorAttachmentCount,
DepthStencilAttachmentInfo* depthStencilAttachmentInfo /* can be NULL */
@ -956,7 +974,8 @@ namespace RefreshCS
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_AcquireCommandBuffer(
IntPtr device
IntPtr device,
byte isFixed
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -971,13 +990,8 @@ namespace RefreshCS
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Submit(
IntPtr device,
IntPtr commandBuffer
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_SubmitAndAcquireFence(
IntPtr device,
IntPtr commandBuffer
uint commandBufferCount,
IntPtr pCommandBuffers
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
@ -985,44 +999,26 @@ namespace RefreshCS
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)]
public static extern IntPtr Refresh_Image_Load(
IntPtr bufferPtr,
int bufferLength,
out int w,
out int h,
out int len
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Image_Free(IntPtr mem);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_Image_SavePNG(
[MarshalAs(UnmanagedType.LPStr)] string filename,
IntPtr data,
out int width,
out int height,
out int numChannels
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Image_Free(
IntPtr mem
);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void Refresh_Image_SavePNG(
[MarshalAs(UnmanagedType.LPStr)] string filename,
int w,
int h
int h,
byte bgra,
IntPtr data
);
}
}