[Mesa-dev] [Bug 92552] [softpipe] piglit egl-create-context-valid-flag-forward-compatible-gl regression

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Oct 26 16:49:52 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=92552

--- Comment #8 from Ian Romanick <idr at freedesktop.org> ---
(In reply to Boyan Ding from comment #4)
> (In reply to Matthew Waters from comment #2)
> > Created attachment 119006 [details] [review] [review]
> > egl: distnguish between unsupported api vs capabilities for EGL_CONTEXT_FLAGS
> > 
> > This fixes that issue for me.
> 
> Well, your patch does seem to eliminate the problem, but there is a subtle
> difference between how things works now and before, which I think may be
> questionable.
> 
> The spec of EGL_KHR_create_context says:
>     requesting a forward-compatible context for OpenGL versions less
>     than 3.0 will generate an error
> 
> The code now takes "OpenGL version" above as version requested with EGL (1.0
> by default). However, the OpenGL version actually provided can be up to 3.0.

I'm not really sure what you're asking.  If the create-context call (either EGL
or GLX) does not specify a version, it is as though it specified 1.0.  It
follows that not specifying a version and requesting a forward-compatible
context should generate an error.

I think the GLX spec is pretty clear that BadMatch is generated.  It is also
quite clear that the error is based on the value of the explicitly or
implicitly requested API version.

      * If attributes GLX_CONTEXT_MAJOR_VERSION_ARB and
        GLX_CONTEXT_MINOR_VERSION_ARB, when considered together with
        attributes GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB and
        GLX_RENDER_TYPE, specify an OpenGL version and feature set that
        are not defined, BadMatch is generated.

        The defined versions of OpenGL at the time of writing are OpenGL
        1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1, and 3.2.
        Feature deprecation was introduced with OpenGL 3.0, so
        forward-compatible contexts may only be requested for OpenGL 3.0
        and above. Thus, examples of invalid combinations of attributes
        include:

          - Major version < 1 or > 3
          - Major version == 1 and minor version < 0 or > 5
          - Major version == 2 and minor version < 0 or > 1
          - Major version == 3 and minor version > 2
          - Forward-compatible flag set and major version < 3
          - Color index rendering and major version >= 3

        Because the purpose of forward-compatible contexts is to allow
        application development on a specific OpenGL version with the
        knowledge that the app will run on a future version, context
        creation will fail if GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB is
        set and the context version returned cannot implement exactly
        the requested version.

That is at least what I intended to implement in the GLX code.

The language in the EGL extension is almost identical:

      * If an OpenGL context is requested and the values for attributes
        EGL_CONTEXT_MAJOR_VERSION_KHR and EGL_CONTEXT_MINOR_VERSION_KHR,
        when considered together with the value for attribute
        EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR, specify an OpenGL
        version and feature set that are not defined, than an
        EGL_BAD_MATCH error is generated.

        The defined versions of OpenGL at the time of writing are OpenGL
        1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 2.1, 3.0, 3.1, 3.2, 4.0, 4.1,
        4.2, and 4.3. Feature deprecation was introduced with OpenGL
        3.0, so forward-compatible contexts may only be requested for
        OpenGL 3.0 and above. Thus, examples of invalid combinations of
        attributes include:

          - Major version < 1 or > 4
          - Major version == 1 and minor version < 0 or > 5
          - Major version == 2 and minor version < 0 or > 1
          - Major version == 3 and minor version < 0 or > 2
          - Major version == 4 and minor version < 0 or > 3
          - Forward-compatible flag set and major version < 3

        Because the purpose of forward-compatible contexts is to allow
        application development on a specific OpenGL version with the
        knowledge that the app will run on a future version, context
        creation will fail if
        EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR is set and the
        context version returned cannot implement exactly the requested
        version.


> In such case, your patch will fail to create forward-compatible context,
> giving the "appropriate" error, while mesa before 86ccb2a1 will succeed.
> Though both behaviors pass piglit.
> 
> Any ideas?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151026/ab7f268d/attachment.html>


More information about the mesa-dev mailing list