[waffle] shader_runner_gles3

Chad Versace chad.versace at linux.intel.com
Wed Feb 27 15:06:55 PST 2013


[CC'ing the list]

I think the whole idea of a library having an init() function is clumsy,
and I'd like to do away with it. Adding a destroy() method just adds to
the clumsiness.

The reason I reluctantly added the init() function to waffle is due to
restrictions in Mesa's libEGL. Mesa's libEGL must be initialized to
a platform, and that initialization lasts the lifetime of the process.

The API I really want is this:
  waffle_platform_connect_to_display(GLX, NULL);
  waffle_platform_connect_to_display(X11_EGL, NULL);
  waffle_platform_connect_to_display(WAYLAND, NULL);

Once that API is introduced, then deprecate waffle_init(). If a user
calls waffle_init(X11_EGL), then waffle_display_connect(NULL) will
be equivalent waffle_platform_connect_to_display(X11_EGL, NULL).

Until Mesa's libEGL gets fixed, though, waffle will be incapable
making multiple calls to waffle_platform_connect_to_display(plat, dpy_name)
with different EGL platforms in the same process. Boo. Due to this,
I'm hesitant to add waffle_platform_connect_to_display() before we
fix libEGL. Your waffle_destroy() solution also suffers from the
same problem.

Your thoughts?


On 02/26/2013 03:51 PM, Jordan Justen wrote:
> Regarding glx failover to x11_egl, I've found that the addition of a
> waffle_destroy function might allow this to work.
> 
> This works:
> waffle_init(GLX);
> fail_to_create_context();
> waffle_destroy();
> waffle_init(X11_EGL);
> draw_something();
> 
> But, I'm not sure if something like would be functional:
> waffle_init(GLX);
> draw_something();
> waffle_destroy();
> waffle_init(X11_EGL);
> draw_something();
> waffle_destroy();
> 
> What are your thoughts about this?
> 
> -Jordan
> 
> On Tue, Feb 26, 2013 at 10:37 AM, Chad Versace
> <chad.versace at linux.intel.com> wrote:
>> On 02/26/2013 07:45 AM, Jordan Justen wrote:
>>> Chad,
>>>
>>> I was trying to run some shader_runner tests for es3, and I think
>>> something is off in my setup. If I run:
>>> ./piglit-run.py -t glsl-es-3 tests/quick-driver.tests ...
>>> then I see that the glsl-parser-tests pass, but the shader_runner
>>> tests are skipped.
>>>
>>> It seems that shader_runner_gles3 fails to create a context. Does this
>>> work for you in your setup?
>>>
>>> I notice that in waffle 'gl_basic x11_egl gles3' works, while 'glx
>>> gles3' fails. It seems like EXT_create_context_es_profile is not
>>> present in my setup.
>>>
>>> Do you know what I might be doing wrong?! :)
>>
>> Mesa's GLX does not support GLX_EXT_create_context_es_profile. That's
>> required to create an ES3 context via GLX. Sorry :(



More information about the waffle mailing list