Esempio n. 1
0
        protected QueryPool(Device device, VkQueryType queryType, VkQueryPipelineStatisticFlags statisticFlags, uint count = 1)
            : base(device)
        {
            createInfos = VkQueryPoolCreateInfo.New(queryType, statisticFlags, count);

            //Activate ();
        }
Esempio n. 2
0
 public override void Activate()
 {
     if (state != ActivableState.Activated)
     {
         VkQueryPoolCreateInfo infos = createInfos;
         Utils.CheckResult(vkCreateQueryPool(Dev.VkDev, ref infos, IntPtr.Zero, out handle));
     }
     base.Activate();
 }
Esempio n. 3
0
 public QueryPool(Device device) : base(device)
 {
     QueryCount = 1;
     VkQueryPoolCreateInfo createInfo = new VkQueryPoolCreateInfo
     {
         sType      = VkStructureType.QueryPoolCreateInfo,
         pNext      = null,
         queryCount = (uint)QueryCount,
     };
 }
Esempio n. 4
0
        void CreateQueryPool(QueryPoolCreateInfo mInfo)
        {
            VkQueryPoolCreateInfo info = new VkQueryPoolCreateInfo();

            info.sType              = VkStructureType.QueryPoolCreateInfo;
            info.queryType          = mInfo.queryType;
            info.queryCount         = mInfo.queryCount;
            info.pipelineStatistics = mInfo.pipelineStatistics;

            Device.Commands.createQueryPool(Device.Native, ref info, Device.Instance.AllocationCallbacks, out queryPool);
        }
Esempio n. 5
0
        public VkQueryPool(VkQueryType queryType, uint queryCount, VkQueryPipelineStatisticFlags pipelineStatistics = VkQueryPipelineStatisticFlags.None)
        {
            var createInfo = new VkQueryPoolCreateInfo
            {
                sType              = VkStructureType.QueryPoolCreateInfo,
                queryType          = queryType,
                queryCount         = queryCount,
                pipelineStatistics = pipelineStatistics,
            };

            Vulkan.vkCreateQueryPool(Vulkan.device, &createInfo, null, out this).CheckResult();
        }
Esempio n. 6
0
        private unsafe void Recreate()
        {
            var createInfo = new VkQueryPoolCreateInfo
            {
                sType      = VkStructureType.QueryPoolCreateInfo,
                queryCount = (uint)QueryCount,
            };

            switch (QueryType)
            {
            case QueryType.Timestamp:
                createInfo.queryType = VkQueryType.Timestamp;
                break;

            default:
                throw new NotImplementedException();
            }

            vkCreateQueryPool(GraphicsDevice.NativeDevice, &createInfo, null, out NativeQueryPool);
        }
Esempio n. 7
0
 public static extern VkResult CreateQueryPool(
     VkDevice device,
     ref VkQueryPoolCreateInfo pCreateInfo,
     IntPtr pAllocator,
     out VkQueryPool pQueryPool
     );