public static VkGraphicsPipelineCreateInfo.Raw *MarshalIndirect(this VkGraphicsPipelineCreateInfo s, ref byte *unmanaged) { if (s == null) { return((VkGraphicsPipelineCreateInfo.Raw *) 0); } var result = (VkGraphicsPipelineCreateInfo.Raw *)unmanaged; unmanaged += VkGraphicsPipelineCreateInfo.Raw.SizeInBytes; *result = s.MarshalDirect(ref unmanaged); return(result); }
public static int SizeOfMarshalDirect(this VkGraphicsPipelineCreateInfo s) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } return (s.Next.SizeOfMarshalIndirect() + s.Stages.SizeOfMarshalDirect() + s.VertexInputState.SizeOfMarshalIndirect() + s.InputAssemblyState.SizeOfMarshalIndirect() + s.TessellationState.SizeOfMarshalIndirect() + s.ViewportState.SizeOfMarshalIndirect() + s.RasterizationState.SizeOfMarshalIndirect() + s.MultisampleState.SizeOfMarshalIndirect() + s.DepthStencilState.SizeOfMarshalIndirect() + s.ColorBlendState.SizeOfMarshalIndirect() + s.DynamicState.SizeOfMarshalIndirect()); }
public static VkGraphicsPipelineCreateInfo.Raw MarshalDirect(this VkGraphicsPipelineCreateInfo s, ref byte *unmanaged) { if (s == null) { throw new InvalidOperationException("Trying to directly marshal a null."); } var pNext = s.Next.MarshalIndirect(ref unmanaged); var pStages = s.Stages.MarshalDirect(ref unmanaged); var pVertexInputState = s.VertexInputState.MarshalIndirect(ref unmanaged); var pInputAssemblyState = s.InputAssemblyState.MarshalIndirect(ref unmanaged); var pTessellationState = s.TessellationState.MarshalIndirect(ref unmanaged); var pViewportState = s.ViewportState.MarshalIndirect(ref unmanaged); var pRasterizationState = s.RasterizationState.MarshalIndirect(ref unmanaged); var pMultisampleState = s.MultisampleState.MarshalIndirect(ref unmanaged); var pDepthStencilState = s.DepthStencilState.MarshalIndirect(ref unmanaged); var pColorBlendState = s.ColorBlendState.MarshalIndirect(ref unmanaged); var pDynamicState = s.DynamicState.MarshalIndirect(ref unmanaged); VkGraphicsPipelineCreateInfo.Raw result; result.sType = VkStructureType.GraphicsPipelineCreateInfo; result.pNext = pNext; result.flags = s.Flags; result.stageCount = s.Stages?.Count ?? 0; result.pStages = pStages; result.pVertexInputState = pVertexInputState; result.pInputAssemblyState = pInputAssemblyState; result.pTessellationState = pTessellationState; result.pViewportState = pViewportState; result.pRasterizationState = pRasterizationState; result.pMultisampleState = pMultisampleState; result.pDepthStencilState = pDepthStencilState; result.pColorBlendState = pColorBlendState; result.pDynamicState = pDynamicState; result.layout = s.Layout?.Handle ?? VkPipelineLayout.HandleType.Null; result.renderPass = s.RenderPass?.Handle ?? VkRenderPass.HandleType.Null; result.subpass = s.Subpass; result.basePipelineHandle = s.BasePipelineHandle?.Handle ?? VkPipeline.HandleType.Null; result.basePipelineIndex = s.BasePipelineIndex; return(result); }
public static int SizeOfMarshalIndirect(this VkGraphicsPipelineCreateInfo s) => s == null ? 0 : s.SizeOfMarshalDirect() + VkGraphicsPipelineCreateInfo.Raw.SizeInBytes;