From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Andreas Müller" <schnitzeltony@gmail.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] libsdl2: Fix left rotated display for RaspPi/VC4/GLES2
Date: Wed, 29 Aug 2018 15:16:36 +0100 [thread overview]
Message-ID: <66aa21df8fa33f677b8a65150da5af2f98c22268.camel@linuxfoundation.org> (raw)
In-Reply-To: <20180828221954.3214-1-schnitzeltony@gmail.com>
On Wed, 2018-08-29 at 00:19 +0200, Andreas Müller wrote:
> The patch should increase performance for libsdl2 on GLES2 too.
>
> Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
> ---
> ...01-GLES2-Get-sin-cos-out-of-vertex-shader.patch | 141
> +++++++++++++++++++++
> meta/recipes-graphics/libsdl2/libsdl2_2.0.8.bb | 1 +
> 2 files changed, 142 insertions(+)
> create mode 100644 meta/recipes-graphics/libsdl2/libsdl2/0001-GLES2-
> Get-sin-cos-out-of-vertex-shader.patch
>
> diff --git a/meta/recipes-graphics/libsdl2/libsdl2/0001-GLES2-Get-
> sin-cos-out-of-vertex-shader.patch b/meta/recipes-
> graphics/libsdl2/libsdl2/0001-GLES2-Get-sin-cos-out-of-vertex-
> shader.patch
> new file mode 100644
> index 0000000000..621b7ea1a0
> --- /dev/null
> +++ b/meta/recipes-graphics/libsdl2/libsdl2/0001-GLES2-Get-sin-cos-
> out-of-vertex-shader.patch
> @@ -0,0 +1,141 @@
> +From c215ba1d52a3d4ef03af3ab1a5baa1863f812aed Mon Sep 17 00:00:00
> 2001
> +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
> +Date: Fri, 24 Aug 2018 23:10:25 +0200
> +Subject: [PATCH] GLES2: Get sin/cos out of vertex shader
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +The only place angle is activated and causes effect is RenderCopyEx.
> All other
> +methods which use vertex shader, leave angle disabled and cause
> useless sin/cos
> +calculation in shader.
> +
> +To get around shader's interface is changed to a vector that
> contains results
> +of sin and cos. To behave properly when disabled, cos value is set
> with offset
> +-1.0 making 0.0 default when deactivated.
> +
> +As nice side effect it simplifies GLES2_UpdateVertexBuffer: All
> attributes are
> +vectors now.
> +
> +Additional background:
> +
> +* On RaspberryPi it gives a performace win for operations. Tested
> with
> + [1] numbers go down for 5-10% (not easy to estimate due to huge
> variation).
> +* SDL_RenderCopyEx was tested with [2]
> +* It works around left rotated display caused by low accuracy sin
> implemetation
> + in RaspberryPi/VC4 [3]
> +
> +Upstream-Status: Submitted [4]
If I'm reading the logs correctly, this was actually merged upstream so
the status would become Accepted or Backport?
> +[1] https://github.com/schnitzeltony/sdl2box
> +[2] https://github.com/schnitzeltony/sdl2rendercopyex
> +[3] https://github.com/anholt/mesa/issues/110
> +[4] https://hg.libsdl.org/SDL/rev/e5a666405750
Cheers,
Richard
next prev parent reply other threads:[~2018-08-29 14:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-28 22:19 [PATCH v2] libsdl2: Fix left rotated display for RaspPi/VC4/GLES2 Andreas Müller
2018-08-29 14:16 ` Richard Purdie [this message]
2018-08-29 17:22 ` Andreas Müller
2018-08-30 9:44 ` richard.purdie
2018-08-30 10:45 ` Andreas Müller
2018-08-30 15:22 ` richard.purdie
2018-08-30 19:11 ` Andreas Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=66aa21df8fa33f677b8a65150da5af2f98c22268.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=schnitzeltony@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox