Exemplo n.º 1
0
 internal Queue(Device device, VkQueue queue, uint familyIndex)
 {
     this.device = device;
     this.queue  = queue;
     FamilyIndex = familyIndex;
     Family      = device.PhysicalDevice.QueueFamilies[(int)familyIndex];
 }
Exemplo n.º 2
0
        void GetQueueProperties()
        {
            List <QueueFamily> queueFamilies = new List <QueueFamily>();
            uint count = 0;

            Instance.Commands.getQueueFamilyProperties(physicalDevice, ref count, IntPtr.Zero);
            var props = new MarshalledArray <VkQueueFamilyProperties>((int)count);

            Instance.Commands.getQueueFamilyProperties(physicalDevice, ref count, props.Address);

            using (props) {
                for (int i = 0; i < count; i++)
                {
                    var queueFamily = props[i];
                    var fam         = new QueueFamily(queueFamily, this, (uint)i);
                    queueFamilies.Add(fam);
                }
            }

            QueueFamilies = queueFamilies.AsReadOnly();
        }