Hm, where did you get that from?  I don't see anything optional about
the share_context param of the eglCreateContext() call in EGL spec.

Certainly I don't see anything in the spec that allowed for
eglCreateContext() with share_context!=EGL_NO_CONTEXT to return a new
context with no error, but subsequent eglMakeCurrent() on that context
to fail with BAD_MATCH.

The resources argument does not make much sense either - at least not
in my case if you take into account that a procedure that is identical
except that it does *NOT* attempt to share resources runs just fine,
with no errors (but is slow obviously as it has to re-upload all the
resources that should have been shared).

On Fri, Aug 3, 2012 at 3:41 PM, RichardC <[email protected]> wrote:
> Just a comment on "buggy" drivers.  The EGL spec does not REQUIRE a driver
> to support any form of context sharing. It does ALLOW a driver to support
> context sharing if it has the resources (both hardware and software) to do
> so.  The driver is REQUIRED to return specific error codes if fails to do
> what was requested.
>
> The implications of this are:
>
> that a driver may choose not to allow context sharing at all.  If the
> correct errors are returned, the driver is a conforming implementation.
> on a particular device, calls to share contexts may succeed or fail
> depending on the resources that have already been consumed by other
> programs.
>
>
>
> On Friday, August 3, 2012 1:49:52 PM UTC+1, Latimerius wrote:
>>
>> On Fri, Aug 3, 2012 at 12:38 AM, Romain Guy <[email protected]> wrote:
>> >> Well, keep in mind that you can't issue GL calls from a thread
>> >> different than the rendering thread (well unless you play games with
>> >> multiple EGL contexts sharing resources which doesn't even seem to
>> >> work on the incomplete/buggy EGL implementation on Android).
>> >
>> > It works, WebView is (or used to) rely on this feature. You might be
>> > running into a driver specific bug though.
>>
>> That's definitely good to hear, although very few people seem to know
>> how to achieve it.  I asked about it a few weeks ago, with no reply:
>>
>>
>> https://groups.google.com/forum/?fromgroups#!searchin/android-developers/egl/android-developers/BHH08ak8MRA/mXaHFPNKMl8J
>>
>> It came up again a couple of days ago on android-ndk in this thread:
>>
>>
>> https://groups.google.com/forum/?fromgroups#!searchin/android-ndk/egl/android-ndk/V3VpH65tpqA/blOrbldg7j0J
>>
>> The consensus seems to be it doesn't work.  Note also a link there to
>> a Mozilla dev blog post, he also comes to the conclusion context
>> sharing doesn't work on Android.
>>
>> As far as a buggy driver goes - could be.  One thing I know is that
>> the failing behaviour was consistent across a bunch of Adreno
>> 200/SGX540 devices with Android 2.1 or 2.2.  I'm not sure anymore if I
>> specifically tested it on Xoom/Honeycomb but if I did, it did not work
>> there either.
>>
>> Is there a specific incantation to make it work?  From my reading of
>> the EGL spec, it should be as simple as passing the existing context
>> to eglMakeContext() as the shared context argument...
>>
>> Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to