void setupDescriptorPool() { // Example uses one ubo VkDescriptorPoolSize poolSizes = Initializers.descriptorPoolSize(VkDescriptorType.UniformBuffer, 1); VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( 1, &poolSizes, 2); Util.CheckResult(vkCreateDescriptorPool(device, &descriptorPoolInfo, null, out descriptorPool)); }
void setupDescriptorPool() { FixedArray2<VkDescriptorPoolSize> poolSizes = new FixedArray2<VkDescriptorPoolSize>( Initializers.descriptorPoolSize(VkDescriptorType.UniformBuffer, 2), Initializers.descriptorPoolSize(VkDescriptorType.CombinedImageSampler, 2)); VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( poolSizes.Count, &poolSizes.First, 2); Util.CheckResult(vkCreateDescriptorPool(device, &descriptorPoolInfo, null, out descriptorPool)); }
void setupDescriptorPool() { FixedArray2 <VkDescriptorPoolSize> poolSizes = new FixedArray2 <VkDescriptorPoolSize>( Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1), Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1)); VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( (uint)(poolSizes.Count), &poolSizes.First, 1); Util.CheckResult(vkCreateDescriptorPool(device, &descriptorPoolInfo, null, out descriptorPool)); }
void setupDescriptorPool() { // Example uses one ubo and one combined image sampler FixedArray2 <VkDescriptorPoolSize> poolSizes = new FixedArray2 <VkDescriptorPoolSize>( Initializers.descriptorPoolSize(VkDescriptorType.UniformBuffer, 1), Initializers.descriptorPoolSize(VkDescriptorType.CombinedImageSampler, 1)); VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( poolSizes.Count, &poolSizes.First, 1); Util.CheckResult(vkCreateDescriptorPool(Device, &descriptorPoolInfo, null, out descriptorPool)); }
void setupDescriptorPool() { // Example uses one ubo and one image sampler FixedArray2 <VkDescriptorPoolSize> poolSizes = new FixedArray2 <VkDescriptorPoolSize>( Initializers.descriptorPoolSize(VkDescriptorType.UniformBuffer, 1), Initializers.descriptorPoolSize(VkDescriptorType.CombinedImageSampler, 1) ); VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( poolSizes.Count, (VkDescriptorPoolSize *)Unsafe.AsPointer(ref poolSizes), 2); Util.CheckResult(vkCreateDescriptorPool(device, &descriptorPoolInfo, null, out descriptorPool)); }
void setupDescriptorPool() { // Example uses one ubo and one image sampler FixedArray3 <VkDescriptorPoolSize> poolSizes = new FixedArray3 <VkDescriptorPoolSize>( Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1), Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1), Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1)); VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( (uint)(poolSizes.Count), &poolSizes.First, 2); Util.CheckResult(vkCreateDescriptorPool(device, &descriptorPoolInfo, null, out descriptorPool)); }
void setupDescriptorPool() { // Example uses three ubos and one image sampler NativeList <VkDescriptorPoolSize> poolSizes = new NativeList <VkDescriptorPoolSize> { Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 4), Initializers.descriptorPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 6) }; VkDescriptorPoolCreateInfo descriptorPoolInfo = Initializers.descriptorPoolCreateInfo( poolSizes.Count, (VkDescriptorPoolSize *)poolSizes.Data, 2); Util.CheckResult(vkCreateDescriptorPool(device, &descriptorPoolInfo, null, out descriptorPool)); }