Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@ FILE: ../../../flutter/impeller/renderer/command_buffer.cc
FILE: ../../../flutter/impeller/renderer/command_buffer.h
FILE: ../../../flutter/impeller/renderer/context.cc
FILE: ../../../flutter/impeller/renderer/context.h
FILE: ../../../flutter/impeller/renderer/descriptor_set_layout.h
FILE: ../../../flutter/impeller/renderer/device_buffer.cc
FILE: ../../../flutter/impeller/renderer/device_buffer.h
FILE: ../../../flutter/impeller/renderer/device_buffer_unittests.cc
Expand Down
30 changes: 16 additions & 14 deletions impeller/compiler/code_gen_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ constexpr std::string_view kReflectionHeaderTemplate =
{# Note: The nogncheck decorations are only to make GN not mad at the template#}
{# this file is generated from. There are no GN rule violations in the generated#}
{# file itself and the no-check declarations will be stripped in generated files.#}
#include "impeller/renderer/buffer_view.h" {# // nogncheck #}
#include "impeller/renderer/buffer_view.h" {# // nogncheck #}

#include "impeller/renderer/command.h" {# // nogncheck #}
#include "impeller/renderer/command.h" {# // nogncheck #}

#include "impeller/renderer/descriptor_set_layout.h" {# // nogncheck #}
#include "impeller/renderer/sampler.h" {# // nogncheck #}

#include "impeller/renderer/sampler.h" {# // nogncheck #}
#include "impeller/renderer/shader_types.h" {# // nogncheck #}

#include "impeller/renderer/shader_types.h" {# // nogncheck #}

#include "impeller/renderer/texture.h" {# // nogncheck #}
#include "impeller/renderer/texture.h" {# // nogncheck #}


namespace impeller {
Expand Down Expand Up @@ -152,26 +150,30 @@ std::move({{ arg.argument_name }}){% if not loop.is_last %}, {% endif %}
// ===========================================================================
// Metadata for Vulkan =======================================================
// ===========================================================================
#ifdef IMPELLER_ENABLE_VULKAN_REFLECTION
{% if length(buffers)+length(sampled_images) > 0 %}
static constexpr std::array<DescriptorSetLayout,{{length(buffers)+length(sampled_images)}}> kDescriptorSetLayouts{
static constexpr std::array<VkDescriptorSetLayoutBinding,{{length(buffers)+length(sampled_images)}}> kDescriptorSetLayouts{
{% for buffer in buffers %}
DescriptorSetLayout{
VkDescriptorSetLayoutBinding{
{{buffer.binding}}, // binding = {{buffer.binding}}
DescriptorType::kUniformBuffer, // descriptorType = Uniform Buffer
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, // descriptorType = Uniform Buffer
1, // descriptorCount = 1
{{to_shader_stage(shader_stage)}}, // stageFlags = {{to_shader_stage(shader_stage)}}
{{to_vk_shader_stage_flag_bits(shader_stage)}}, // stageFlags = {{to_shader_stage(shader_stage)}}
nullptr, // pImmutableSamplers = NULL
},
{% endfor %}
{% for sampled_image in sampled_images %}
DescriptorSetLayout{
VkDescriptorSetLayoutBinding{
{{sampled_image.binding}}, // binding = {{sampled_image.binding}}
DescriptorType::kSampledImage, // descriptorType = Sampled Image
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, // descriptorType = Sampled Image
1, // descriptorCount = 1
{{to_shader_stage(shader_stage)}}, // stageFlags = {{to_shader_stage(shader_stage)}}
{{to_vk_shader_stage_flag_bits(shader_stage)}},// stageFlags = {{to_shader_stage(shader_stage)}}
nullptr, // pImmutableSamplers = NULL
},
{% endfor %}
};
{% endif %}
#endif

}; // struct {{camel_case(shader_name)}}{{camel_case(shader_stage)}}Shader

Expand Down
1 change: 0 additions & 1 deletion impeller/renderer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ impeller_component("renderer") {
"command_buffer.h",
"context.cc",
"context.h",
"descriptor_set_layout.h",
"device_buffer.cc",
"device_buffer.h",
"formats.cc",
Expand Down
27 changes: 0 additions & 27 deletions impeller/renderer/descriptor_set_layout.h

This file was deleted.

7 changes: 0 additions & 7 deletions impeller/renderer/pipeline_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,6 @@ struct PipelineBuilder {
<< VertexShader::kLabel << "'.";
return false;
}
if (!vertex_descriptor->SetDescriptorSetLayouts(
VertexShader::kDescriptorSetLayouts)) {
VALIDATION_LOG << "Cound not configure vertex descriptor set layout for"
" pipeline named '"
<< VertexShader::kLabel << "'.";
return false;
}
desc.SetVertexDescriptor(std::move(vertex_descriptor));
}

Expand Down
15 changes: 0 additions & 15 deletions impeller/renderer/vertex_descriptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ bool VertexDescriptor::SetStageInputs(
return true;
}

bool VertexDescriptor::SetDescriptorSetLayouts(
const DescriptorSetLayout desc_set_layout[],
size_t count) {
desc_set_layouts_.reserve(desc_set_layouts_.size() + count);
for (size_t i = 0; i < count; i++) {
desc_set_layouts_.emplace_back(desc_set_layout[i]);
}
return true;
}

// |Comparable<VertexDescriptor>|
size_t VertexDescriptor::GetHash() const {
auto seed = fml::HashCombine();
Expand All @@ -48,9 +38,4 @@ const std::vector<ShaderStageIOSlot>& VertexDescriptor::GetStageInputs() const {
return inputs_;
}

const std::vector<DescriptorSetLayout>&
VertexDescriptor::GetDescriptorSetLayouts() const {
return desc_set_layouts_;
}

} // namespace impeller
13 changes: 0 additions & 13 deletions impeller/renderer/vertex_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "flutter/fml/macros.h"
#include "impeller/base/comparable.h"
#include "impeller/renderer/descriptor_set_layout.h"
#include "impeller/renderer/shader_types.h"

namespace impeller {
Expand Down Expand Up @@ -37,22 +36,11 @@ class VertexDescriptor final : public Comparable<VertexDescriptor> {
return SetStageInputs(inputs.data(), inputs.size());
}

template <size_t Size>
bool SetDescriptorSetLayouts(
const std::array<DescriptorSetLayout, Size>& inputs) {
return SetDescriptorSetLayouts(inputs.data(), inputs.size());
}

bool SetStageInputs(const ShaderStageIOSlot* const stage_inputs[],
size_t count);

bool SetDescriptorSetLayouts(const DescriptorSetLayout desc_set_layout[],
size_t count);

const std::vector<ShaderStageIOSlot>& GetStageInputs() const;

const std::vector<DescriptorSetLayout>& GetDescriptorSetLayouts() const;

// |Comparable<VertexDescriptor>|
std::size_t GetHash() const override;

Expand All @@ -61,7 +49,6 @@ class VertexDescriptor final : public Comparable<VertexDescriptor> {

private:
std::vector<ShaderStageIOSlot> inputs_;
std::vector<DescriptorSetLayout> desc_set_layouts_;

FML_DISALLOW_COPY_AND_ASSIGN(VertexDescriptor);
};
Expand Down