panfrost: Don't flip scanout
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 23 May 2019 03:01:32 +0000 (03:01 +0000)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 5 Jun 2019 21:35:48 +0000 (14:35 -0700)
commit2adf35e4f50e0d8439ee12151bbb65427335625e
tree4d8e3ee80241d51ecdc65c4fd6f1f582ec7bf7d0
parentc94b70a1781b8fb65be24b7e3a72462426cd86c4
panfrost: Don't flip scanout

The mesa/st flips the viewport, so we respect that rather than
trying to flip the framebuffer itself and ignoring the viewport and
using a messy heuristic.

However, this brings an underlying disagreement about the interpretation
of winding order to light. The blob uses a different strategy than Mesa
for handling viewport Y flipping, so the meanings of the winding order
bit are flipped for it. To keep things clean on our end, we rename to
explicitly use Gallium (rather than flipped OpenGL) conventions.

Fixes upside-down Xwayland/egl windows.

v2: Adjust lowering configuration to correctly flip gl_PointCoord.y and
gl_FragCoord.y. v1 was R-b'd by Tomeu, but then retracted due to these
regressions which are not fixed.

Suggested-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Sort-of-reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
src/gallium/drivers/panfrost/include/panfrost-job.h
src/gallium/drivers/panfrost/midgard/midgard_compile.h
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_context.h
src/gallium/drivers/panfrost/pan_fragment.c
src/gallium/drivers/panfrost/pan_mfbd.c
src/gallium/drivers/panfrost/pan_screen.c
src/gallium/drivers/panfrost/pan_sfbd.c
src/gallium/drivers/panfrost/pandecode/decode.c