1. 14 Feb, 2018 2 commits
    • Adam Jackson's avatar
      glx: Large commands are context state, not client state · 133bd444
      Adam Jackson authored
      
      
      There's no reason a multithreaded client shouldn't be allowed to
      interleave other requests (for other contexts) with a RenderLarge. Move
      the check into __glXForceCurrent, and store the state in the context not
      the client.
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      133bd444
    • Adam Jackson's avatar
      glx: Use vnd layer for dispatch (v4) · d8ec33fe
      Adam Jackson authored
      The big change here is MakeCurrent and context tag tracking. We now
      delegate context tags entirely to the vnd layer, and simply store a
      pointer to the context state as the tag data. If a context is deleted
      while it's current, we allocate a fake ID for the context and move the
      context state there, so the tag data still points to a real context. As
      a result we can stop trying so hard to detach the client from contexts
      at disconnect time and just let resource destruction handle it.
      
      Since vnd handles all the MakeCurrent protocol now, our request handlers
      for it can just be return BadImplementation. We also remove a bunch of
      LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already
      allocated its tracking resource on that XID.
      
      v2: Update to match v2 of the vnd import, and remove more redundant work
      like request length checks.
      
      v3: Add/remove the XID map from the vendor private thunk, not the
      backend. (Kyle Brenneman)
      
      v4: Fix deletion of ghost contexts (Kyle...
      d8ec33fe
  2. 22 Jan, 2018 1 commit
    • Adam Jackson's avatar
      miinitext: General cleanup (v2) · c2b2f06a
      Adam Jackson authored
      
      
      This really just wants to be the list of disable booleans and
      initialization functions, and nothing else. Stop including the protocol
      headers from extinit.h, remove a stray mention of xgl, and move an
      XInput declaration to a better place.
      
      v2: A bunch of drivers assume they'll get the DPMS tokens implicitly,
      so add it to globals.h.
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
      c2b2f06a
  3. 04 Dec, 2017 1 commit
  4. 01 Dec, 2017 2 commits
    • Adam Jackson's avatar
      glx: Prepare __glXGetDrawable for no-config contexts · f0fffa92
      Adam Jackson authored
      
      
      Any proper (GLX 1.3) drawable will already have a bound config, but if
      we're doing the GLX 1.2 thing of making a Window current, we need to
      infer the config from the window's Visual.
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
      f0fffa92
    • Adam Jackson's avatar
      glx: Fix glXQueryContext for GLX_FBCONFIG_ID and GLX_RENDER_TYPE (v2) · 5d667df6
      Adam Jackson authored
      
      
      Just never filled in, oops. Seems to have gone unnoticed because
      normally glXQueryContext simply returns the values filled in by the
      client library when the context was created. The only path by which you
      normally get to a GLXQueryContext request is glXImportContext, and then
      only if the context is already indirect.
      
      However, that's a statement about Mesa's libGL (and anything else that
      inherited that bit of the SGI SI more or less intact). Nothing prevents
      a mischeivous client from issuing that request of a direct context, and
      if they did we'd be in trouble because we never bothered to preserve the
      associated fbconfig in the context state, so we'd crash looking up
      GLX_VISUAL_ID_EXT. So let's fix that too.
      
      v2: Fixed missing preservation of the config in DRI2 (Eric Anholt)
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
      5d667df6
  5. 15 Nov, 2017 1 commit
  6. 22 Aug, 2017 1 commit
  7. 21 Aug, 2017 1 commit
  8. 31 Jul, 2017 1 commit
  9. 20 Jun, 2017 1 commit
  10. 10 Apr, 2017 1 commit
  11. 24 Mar, 2017 1 commit
  12. 25 Jan, 2017 1 commit
  13. 15 Sep, 2016 1 commit
    • Jon Turney's avatar
      Add Windows-DRI extension · f5f4d32a
      Jon Turney authored
      
      
      If windowsdriproto headers are available, build a Windows-DRI extension,
      which supports requests to enable local clients to directly render GL to a
      Windows drawable:
      
      - a query to check if WGL is being used on a screen
      - a query to map a fbconfigID to a native pixelformatindex
      - a query to map a drawable to a native handle
      
      Windows-DRI can only be useful if we are using WGL, so make an note if WGL
      is active on a screen.
      
      Make validGlxDrawable() public
      
      Adjust glxWinSetPixelFormat() so it doesn't require a context, just a
      screen and config.
      
      That enables factoring out the deferred drawable creation code as
      glxWinDeferredCreateDrawable()
      
      Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a
      file mapping, so they exist in memory which can be shared with the direct
      rendering process.
      
      Currently, this file mapping is accessed by a name generated from the XID.
      This will not be unique across multiple server instances. It would perhaps
      be better, although more complicated, to use an anonymous file mapping, and
      then duplicate the handle for the direct rendering process.
      
      Use glxWinDeferredCreateDrawable() to ensure the native handle exists for
      the Windows-DRI query to map a drawable to native handle.
      
      v2:
      Various printf format warning fixes
      
      v3:
      Fix format warnings on x86
      Move some uninteresting windows-dri output to debug log level
      
      v4:
      check for windowsdriproto when  --enable-windowsdri
      use windowsdriproto_CFLAGS
      Signed-off-by: Jon Turney's avatarJon Turney <jon.turney@dronecode.org.uk>
      Reviewed-by: default avatarColin Harrison <colin.harrison@virgin.net>
      f5f4d32a
  14. 06 Sep, 2016 1 commit
    • Adam Jackson's avatar
      glx: Fix computation of GLX_X_RENDERABLE fbconfig attribute · 392da389
      Adam Jackson authored
      
      
      >From the GLX spec:
      
          "GLX_X_RENDERABLE is a boolean indicating whether X can be used to
          render into a drawable created with the GLXFBConfig. This attribute
          is True if the GLXFBConfig supports GLX windows and/or pixmaps."
      
      Every backend was setting this to true unconditionally, and then the
      core ignored that value and sent true unconditionally on its own. This
      is broken for ARB_fbconfig_float and EXT_fbconfig_packed_float, which
      only apply to pbuffers, which are not renderable from non-GLX APIs.
      
      Instead compute GLX_X_RENDERABLE from the supported drawable types. The
      dri backends were getting _that_ wrong too, so fix that as well.
      
      This is not a functional change, as there are no mesa drivers that claim
      to support __DRI_ATTRIB_{UNSIGNED_,}FLOAT_BIT yet.
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Reviewed-by: Emma Anholt's avatarEric Anholt <eric@anholt.net>
      392da389
  15. 11 May, 2016 2 commits
  16. 30 Mar, 2016 2 commits
  17. 10 Mar, 2016 3 commits
  18. 08 Mar, 2016 1 commit
  19. 19 Oct, 2015 1 commit
  20. 08 Jul, 2015 1 commit
    • Adam Jackson's avatar
      glx: Implement GLX_ARB_context_flush_control · 995ff114
      Adam Jackson authored
      
      
      This extension allows clients to opt out of the implicit glFlush on
      context release, which is quite nice for performance for clients using
      multiple contexts.  The server doesn't really need to be aware of the
      client's decision, at least for direct contexts, but it does need to not
      reject the context attribute out of hand.
      
      This patch won't do anything unless built against a Mesa that defines
      the __DRI2_FLUSH_CONTROL extension (and a new enough glxext.h, but
      that's been there since 10.3 at least).
      Reviewed-by: James Jones's avatarJames Jones <jajones@nvidia.com>
      Signed-off-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      995ff114
  21. 10 Dec, 2014 2 commits
  22. 09 Dec, 2014 5 commits
  23. 05 Dec, 2014 1 commit
    • Jon Turney's avatar
      Revert "glx: Simplify glXDestroyContext" · 437b2749
      Jon Turney authored
      This reverts commit 7f5adf73
      
      .
      
      This seems to miss the whole point of the idExists flag, as it makes the
      lifetime of that being true the same as the lifetime of the Context resource.
      
      The previously current context tag is always given in a MakeContextCurrent
      request, even if that context tag is no longer valid (for example, the context
      has been deleted), so this leads to BadContextTag errors.
      
      See fd.o bug #30089 for the makecurrenttest.c testcase, and some discussion of
      previous manifestations of this bug.
      Signed-off-by: Jon Turney's avatarJon TURNEY <jon.turney@dronecode.org.uk>
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      437b2749
  24. 12 Nov, 2014 1 commit
  25. 12 Sep, 2014 1 commit
  26. 23 Apr, 2014 3 commits
  27. 12 Jan, 2014 1 commit