Beispiel #1
0
 public Semaphores *GetSemaphoresPtr() => (Semaphores *)semaphores.GetAddress(0);
Beispiel #2
0
        void setupDescriptorSetLayout()
        {
            // Binding 0 : Vertex shader uniform buffer
            VkDescriptorSetLayoutBinding setLayoutBinding = new VkDescriptorSetLayoutBinding()
            {
                descriptorType  = VkDescriptorType.UniformBuffer,
                stageFlags      = VkShaderStageFlags.Vertex,
                binding         = 0,
                descriptorCount = 1
            };

            VkDescriptorSetLayoutCreateInfo descriptorLayout = VkDescriptorSetLayoutCreateInfo.New();

            descriptorLayout.pBindings    = &setLayoutBinding;
            descriptorLayout.bindingCount = 1;

            descriptorSetLayout.Count = 1;
            Util.CheckResult(vkCreateDescriptorSetLayout(Device, &descriptorLayout, null, (VkDescriptorSetLayout *)descriptorSetLayout.GetAddress(0)));

            VkPipelineLayoutCreateInfo pPipelineLayoutCreateInfo = VkPipelineLayoutCreateInfo.New();

            pPipelineLayoutCreateInfo.setLayoutCount = 1;
            pPipelineLayoutCreateInfo.pSetLayouts    = (VkDescriptorSetLayout *)descriptorSetLayout.Data.ToPointer();

            Util.CheckResult(vkCreatePipelineLayout(Device, &pPipelineLayoutCreateInfo, null, out pipelineLayout));
        }