Instead of having the translator output pre-rotation code in the vertex stage based on a specialization constant, this change makes the SPIR-V transformer perform pre-rotation of gl_Position on the last geometry stage. An alternative solution would be to generate pre-rotation code in the translator in every geometry stage, each controlled by a separate specialization constant. This change avoids unnecessary modifications to earlier stages. The generated shaders are also smaller, as they don't contain a mat2[8] pre-rotation constant matrix. The SPIR-V transformer knows the pre-rotation at transformation time, so it can simply use swizzles to achieve the same results. This also ties in with upcoming changes which move gl_Position.z correction to the last geometry shader stage, which is trivially done piggy-backing on the infrastructure in this change. Bug: angleproject:5478 Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by:Charlie Lao <cclao@google.com> Reviewed-by:
Jamie Madill <jmadill@chromium.org>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| BuiltIn.h | Loading commit data... | |
| BuiltIn_ESSL_autogen.h | Loading commit data... | |
| BuiltIn_complete_autogen.h | Loading commit data... | |
| DriverUniform.cpp | Loading commit data... | |
| DriverUniform.h | Loading commit data... | |
| FindFunction.cpp | Loading commit data... | |
| FindFunction.h | Loading commit data... | |
| FindMain.cpp | Loading commit data... | |
| FindMain.h | Loading commit data... | |
| FindSymbolNode.cpp | Loading commit data... | |
| FindSymbolNode.h | Loading commit data... | |
| IntermNodePatternMatcher.cpp | Loading commit data... | |
| IntermNodePatternMatcher.h | Loading commit data... | |
| IntermNode_util.cpp | Loading commit data... | |
| IntermNode_util.h | Loading commit data... | |
| IntermTraverse.cpp | Loading commit data... | |
| IntermTraverse.h | Loading commit data... | |
| NodeSearch.h | Loading commit data... | |
| ReplaceArrayOfMatrixVarying.cpp | Loading commit data... | |
| ReplaceArrayOfMatrixVarying.h | Loading commit data... | |
| ReplaceClipDistanceVariable.cpp | Loading commit data... | |
| ReplaceClipDistanceVariable.h | Loading commit data... | |
| ReplaceShadowingVariables.cpp | Loading commit data... | |
| ReplaceShadowingVariables.h | Loading commit data... | |
| ReplaceVariable.cpp | Loading commit data... | |
| ReplaceVariable.h | Loading commit data... | |
| RewriteSampleMaskVariable.cpp | Loading commit data... | |
| RewriteSampleMaskVariable.h | Loading commit data... | |
| RunAtTheBeginningOfShader.cpp | Loading commit data... | |
| RunAtTheBeginningOfShader.h | Loading commit data... | |
| RunAtTheEndOfShader.cpp | Loading commit data... | |
| RunAtTheEndOfShader.h | Loading commit data... | |
| SpecializationConstant.cpp | Loading commit data... | |
| SpecializationConstant.h | Loading commit data... | |
| Visit.h | Loading commit data... |