src/compiler/translator/tree_ops/SeparateStructFromFunctionDeclarations.cpp


Log

Author Commit Date CI Message
Roman Lavrov df90bbc5 2024-07-12T18:04:53 Refactoring: move angle::HashMap and HashSet to own header Underlying abseil includes pull in a large set of headers Bug: angleproject:42266508 Change-Id: Icee47143a8a59bb0795a054b67c0aa4ddcfca4d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5704137 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Geoff Lang e996d187 2024-03-19T13:29:24 Use TIntermRebuild for SeparateStructFromFunctionDeclarations This now handles the case of nested function calls to functions that define a struct in the return type all resolving to the correct re-written function. Bug: chromium:329271490 Change-Id: I43904e09ec9c284c1b51c09b2caaab253f7b29b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5376613 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Dan Glastonbury 5a4bfd61 2024-01-12T17:15:39 Metal: Separate struct definition from function return The EmitMetal pass in shader translator does not handle writing the defintion of a structure that is declared in the return type of a function, such as: struct Foo { float val; } foo() { ... } This change adds a new pass, SeparateStructFromFunctionDeclarations, to separate the definition and declaration of struct variables in function prototypes into two statements, such as: struct Foo { float val; } foo(); struct Bar { int val; } bar() { ... } void main() { ... } Foo foo() { ... } into: struct Foo { float val; }; Foo foo(); struct Bar { int val; }; Bar bar() { ... } void main() { ... } Foo foo() { ... } Fixed: angleproject:8302 Change-Id: Id8b6ba256d3c8375dd889facd70e4715261c1ca3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5191644 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>