<commit_before>﻿using System;
using System.Collections.Generic;

namespace CSGL.Vulkan {
    public class PipelineShaderStageCreateInfo {
        public VkShaderStageFlags stage;
        public ShaderModule module;
        public string name;
        public IntPtr specializationInfo;

        internal VkPipelineShaderStageCreateInfo GetNative(List<IDisposable> marshalled) {
            var result = new VkPipelineShaderStageCreateInfo();
            result.sType = VkStructureType.StructureTypePipelineShaderStageCreateInfo;
            result.stage = stage;
            result.module = module.Native;
            var strInterop = new InteropString(name);
            result.pName = strInterop.Address;
            result.pSpecializationInfo = specializationInfo;

            marshalled.Add(strInterop);

            return result;
        }
    }

    public class PipelineVertexInputStateCreateInfo {
        public VkVertexInputBindingDescription[] vertexBindingDescriptions;
        public VkVertexInputAttributeDescription[] vertexAttributeDescriptions;

        internal VkPipelineVertexInputStateCreateInfo GetNative(List<IDisposable> marshalled) {
            var result = new VkPipelineVertexInputStateCreateInfo();

            var attMarshalled = new MarshalledArray<VkVertexInputAttributeDescription>(vertexAttributeDescriptions);
            result.sType = VkStructureType.StructureTypePipelineVertexInputStateCreateInfo;
            result.vertexAttributeDescriptionCount = (uint)attMarshalled.Count;
            result.pVertexAttributeDescriptions = attMarshalled.Address;

            var bindMarshalled = new MarshalledArray<VkVertexInputBindingDescription>(vertexBindingDescriptions);
            result.vertexBindingDescriptionCount = (uint)bindMarshalled.Count;
            result.pVertexBindingDescriptions = bindMarshalled.Address;<commit_msg>Refactored pipeline creation<commit_after>﻿using System;
using System.Collections.Generic;

namespace CSGL.Vulkan {
    public class PipelineShaderStageCreateInfo {
        public VkShaderStageFlags stage;
        public ShaderModule module;
        public string name;
        public IntPtr specializationInfo;

        internal VkPipelineShaderStageCreateInfo GetNative(List<IDisposable> marshalled) {
            var result = new VkPipelineShaderStageCreateInfo();
            result.sType = VkStructureType.StructureTypePipelineShaderStageCreateInfo;
            result.stage = stage;
            result.module = module.Native;
            var strInterop = new InteropString(name);
            result.pName = strInterop.Address;
            result.pSpecializationInfo = specializationInfo;

            marshalled.Add(strInterop);

            return result;
        }
    }

    public class PipelineVertexInputStateCreateInfo {
        public VkVertexInputBindingDescription[] vertexBindingDescriptions;
        public VkVertexInputAttributeDescription[] vertexAttributeDescriptions;

        internal VkPipelineVertexInputStateCreateInfo GetNative(List<IDisposable> marshalled) {
            var result = new VkPipelineVertexInputStateCreateInfo();
            result.sType = VkStructureType.StructureTypePipelineVertexInputStateCreateInfo;

            var attMarshalled = new MarshalledArray<VkVertexInputAttributeDescription>(vertexAttributeDescriptions);
            result.vertexAttributeDescriptionCount = (uint)attMarshalled.Count;
            result.pVertexAttributeDescriptions = attMarshalled.Address;

            var bindMarshalled = new MarshalledArray<VkVertexInputBindingDescription>(vertexBindingDescriptions);
            result.vertexBindingDescriptionCount = (uint)bindMarshalled.Count;
            result.pVertexBindingDescriptions = bindMarshalled.Address;
{'fraction_non_alphanumeric': 0.055955235811350916, 'fraction_numerical': 0.0, 'mean_word_length': 3.453143534994069, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6604290', 'n_tokens_mistral': 899, 'n_tokens_neox': 871, 'n_words': 163}