src/compiler/translator/tree_ops/vulkan/SeparateStructFromUniformDeclarations.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi c229ccfe 2021-05-18T15:51:12 Vulkan: SPIR-V Gen: Handle gl_PerVertex If not declared by the shader, default gl_PerVertex is now explicitly declared in AST prior to SPIR-V generation. The SPIR-V generation code then doesn't need to declare them magically. Bug: angleproject:4889 Change-Id: Icc593bc1ccc3162487bdbae7f66bc775d098778d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2905952 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 39ee3640 2021-05-11T22:27:08 Translator: Fix struct/uniform separation w.r.t to arrays When a uniform of struct type was redeclared, the arrayness information was not transferred. Bug: chromium:1204861 Change-Id: Ic3f461a4aa349a73bc48568ee14b5418f0556238 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2889599 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi c5e344b1 2021-05-11T22:13:38 Translator: Fix local var inits vs struct/uniform separation The declarations outside the global scope were being skipped in this transformation, but if the initializer of a declaration referenced a uniform struct that's being replaced, it should have been visited too. Bug: chromium:1204861 Change-Id: Ie2a743126c785eb7d6e3542ba80faa4defc3509f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2889598 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi cc56e1aa 2021-04-09T23:35:07 Vulkan: Remove special output of structs and keep them in AST The code that separated out declaration of nameless structs from uniform variable declarations is generalized to separate out declaration of all structs from uniform variable declarations. As a result, a pass that outputs the struct types at the top of the shader is no longer necessary. The struct declarations are kept in the AST to be output to GLSL as they normally would when not used in conjunction with uniform variables. After this change, the Vulkan and Metal translators no longer intermix transformations and code generation; transformations are done first entirely in AST, and code generation is done at the end. Bug: angleproject:2461 Bug: angleproject:4889 Change-Id: Ieb4d3f7091845e50c3dc399603ab01182692521d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818153 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>