Ejemplo n.º 1
0
        public Result CreateComputePipelines(IMgPipelineCache pipelineCache, MgComputePipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines)
        {
            var output = new List <IMgPipeline>();

            foreach (var info in pCreateInfos)
            {
                var pipeline = new AmtComputePipeline(mDevice, info);
                output.Add(pipeline);
            }
            pPipelines = output.ToArray();
            return(Result.SUCCESS);
        }
Ejemplo n.º 2
0
        public void BindPipeline(IMgPipeline pipeline)
        {
            if (pipeline == null)
            {
                throw new ArgumentNullException(nameof(pipeline));
            }
            mCurrentPipeline = (AmtComputePipeline)pipeline;

            var nextIndex = mBag.Pipelines.Push(mCurrentPipeline);

            mInstructions.Add(new AmtEncodingInstruction
            {
                Category  = AmtEncoderCategory.Compute,
                Index     = nextIndex,
                Operation = CmdBindPipeline,
            });
        }