示例#1
0
        public override CommandList CreateCommandList(ref CommandListDescription description)
        {
            CommandList cl = Factory.CreateCommandList(ref description);

            DisposeCollector.Add(cl);
            return(cl);
        }
示例#2
0
 public D3D11CommandList(D3D11GraphicsDevice gd, ref CommandListDescription description)
     : base(ref description)
 {
     _gd       = gd;
     _context  = new DeviceContext(gd.Device);
     _context1 = _context.QueryInterfaceOrNull <DeviceContext1>();
     if (_context1 == null)
     {
         throw new VeldridException("Direct3D 11.1 is required.");
     }
 }
示例#3
0
        public VkCommandList(VkGraphicsDevice gd, ref CommandListDescription description)
            : base(ref description, gd.Features)
        {
            _gd = gd;
            VkCommandPoolCreateInfo poolCI = VkCommandPoolCreateInfo.New();

            poolCI.flags            = VkCommandPoolCreateFlags.ResetCommandBuffer;
            poolCI.queueFamilyIndex = gd.GraphicsQueueIndex;
            VkResult result = vkCreateCommandPool(_gd.Device, ref poolCI, null, out _pool);

            CheckResult(result);

            _cb = GetNextCommandBuffer();
        }
示例#4
0
        public VkCommandList(VkGraphicsDevice gd, ref CommandListDescription description)
            : base(ref description)
        {
            _gd = gd;
            VkCommandPoolCreateInfo poolCI = VkCommandPoolCreateInfo.New();

            poolCI.queueFamilyIndex = gd.GraphicsQueueIndex;
            VkResult result = vkCreateCommandPool(_gd.Device, ref poolCI, null, out _pool);

            CheckResult(result);

            VkCommandBufferAllocateInfo cbAI = VkCommandBufferAllocateInfo.New();

            cbAI.commandPool        = _pool;
            cbAI.commandBufferCount = 1;
            cbAI.level = VkCommandBufferLevel.Primary;
            result     = vkAllocateCommandBuffers(gd.Device, ref cbAI, out _cb);
            CheckResult(result);
        }
示例#5
0
 public OpenGLCommandList(OpenGLGraphicsDevice gd, ref CommandListDescription description)
     : base(ref description, gd.Features, gd.UniformBufferMinOffsetAlignment, gd.StructuredBufferMinOffsetAlignment)
 {
     _gd = gd;
 }
 public override CommandList CreateCommandList(ref CommandListDescription description)
 {
     return(new D3D11CommandList(_gd, ref description));
 }
示例#7
0
 /// <summary>
 /// Creates a new <see cref="CommandList"/>.
 /// </summary>
 /// <param name="description">The desired properties of the created object.</param>
 /// <returns>A new <see cref="CommandList"/>.</returns>
 public abstract CommandList CreateCommandList(ref CommandListDescription description);
示例#8
0
 /// <summary>
 /// Creates a new <see cref="CommandList"/>.
 /// </summary>
 /// <param name="description">The desired properties of the created object.</param>
 /// <returns>A new <see cref="CommandList"/>.</returns>
 public CommandList CreateCommandList(CommandListDescription description) => CreateCommandList(ref description);
示例#9
0
 public OpenGLCommandList(OpenGLGraphicsDevice gd, ref CommandListDescription description)
     : base(ref description, gd.Features)
 {
     _gd = gd;
 }
示例#10
0
 public override CommandList CreateCommandList(ref CommandListDescription description)
 {
     return(new MTLCommandList(ref description, _gd));
 }
 public override CommandList CreateCommandList(ref CommandListDescription description)
 => Track(_factory.CreateCommandList(description));
示例#12
0
 public OpenGLCommandList(ref CommandListDescription description) : base(ref description)
 {
 }
示例#13
0
 public override CommandList CreateCommandList(ref CommandListDescription description)
 {
     return(new OpenGLCommandList(ref description));
 }