Avoid reusing the custom data type enum with additional values. Instead use std::variant and type names to properly distinguish between custom and generic attribute requests. Use a Vector to hold the requests. Also attempt to simplify the string key building process for requests and groups of requests in batches. Previously for every PBVH node it would rebuild the key 3 times, now it only does it once. It's hard to measure, but that process did show up in profiles, so performance is probably slightly improved when many nodes are handled at once.
14 lines
251 B
C++
14 lines
251 B
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
namespace blender::draw::pbvh {
|
|
|
|
struct PBVHBatches;
|
|
|
|
int material_index_get(PBVHBatches *batches);
|
|
|
|
} // namespace blender::draw::pbvh
|