"Fossies" - the Fresh Open Source Software Archive

Member "mesa-20.1.8/docs/specs/MESA_configless_context.spec" (16 Sep 2020, 4423 Bytes) of package /linux/misc/mesa-20.1.8.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) RPM Spec source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 Name
    2 
    3     MESA_configless_context
    4 
    5 Name Strings
    6 
    7     EGL_MESA_configless_context
    8 
    9 Contact
   10 
   11     Neil Roberts <neil.s.roberts@intel.com>
   12 
   13 Status
   14 
   15     Superseded by the functionally identical EGL_KHR_no_config_context
   16     extension.
   17 
   18 Version
   19 
   20     Version 2, September 9, 2016
   21 
   22 Number
   23 
   24     EGL Extension #not assigned
   25 
   26 Dependencies
   27 
   28     Requires EGL 1.4 or later.  This extension is written against the
   29     wording of the EGL 1.4 specification.
   30 
   31 Overview
   32 
   33     This extension provides a means to use a single context to render to
   34     multiple surfaces which have different EGLConfigs. Without this extension
   35     the EGLConfig for every surface used by the context must be compatible
   36     with the one used by the context. The only way to render to surfaces with
   37     different formats would be to create multiple contexts but this is
   38     inefficient with modern GPUs where this restriction is unnecessary.
   39 
   40 IP Status
   41 
   42     Open-source; freely implementable.
   43 
   44 New Procedures and Functions
   45 
   46     None.
   47 
   48 New Tokens
   49 
   50     Accepted as <config> in eglCreateContext
   51 
   52         EGL_NO_CONFIG_MESA                  ((EGLConfig)0)
   53 
   54 Additions to the EGL Specification section "2.2 Rendering Contexts and Drawing
   55 Surfaces"
   56 
   57     Add the following to the 3rd paragraph:
   58 
   59    "EGLContexts can also optionally be created with respect to an EGLConfig
   60     depending on the parameters used at creation time. If a config is provided
   61     then additional restrictions apply on what surfaces can be used with the
   62     context."
   63 
   64     Replace the last sentence of the 6th paragraph with:
   65 
   66    "In order for a context to be compatible with a surface they both must have
   67     been created with respect to the same EGLDisplay. If the context was
   68     created without respect to an EGLConfig then there are no further
   69     constraints. Otherwise they are only compatible if:"
   70 
   71     Remove the last bullet point in the list of constraints.
   72 
   73 Additions to the EGL Specification section "3.7.1 Creating Rendering Contexts"
   74 
   75     Replace the paragraph starting "If config is not a valid EGLConfig..."
   76     with
   77 
   78    "The config argument can either be a valid EGLConfig or EGL_NO_CONFIG_MESA.
   79     If it is neither of these then an EGL_BAD_CONFIG error is generated. If a
   80     valid config is passed then the error will also be generated if the config
   81     does not support the requested client API (this includes requesting
   82     creation of an OpenGL ES 1.x context when the EGL_RENDERABLE_TYPE
   83     attribute of config does not contain EGL_OPENGL_ES_BIT, or creation of an
   84     OpenGL ES 2.x context when the attribute does not contain
   85     EGL_OPENGL_ES2_BIT).
   86 
   87     Passing EGL_NO_CONFIG_MESA will create a configless context. When a
   88     configless context is used with the OpenGL API it can be assumed that the
   89     initial values of the context's state will be decided when the context is
   90     first made current. In particular this means that the decision of whether
   91     to use GL_BACK or GL_FRONT for the initial value of the first output in
   92     glDrawBuffers will be decided based on the config of the draw surface when
   93     it is first bound."
   94 
   95 Additions to the EGL Specification section "3.7.3 Binding Contexts and
   96 Drawables"
   97 
   98     Replace the first bullet point with the following:
   99 
  100    "* If draw or read are not compatible with ctx as described in section 2.2,
  101       then an EGL_BAD_MATCH error is generated."
  102 
  103     Add a second bullet point after that:
  104 
  105    "* If draw and read are not compatible with each other as described in
  106       section 2.2, then an EGL_BAD_MATCH error is generated."
  107 
  108 Issues
  109 
  110     1.  What happens when an OpenGL context with a double-buffered surface and
  111         draw buffer set to GL_BACK is made current with a single-buffered
  112         surface?
  113 
  114         NOT RESOLVED: There are a few options here.  An implementation can
  115         raise an error, change the drawbuffer state to GL_FRONT or just do
  116         nothing, expecting the application to set GL_FRONT drawbuffer before
  117         drawing.  However, this extension deliberately does not specify any
  118         required behavior in this corner case and applications should avoid
  119         mixing single- and double-buffered surfaces with configless contexts.
  120 
  121         Future extensions may specify required behavior in this case.
  122 
  123 Revision History
  124 
  125     Version 2, September 9, 2016
  126         Defer to EGL_KHR_no_config_context (Adam Jackson)
  127 
  128     Version 1, February 28, 2014
  129         Initial draft (Neil Roberts)