public Result CreateGraphicsPipelines(IMgPipelineCache pipelineCache, MgGraphicsPipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines) { var output = new List <IMgPipeline> (); foreach (var info in pCreateInfos) { var bLayout = (IGLPipelineLayout)info.Layout; if (bLayout == null) { throw new ArgumentException("pCreateInfos[].Layout"); } if (info.VertexInputState == null) { throw new ArgumentNullException("pCreateInfos[].VertexInputState"); } if (info.InputAssemblyState == null) { throw new ArgumentNullException("pCreateInfos[].InputAssemblyState"); } if (info.RasterizationState == null) { throw new ArgumentNullException("pCreateInfos[].RasterizationState"); } var programId = mEntrypoint.GraphicsCompiler.Compile(info); var blocks = mEntrypoint.GraphicsCompiler.Inspect(programId); var arrayMapper = new GLInternalCacheArrayMapper(bLayout, blocks); var internalCache = new GLInternalCache(bLayout, blocks, arrayMapper); /// MAKE SURE ACTIVE UNIFORMS ARE AVAILABLE //int noOfActiveUniforms = mEntrypoint.GraphicsPipeline.GetActiveUniforms(programId); // var names = mEntrypoint.GraphicsPipeline.GetUniformBlocks(programId); //var binder = ConstructBinder(bLayout, programId, noOfActiveUniforms); var pipeline = new GLGraphicsPipeline( mEntrypoint.GraphicsPipeline, programId, info, internalCache, bLayout ); // TODO : BASE PIPELINE / CHILD output.Add(pipeline); } pPipelines = output.ToArray(); return(Result.SUCCESS); }
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); }
public Result CreateGraphicsPipelines(IMgPipelineCache pipelineCache, MgGraphicsPipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines) { var noOfPipelines = pCreateInfos.Length; var output = new IMgPipeline[pCreateInfos.Length]; for (var i = 0; i < noOfPipelines; i += 1) { output[i] = new MockGraphicsPipeline(); } pPipelines = output; return(Result.SUCCESS); }
public Result CreateGraphicsPipelines(IMgPipelineCache pipelineCache, MgGraphicsPipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines) { if (pCreateInfos == null) { throw new ArgumentNullException(nameof(pCreateInfos)); } var output = new List <IMgPipeline>(); foreach (var info in pCreateInfos) { var pipeline = new AmtGraphicsPipeline(mGenerator, mDevice, info); output.Add(pipeline); } pPipelines = output.ToArray(); return(Result.SUCCESS); }
public Result CreateGraphicsPipelines(IMgPipelineCache pipelineCache, MgGraphicsPipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines) { var noOfPipelines = pCreateInfos.Length; pPipelines = new IMgPipeline[noOfPipelines]; for (var i = 0; i < noOfPipelines; i += 1) { var createInfo = pCreateInfos[i]; var bLayout = (IGLPipelineLayout)createInfo.Layout; var programId = 0; IGLShaderModuleInspector inspector = null; var blocks = inspector.Inspect(programId); var arrayMapper = new GLInternalCacheArrayMapper(bLayout, blocks); var cache = new GLInternalCache(bLayout, blocks, arrayMapper); } return(Result.SUCCESS); }
public Result MergePipelineCaches(IMgPipelineCache dstCache, IMgPipelineCache[] pSrcCaches) { throw new NotImplementedException(); }
public Result GetPipelineCacheData(IMgPipelineCache pipelineCache, out byte[] pData) { throw new NotImplementedException(); }
public Result CreatePipelineCache(MgPipelineCacheCreateInfo pCreateInfo, IMgAllocationCallbacks allocator, out IMgPipelineCache pPipelineCache) { throw new NotImplementedException(); }
public Result CreateComputePipelines(IMgPipelineCache pipelineCache, MgComputePipelineCreateInfo[] pCreateInfos, IMgAllocationCallbacks allocator, out IMgPipeline[] pPipelines) { throw new NotImplementedException(); }