コード例 #1
0
        public PipelineLayoutCacheEntry(VulkanGraphicsDevice gd, Device device, uint stages)
        {
            _gd     = gd;
            _device = device;
            _stages = stages;

            DescriptorSetLayouts = PipelineLayoutFactory.Create(gd, device, stages, out var pipelineLayout);
            PipelineLayout       = pipelineLayout;

            DescriptorSetCache = new DescriptorSetCache(gd, DescriptorSetLayouts);

            _dsCache = new List <Auto <DescriptorSetCollection> > [CommandBufferPool.MaxCommandBuffers][];

            for (int i = 0; i < CommandBufferPool.MaxCommandBuffers; i++)
            {
                _dsCache[i] = new List <Auto <DescriptorSetCollection> > [PipelineBase.DescriptorSetLayouts];

                for (int j = 0; j < PipelineBase.DescriptorSetLayouts; j++)
                {
                    _dsCache[i][j] = new List <Auto <DescriptorSetCollection> >();
                }
            }

            _dsCacheCursor = new int[PipelineBase.DescriptorSetLayouts];
        }
コード例 #2
0
 public PipelineLayoutCacheEntry(VulkanRenderer gd, Device device, ShaderSource[] shaders) : this(gd, device)
 {
     DescriptorSetLayouts = PipelineLayoutFactory.CreateMinimal(gd, device, shaders, out var pipelineLayout);
     PipelineLayout       = pipelineLayout;
 }
コード例 #3
0
 public PipelineLayoutCacheEntry(VulkanRenderer gd, Device device, uint stages, bool usePd) : this(gd, device)
 {
     DescriptorSetLayouts = PipelineLayoutFactory.Create(gd, device, stages, usePd, out var pipelineLayout);
     PipelineLayout       = pipelineLayout;
 }