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 |
|---|---|---|
| .. | ||
| media | Loading commit data... | |
| EGLAndroidFrameBufferTargetTest.cpp | Loading commit data... | |
| EGLBackwardsCompatibleContextTest.cpp | Loading commit data... | |
| EGLBlobCacheTest.cpp | Loading commit data... | |
| EGLChooseConfigTest.cpp | Loading commit data... | |
| EGLContextASANTest.cpp | Loading commit data... | |
| EGLContextCompatibilityTest.cpp | Loading commit data... | |
| EGLContextSharingTest.cpp | Loading commit data... | |
| EGLCreateContextAttribsTest.cpp | Loading commit data... | |
| EGLDebugTest.cpp | Loading commit data... | |
| EGLDeviceCGLTest.cpp | Loading commit data... | |
| EGLDeviceTest.cpp | Loading commit data... | |
| EGLDirectCompositionTest.cpp | Loading commit data... | |
| EGLDisplayLuidTest.cpp | Loading commit data... | |
| EGLFeatureControlTest.cpp | Loading commit data... | |
| EGLIOSurfaceClientBufferTest.cpp | Loading commit data... | |
| EGLNoConfigContextTest.cpp | Loading commit data... | |
| EGLPreRotationTest.cpp | Loading commit data... | |
| EGLPresentPathD3D11Test.cpp | Loading commit data... | |
| EGLPrintEGLinfoTest.cpp | Loading commit data... | |
| EGLProgramCacheControlTest.cpp | Loading commit data... | |
| EGLQueryContextTest.cpp | Loading commit data... | |
| EGLReadinessCheckTest.cpp | Loading commit data... | |
| EGLRecordableTest.cpp | Loading commit data... | |
| EGLRobustnessTest.cpp | Loading commit data... | |
| EGLStreamTest.cpp | Loading commit data... | |
| EGLSurfaceTest.cpp | Loading commit data... | |
| EGLSurfacelessContextTest.cpp | Loading commit data... | |
| EGLSyncControlTest.cpp | Loading commit data... | |
| EGLSyncTest.cpp | Loading commit data... | |
| EGLX11VisualTest.cpp | Loading commit data... |