Beispiel #1
0
        /// <inheritdoc/>
        protected internal override void OnDestroyed()
        {
            GraphicsDevice.Collect(NativeQueryPool);
            NativeQueryPool = SharpVulkan.QueryPool.Null;

            base.OnDestroyed();
        }
Beispiel #2
0
        private unsafe void Recreate()
        {
            var createInfo = new QueryPoolCreateInfo
            {
                StructureType = StructureType.QueryPoolCreateInfo,
                QueryCount    = (uint)QueryCount,
            };

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

            default:
                throw new NotImplementedException();
            }

            NativeQueryPool = GraphicsDevice.NativeDevice.CreateQueryPool(ref createInfo);
        }