D3D compatibility ABI break

remotes/1695057764242510520/main
cosmonaut 2022-03-02 11:40:06 -08:00
parent d844fe56ee
commit 642313f780
1 changed files with 17 additions and 60 deletions

View File

@ -172,16 +172,14 @@ namespace RefreshCS
public enum FillMode public enum FillMode
{ {
Fill, Fill,
Line, Line
Point
} }
public enum CullMode public enum CullMode
{ {
None, None,
Front, Front,
Back, Back
FrontAndBack
} }
public enum FrontFace public enum FrontFace
@ -223,26 +221,6 @@ namespace RefreshCS
Max Max
} }
public enum LogicOp
{
Clear,
And,
AndReverse,
Copy,
AndInverted,
NoOp,
Xor,
Or,
Nor,
Equivalent,
Invert,
OrReverse,
CopyInverted,
OrInverted,
Nand,
Set
}
public enum BlendFactor public enum BlendFactor
{ {
Zero, Zero,
@ -257,8 +235,6 @@ namespace RefreshCS
OneMinusDestinationAlpha, OneMinusDestinationAlpha,
ConstantColor, ConstantColor,
OneMinusConstantColor, OneMinusConstantColor,
ConstantAlpha,
OneMinusConstantAlpha,
SourceAlphaSaturate, SourceAlphaSaturate,
SourceOneColor, SourceOneColor,
OneMinusSourceOneColor, OneMinusSourceOneColor,
@ -297,8 +273,7 @@ namespace RefreshCS
public enum Filter public enum Filter
{ {
Nearest, Nearest,
Linear, Linear
Cubic
} }
public enum SamplerMipmapMode public enum SamplerMipmapMode
@ -450,20 +425,6 @@ namespace RefreshCS
public ColorComponentFlags colorWriteMask; public ColorComponentFlags colorWriteMask;
} }
[StructLayout(LayoutKind.Sequential)]
public struct ComputePipelineLayoutCreateInfo
{
public uint bufferBindingCount;
public uint imageBindingCount;
}
[StructLayout(LayoutKind.Sequential)]
public struct GraphicsPipelineLayoutCreateInfo
{
public uint vertexSamplerBindingCount;
public uint fragmentSamplerBindingCount;
}
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct ShaderModuleCreateInfo public struct ShaderModuleCreateInfo
{ {
@ -485,19 +446,24 @@ namespace RefreshCS
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct ShaderStageState public struct GraphicsShaderInfo
{ {
public IntPtr shaderModule; public IntPtr shaderModule;
[MarshalAs(UnmanagedType.LPStr)] [MarshalAs(UnmanagedType.LPStr)]
public string entryPointName; public string entryPointName;
public ulong uniformBufferSize; public ulong uniformBufferSize;
public uint samplerBindingCount;
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct ComputePipelineCreateInfo public struct ComputeShaderInfo
{ {
public ShaderStageState computeShaderState; public IntPtr shaderModule;
public ComputePipelineLayoutCreateInfo pipelineLayoutCreateInfo; [MarshalAs(UnmanagedType.LPStr)]
public string entryPointName;
public ulong uniformBufferSize;
public uint bufferBindingCount;
public uint imageBindingCount;
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
@ -544,14 +510,6 @@ namespace RefreshCS
public float maxDepthBounds; public float maxDepthBounds;
} }
[StructLayout(LayoutKind.Sequential)]
public unsafe struct PipelineColorBlendState
{
public byte logicOpEnable;
public LogicOp logicOp;
public fixed float blendConstants[4];
}
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct ColorAttachmentDescription public struct ColorAttachmentDescription
{ {
@ -570,19 +528,18 @@ namespace RefreshCS
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public struct GraphicsPipelineCreateInfo public unsafe struct GraphicsPipelineCreateInfo
{ {
public ShaderStageState vertexShaderState; public GraphicsShaderInfo vertexShaderInfo;
public ShaderStageState fragmentShaderState; public GraphicsShaderInfo fragmentShaderInfo;
public VertexInputState vertexInputState; public VertexInputState vertexInputState;
public PrimitiveType primitiveType; public PrimitiveType primitiveType;
public ViewportState viewportState; public ViewportState viewportState;
public RasterizerState rasterizerState; public RasterizerState rasterizerState;
public MultisampleState multisampleState; public MultisampleState multisampleState;
public DepthStencilState depthStencilState; public DepthStencilState depthStencilState;
public PipelineColorBlendState colorBlendState;
public GraphicsPipelineLayoutCreateInfo pipelineLayoutCreateInfo;
public GraphicsPipelineAttachmentInfo attachmentInfo; public GraphicsPipelineAttachmentInfo attachmentInfo;
public fixed float blendConstants[4];
} }
public struct ColorAttachmentInfo public struct ColorAttachmentInfo
@ -694,7 +651,7 @@ namespace RefreshCS
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Refresh_CreateComputePipeline( public static extern IntPtr Refresh_CreateComputePipeline(
IntPtr device, IntPtr device,
in ComputePipelineCreateInfo computePipelineCreateInfo in ComputeShaderInfo computeShaderInfo
); );
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]