示例#1
0
        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
                {
                };
            }
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }