D3D compatibility ABI break

main
cosmonaut 2022-03-02 11:54:29 -08:00
parent 16970e0020
commit 49b22ad9cc
4 changed files with 18 additions and 24 deletions

@ -1 +1 @@
Subproject commit ef10be4e9db616e345c995ed04de6b92ba5d1d06 Subproject commit 278db7d55b572cf7fc0090b101f02a49770521ec

BIN
moonlibs/windows/Refresh.dll (Stored with Git LFS)

Binary file not shown.

View File

@ -39,14 +39,16 @@ namespace MoonWorksComputeSpriteBatch
{ {
var computeShaderModule = new ShaderModule(graphicsDevice, Path.Combine(System.Environment.CurrentDirectory, "Content", "spritebatch.comp.spv")); var computeShaderModule = new ShaderModule(graphicsDevice, Path.Combine(System.Environment.CurrentDirectory, "Content", "spritebatch.comp.spv"));
var computeShaderState = new ShaderStageState var computeShaderInfo = new ComputeShaderInfo
{ {
ShaderModule = computeShaderModule, ShaderModule = computeShaderModule,
EntryPointName = "main", EntryPointName = "main",
UniformBufferSize = (uint)Marshal.SizeOf<SpriteBatchUniforms>() UniformBufferSize = (uint)Marshal.SizeOf<SpriteBatchUniforms>(),
bufferBindingCount = 2,
imageBindingCount = 0
}; };
ComputePipeline = new ComputePipeline(graphicsDevice, computeShaderState, 2, 0); ComputePipeline = new ComputePipeline(graphicsDevice, computeShaderInfo);
} }
Vertices = new VertexPositionTexcoord[MAX_VERTICES]; Vertices = new VertexPositionTexcoord[MAX_VERTICES];

View File

@ -35,33 +35,26 @@ namespace MoonWorksComputeSpriteBatch
/* Pipeline */ /* Pipeline */
ColorBlendState colorBlendState = new ColorBlendState
{
LogicOpEnable = false,
LogicOp = LogicOp.NoOp,
BlendConstants = new BlendConstants()
};
DepthStencilState depthStencilState = DepthStencilState.Disable; DepthStencilState depthStencilState = DepthStencilState.Disable;
ShaderStageState vertexShaderState = new ShaderStageState GraphicsShaderInfo vertexShaderInfo = new GraphicsShaderInfo
{ {
ShaderModule = vertexShaderModule, ShaderModule = vertexShaderModule,
EntryPointName = "main", EntryPointName = "main",
UniformBufferSize = (uint)Marshal.SizeOf<CameraUniforms>() UniformBufferSize = (uint)Marshal.SizeOf<CameraUniforms>(),
SamplerBindingCount = 0
}; };
ShaderStageState fragmentShaderState = new ShaderStageState GraphicsShaderInfo fragmentShaderInfo = new GraphicsShaderInfo
{ {
ShaderModule = fragmentShaderModule, ShaderModule = fragmentShaderModule,
EntryPointName = "main", EntryPointName = "main",
UniformBufferSize = 0 UniformBufferSize = 0,
SamplerBindingCount = 1
}; };
MultisampleState multisampleState = MultisampleState.None; MultisampleState multisampleState = MultisampleState.None;
GraphicsPipelineLayoutInfo pipelineLayoutInfo = new GraphicsPipelineLayoutInfo(0, 1);
RasterizerState rasterizerState = RasterizerState.CCW_CullNone; RasterizerState rasterizerState = RasterizerState.CCW_CullNone;
var vertexBindings = new VertexBinding[1] var vertexBindings = new VertexBinding[1]
@ -126,17 +119,16 @@ namespace MoonWorksComputeSpriteBatch
var graphicsPipelineCreateInfo = new GraphicsPipelineCreateInfo var graphicsPipelineCreateInfo = new GraphicsPipelineCreateInfo
{ {
ColorBlendState = colorBlendState,
DepthStencilState = depthStencilState, DepthStencilState = depthStencilState,
VertexShaderState = vertexShaderState, VertexShaderInfo = vertexShaderInfo,
FragmentShaderState = fragmentShaderState, FragmentShaderInfo = fragmentShaderInfo,
MultisampleState = multisampleState, MultisampleState = multisampleState,
PipelineLayoutInfo = pipelineLayoutInfo,
RasterizerState = rasterizerState, RasterizerState = rasterizerState,
PrimitiveType = PrimitiveType.TriangleList, PrimitiveType = PrimitiveType.TriangleList,
VertexInputState = vertexInputState, VertexInputState = vertexInputState,
ViewportState = viewportState, ViewportState = viewportState,
AttachmentInfo = graphicsPipelineAttachmentInfo AttachmentInfo = graphicsPipelineAttachmentInfo,
BlendConstants = new BlendConstants()
}; };
spritePipeline = new GraphicsPipeline(GraphicsDevice, graphicsPipelineCreateInfo); spritePipeline = new GraphicsPipeline(GraphicsDevice, graphicsPipelineCreateInfo);