We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2143 - try to use EGL extentions on texture loading with GLES/GLES2 render
Summary: try to use EGL extentions on texture loading with GLES/GLES2 render
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.0
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-10 07:14 UTC by Ivan
Modified: 2018-08-06 21:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2013-10-10 07:14:31 UTC
Android provide EGL extentions to get performance benefits on texture loading.
It would be great to use them if available, especcialy with shader yuv drawer for STREAMING access

prof.1
http://software.intel.com/en-us/articles/using-opengl-es-to-accelerate-apps-with-legacy-2d-guis

prof.2
https://github.com/freedreno/yuvtest
Comment 1 Gabriel Jacobo 2013-10-10 20:36:31 UTC
I'm having a hard time understanding this, can you provide a quick example of what the improvement would look like?
Comment 2 Sam Lantinga 2013-10-11 04:42:24 UTC
Even better, can you identify the slowdown and provide a patch with measurements for how it improves performance?

Thanks!
Comment 3 Ivan 2013-10-11 05:04:57 UTC
the sample you need is in prof 2 on gl_yuvtex.cpp and gl2_yuvtex.cpp
bud sdl code is not so clean for me to make some fast patches, so probably later I got time to fix this on my own projects.
also you got shader drawer already in opengl, and, surprised, not in gles mode
Comment 4 Ivan 2013-10-30 08:11:17 UTC
now I done the android camera and sdl gltracer compare in android sdk
the result says glEGLImageTargetTexture2DOES using only ~2000ns to update it's frame, since glTextSubImage2d got up to ~10000000ns to update 368x200 texture
Comment 5 Sam Lantinga 2013-11-03 19:22:48 UTC
Looks good!
We've got a lot going on here, but if you have a first pass at a patch we'll be happy to look at it.
Comment 6 Ivan 2014-05-29 11:19:12 UTC
Guys, I've no time to support this anymore for sdl patch
but since it's working good in my cases I just left this as realized source code I used to learn from other products

EGL:
Discuss
https://bugzilla.mozilla.org/show_bug.cgi?id=686611

Realize
https://hg.mozilla.org/mozilla-central/file/448f2153d6d3/widget/android/AndroidGraphicBuffer.cpp

this works pretty well if you get libui.so dlopen success, and mozilla guys shoud extend their whitelist.

GLES Shaders
This source requred to be optimized a little but works pretty good with current SDL release
http://blog.csdn.net/wangchenggggdn/article/details/8896453

And some more people to use a modern Gles 3.0 PBO feature 
https://vec.io/tags/opengl

If you really like this, you can improve your performance in Android a lot

regards
Comment 7 Sam Lantinga 2014-06-22 04:00:52 UTC
This is great information, thanks!

This would be very helpful for streaming textures. However, the most widely used application for streaming textures is streaming video, and most video decoders either use their own buffers or use system decoding APIs which don't feed back into the SDL EGL rendering directly.

I'll leave this here in case anybody wants to explore and implement this code path for a real world application.
Comment 8 Ryan C. Gordon 2015-02-19 05:22:20 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 9 Ryan C. Gordon 2018-08-06 21:20:22 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.