Author :
Jamie Madill
Date :
2021-08-20 12:32:03
Hash :b196eec0 Message :translator: Fix InitializeVariables with gl_ClipDistance.
The extension allows for the shader to redeclare this variable with
a different size. This would sometimes put the tree in an inconsistent
state when used with the InitializeVariables feature. Fix this by using
the user declaration of gl_ClipDistance when available.
Found when working on trace validation, where using the init output
variables option in the compiler would then cause tree validation to
fail for one specific test.
Test: ClipDistanceTest.ThreeClipDistancesRedeclared
Bug: angleproject:5133
Change-Id: I42c9bfbe313826ac5d391068d9fc18eb5793375f
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3110752
Reviewed-by: Cody Northrop <cnorthrop@google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>