mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 18:29:23 +00:00
[inspector] Add better support for remapped entry point names
Add remapped_name to entry point structure, also supply method to find the remapped name for individual entry points. BUG=tint:312 Change-Id: I5f2cc02bc37c17e99c453b16108bc8e10c602fba Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/32383 Reviewed-by: dan sinclair <dsinclair@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
f8cf585582
commit
2b706110f6
@@ -48,9 +48,9 @@ std::vector<EntryPoint> Inspector::GetEntryPoints() {
|
||||
continue;
|
||||
}
|
||||
|
||||
Namer namer;
|
||||
EntryPoint entry_point;
|
||||
entry_point.name = namer.NameFor(func->name());
|
||||
entry_point.name = func->name();
|
||||
entry_point.remapped_name = namer_.NameFor(func->name());
|
||||
entry_point.stage = func->pipeline_stage();
|
||||
std::tie(entry_point.workgroup_size_x, entry_point.workgroup_size_y,
|
||||
entry_point.workgroup_size_z) = func->workgroup_size();
|
||||
@@ -68,6 +68,15 @@ std::vector<EntryPoint> Inspector::GetEntryPoints() {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string Inspector::GetRemappedNamedForEntryPoint(
|
||||
const std::string& entry_point) {
|
||||
auto* func = FindEntryPointByName(entry_point);
|
||||
if (!func) {
|
||||
return {};
|
||||
}
|
||||
return namer_.NameFor(entry_point);
|
||||
}
|
||||
|
||||
std::map<uint32_t, Scalar> Inspector::GetConstantIDs() {
|
||||
std::map<uint32_t, Scalar> result;
|
||||
for (auto& var : module_.global_variables()) {
|
||||
|
||||
Reference in New Issue
Block a user