1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#pragma once
6
7#include <optional>
8
9#include "impeller/compiler/compiler_backend.h"
10
11#include "spirv_msl.hpp"
12#include "spirv_parser.hpp"
13
14namespace impeller {
15
16/// @brief Sorts uniform declarations in an IR according to decoration order.
17///
18/// The [type_filter] may be optionally supplied to limit which types are
19/// returned The [include] value can be set to false change this filter to
20/// exclude instead of include.
21std::vector<spirv_cross::ID> SortUniforms(
22 const spirv_cross::ParsedIR* ir,
23 const spirv_cross::Compiler* compiler,
24 std::optional<spirv_cross::SPIRType::BaseType> type_filter = std::nullopt,
25 bool include = true);
26
27} // namespace impeller
28

source code of flutter_engine/flutter/impeller/compiler/uniform_sorter.h