Пример #1
0
        public Result Free(IMgDescriptorPool descriptorPool, IMgDescriptorSet[] pDescriptorSets)
        {
            if (descriptorPool == null)
            {
                throw new ArgumentNullException(nameof(descriptorPool));
            }

            if (pDescriptorSets == null)
            {
                throw new ArgumentNullException(nameof(pDescriptorSets));
            }

            var parentPool = (IGLNextDescriptorPool)descriptorPool;

            foreach (var descSet in pDescriptorSets)
            {
                var bDescSet = (IGLDescriptorSet)descSet;
                if (bDescSet != null && ReferenceEquals(parentPool, bDescSet.Parent))
                {
                    if (bDescSet.IsValidDescriptorSet)
                    {
                        foreach (var resource in bDescSet.Resources)
                        {
                            parentPool.ResetResource(resource);
                        }
                        bDescSet.Invalidate();
                        parentPool.AllocatedSets.Remove(bDescSet.Key);
                    }
                }
            }

            return(Result.SUCCESS);
        }
Пример #2
0
 public MgThreadPartition(
     IMgPhysicalDevice physicalDevice,
     IMgDevice device, IMgQueue queue,
     IMgCommandPool commandPool,
     IMgDescriptorPool descPool,
     MgPhysicalDeviceMemoryProperties deviceMemoryProperties)
 {
     mPhysicalDevice         = physicalDevice;
     mDevice                 = device;
     this.Queue              = queue;
     this.CommandPool        = commandPool;
     this.DescriptorPool     = descPool;
     mDeviceMemoryProperties = deviceMemoryProperties;
 }
Пример #3
0
 public Result FreeDescriptorSets(IMgDescriptorPool descriptorPool, IMgDescriptorSet[] pDescriptorSets)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public Result CreateDescriptorPool(MgDescriptorPoolCreateInfo pCreateInfo, IMgAllocationCallbacks allocator, out IMgDescriptorPool pDescriptorPool)
 {
     pDescriptorPool = new AmtDescriptorPool(pCreateInfo);
     return(Result.SUCCESS);
 }
Пример #5
0
 public Result FreeDescriptorSets(IMgDescriptorPool descriptorPool, IMgDescriptorSet[] pDescriptorSets)
 {
     return(mEntrypoint.DescriptorSet.Free(descriptorPool, pDescriptorSets));
 }
Пример #6
0
 public Result ResetDescriptorPool(IMgDescriptorPool descriptorPool, uint flags)
 {
     throw new NotImplementedException();
 }
Пример #7
0
 public Result CreateDescriptorPool(MgDescriptorPoolCreateInfo pCreateInfo, IMgAllocationCallbacks allocator, out IMgDescriptorPool pDescriptorPool)
 {
     throw new NotImplementedException();
 }