Example #1
0
        public bool TryGetGraphicsPipeline(ref PipelineUid key, out Auto <DisposablePipeline> pipeline)
        {
            if (_graphicsPipelineCache == null)
            {
                pipeline = default;
                return(false);
            }

            return(_graphicsPipelineCache.TryGetValue(ref key, out pipeline));
        }
Example #2
0
        public bool TryGetGraphicsPipeline(ref PipelineUid key, out Auto <DisposablePipeline> pipeline)
        {
            if (_graphicsPipelineCache == null)
            {
                pipeline = default;
                return(false);
            }

            if (!_graphicsPipelineCache.TryGetValue(ref key, out pipeline))
            {
                if (_firstBackgroundUse)
                {
                    Logger.Warning?.Print(LogClass.Gpu, "Background pipeline compile missed on draw - incorrect pipeline state?");
                    _firstBackgroundUse = false;
                }

                return(false);
            }

            _firstBackgroundUse = false;

            return(true);
        }
Example #3
0
 public void AddGraphicsPipeline(ref PipelineUid key, Auto <DisposablePipeline> pipeline)
 {
     (_graphicsPipelineCache ??= new()).Add(ref key, pipeline);
 }