mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
[spirv-writer] Don't emit abstract accessor source
When traverseing an accessor expression, stop as soon as we hit a source object that has a constant value. This prevents us from trying to emit expressions that have abstract types and no materialization nodes. Bug: chromium:1442551 Change-Id: I8296ae58e63624e647052cdf966dbff15630a4d8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132040 Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
f91b77dd6d
commit
e162a1adee
@@ -1034,6 +1034,11 @@ uint32_t Builder::GenerateAccessorExpression(const ast::AccessorExpression* expr
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
// Stop traversing if we've hit a constant source expression.
|
||||
if (builder_.Sem().GetVal(source)->ConstantValue()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AccessorInfo info;
|
||||
|
||||
Reference in New Issue
Block a user