Esempio n. 1
0
        private void CreateLogicalDevice()
        {
            var queueFamilies = FindQueueFamilies(physicalDevice, surface).Value;

            var queueCreateInfos = queueFamilies.GraphicsFamily == queueFamilies.PresentFamily
                ? new[]
            { new VkDeviceQueueCreateInfo
              {
                  QueueFamilyIndex = queueFamilies.GraphicsFamily,
                  QueuePriorities  = new [] { 1f }
              } }
                : new []
            {
                new VkDeviceQueueCreateInfo
                {
                    QueueFamilyIndex = queueFamilies.GraphicsFamily,
                    QueuePriorities  = new[] { 1f }
                },
                new VkDeviceQueueCreateInfo
                {
                    QueueFamilyIndex = queueFamilies.PresentFamily,
                    QueuePriorities  = new[] { 1f }
                }
            };
            var deviceFeatures = new VkPhysicalDeviceFeatures
            {
            };
            var createInfo = new VkDeviceCreateInfo
            {
                QueueCreateInfos      = queueCreateInfos,
                EnabledFeatures       = deviceFeatures,
                EnabledExtensionNames = DeviceExtensions,
                EnabledLayerNames     = LayerNames
            };

            device        = physicalDevice.CreateDevice(createInfo, null).Object;
            graphicsQueue = device.GetDeviceQueue(queueFamilies.GraphicsFamily, 0);
            presentQueue  = device.GetDeviceQueue(queueFamilies.PresentFamily, 0);
        }
Esempio n. 2
0
 public VkSwapchainKHR(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 3
0
 public VkDescriptorPool(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 4
0
 public VkQueue(IVkDevice device, HandleType handle)
 {
     Device = device;
     Handle = handle;
 }
Esempio n. 5
0
 public VkShaderModule(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 6
0
 public VkRenderPass(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 7
0
 public VkCommandBuffer(IVkDevice device, HandleType handle)
 {
     Device = device;
     Handle = handle;
 }
Esempio n. 8
0
 public VkDescriptorSet(IVkDevice device, HandleType handle)
 {
     Device = device;
     Handle = handle;
 }
Esempio n. 9
0
 public VkDeviceMemory(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device = device;
     Handle = handle;
     Allocator = allocator;
 }
Esempio n. 10
0
 public VkPipelineLayout(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 11
0
 public VkPipelineCache(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device = device;
     Handle = handle;
     Allocator = allocator;
 }
Esempio n. 12
0
 public VkFramebuffer(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device = device;
     Handle = handle;
     Allocator = allocator;
 }
Esempio n. 13
0
 public VkCommandPool(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device = device;
     Handle = handle;
     Allocator = allocator;
 }
Esempio n. 14
0
 public VkDescriptorSetLayout(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device = device;
     Handle = handle;
     Allocator = allocator;
 }
Esempio n. 15
0
 public VkImageView(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 16
0
 public VkSampler(IVkDevice device, HandleType handle, IVkAllocationCallbacks allocator)
 {
     Device    = device;
     Handle    = handle;
     Allocator = allocator;
 }
Esempio n. 17
0
 public VkCommandBuffer(IVkDevice device, HandleType handle)
 {
     Device = device;
     Handle = handle;
 }