public AmtDescriptorSetBindingMap(AmtPipelineLayoutStageResource resources) { Buffers = new AmtDescriptorSetBufferBinding[resources.VertexBuffers.Length]; for (var i = 0; i < Buffers.Length; ++i) { Buffers[i] = new AmtDescriptorSetBufferBinding { }; } SamplerStates = new AmtDescriptorSetSamplerBinding[resources.Samplers.Length]; for (var i = 0; i < SamplerStates.Length; ++i) { SamplerStates[i] = new AmtDescriptorSetSamplerBinding { }; } Textures = new AmtDescriptorSetTextureBinding[resources.Textures.Length]; for (var i = 0; i < Textures.Length; ++i) { Textures[i] = new AmtDescriptorSetTextureBinding { }; } }
public AmtPipelineLayout(MgPipelineLayoutCreateInfo createInfo) { if (createInfo == null) { throw new ArgumentNullException(nameof(createInfo)); } FragmentStage = new AmtPipelineLayoutStageResource(MgShaderStageFlagBits.FRAGMENT_BIT, createInfo); VertexStage = new AmtPipelineLayoutStageResource(MgShaderStageFlagBits.VERTEX_BIT, createInfo); ComputeStage = new AmtPipelineLayoutStageResource(MgShaderStageFlagBits.COMPUTE_BIT, createInfo); }
public void Initialize(AmtDescriptorSetLayout layout) { // TODO : create a dictionary to find which location to bind //PipelineResources = layout.PipelineResources; var computeResources = new AmtPipelineLayoutStageResource(MgShaderStageFlagBits.COMPUTE_BIT, layout, Locator); Compute = new AmtDescriptorSetBindingMap(computeResources); var vertResources = new AmtPipelineLayoutStageResource(MgShaderStageFlagBits.VERTEX_BIT, layout, Locator); Vertex = new AmtDescriptorSetBindingMap(vertResources); var fragResources = new AmtPipelineLayoutStageResource(MgShaderStageFlagBits.FRAGMENT_BIT, layout, Locator); Fragment = new AmtDescriptorSetBindingMap(fragResources); }