예제 #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));
        }
예제 #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);
        }
예제 #3
0
 public void AddGraphicsPipeline(ref PipelineUid key, Auto <DisposablePipeline> pipeline)
 {
     (_graphicsPipelineCache ??= new()).Add(ref key, pipeline);
 }