mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
GLSL: rename all identifiers prefixed with gl_.
In GLSL, all identifiers beginning with gl_ are reserved (not just those explicitly named in the spec), and so any found in WGSL must be renamed. Bug: tint:1304 Change-Id: I92ed7ec674620f67775378ecb8debcfdb4b5bbb4 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/69701 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
committed by
Tint LUCI CQ
parent
4b6eb0c6e3
commit
ae4487f3f9
@@ -1309,7 +1309,8 @@ Output Renamer::Run(const Program* in, const DataMap& inputs) {
|
||||
kReservedKeywordsGLSL,
|
||||
kReservedKeywordsGLSL +
|
||||
sizeof(kReservedKeywordsGLSL) / sizeof(const char*),
|
||||
name_in)) {
|
||||
name_in) &&
|
||||
name_in.compare(0, 3, "gl_")) {
|
||||
// No match, just reuse the original name.
|
||||
return ctx.dst->Symbols().New(name_in);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user