mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
[inspector] Include component type information for stage variables
BUG=tint:630 Change-Id: Ib30221e7a2d35e77a164969428ed6bfc07bc2a8e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44340 Auto-Submit: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
a0d48382cb
commit
f1773c6700
@@ -208,6 +208,17 @@ std::vector<EntryPoint> Inspector::GetEntryPoints() {
|
||||
|
||||
StageVariable stage_variable;
|
||||
stage_variable.name = name;
|
||||
|
||||
stage_variable.component_type = ComponentType::kUnknown;
|
||||
auto* type = var->Declaration()->type()->UnwrapAll();
|
||||
if (type->is_float_scalar_or_vector() || type->is_float_matrix()) {
|
||||
stage_variable.component_type = ComponentType::kFloat;
|
||||
} else if (type->is_unsigned_scalar_or_vector()) {
|
||||
stage_variable.component_type = ComponentType::kUInt;
|
||||
} else if (type->is_signed_scalar_or_vector()) {
|
||||
stage_variable.component_type = ComponentType::kSInt;
|
||||
}
|
||||
|
||||
auto* location_decoration = decl->GetLocationDecoration();
|
||||
if (location_decoration) {
|
||||
stage_variable.has_location_decoration = true;
|
||||
|
||||
Reference in New Issue
Block a user