summaryrefslogtreecommitdiff
path: root/src/glx
AgeCommit message (Collapse)AuthorFilesLines
2011-12-07glx: Fix indirect fallback when a non-Mesa GLX extension is present.Aaron Plattner4-15/+54
When driCreateScreen calls driConvertConfigs to try to convert the configs for swrast, it fails and returns NULL. Instead of checking, it just clobbers psc->base.configs. Then, when the application asks for the FBconfigs, there aren't any. Instead, make the caller responsible for freeing the old modes lists if both calls to driConvertConfigs succeed. Without the second fix, glxinfo fails unless you run it with LIBGL_ALWAYS_INDIRECT: $ glxinfo name of display: :0.0 Error: couldn't find RGB GLX visual or fbconfig $ LIBGL_ALWAYS_INDIRECT=1 glxinfo name of display: :0.0 display: :0 screen: 0 direct rendering: No (LIBGL_ALWAYS_INDIRECT set) server glx vendor string: NVIDIA Corporation server glx version string: 1.4 [...] Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-11-01drisw: Enable SGI_make_current_read for direct contextsAdam Jackson1-0/+2
Equivalent to glXMakeContextCurrent, which had better already work since we advertise GLX 1.3. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-28glx: Don't enable INTEL_swap_event unconditionallyAdam Jackson1-1/+1
DRI2 supports this now - and already enables it explicitly - but drisw does not and should not. Otherwise toolkits like clutter will only ever SwapBuffers once and wait forever for an event that's not coming. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-10-24apple: Implement applegl_unbind_contextJeremy Huddleston1-0/+18
glXMakeCurrent(dpy, None, NULL) would not correctly unbind the context causing subsequent GLX requests to fail in peculiar ways http://xquartz.macosforge.org/trac/ticket/514 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21apple: Use the correct (OpenGL.framework) glViewport and glScissor during initJeremy Huddleston5-10/+15
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-21apple: Silence some debug spewJeremy Huddleston1-3/+3
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-14dri2: Implement a throttle dri extension.Thomas Hellstrom1-3/+50
The X server has limited throttle support on the server side, but doing this in the client has some benefits: 1) X server throttling is per client. Client side throttling can be done per drawable. 2) It's easier to control the throttling based on what client is run, for example using "driconf". 3) X server throttling requires drm swap complete events. So implement a dri2 throttling extension intended to be used by direct rendering clients. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net>
2011-09-20scons: MacOSX build fixes.José Fonseca1-3/+0
2011-09-19Remove unneeded xdamages header from dri2_glx.c.Matt Turner1-1/+0
It's needed for dri1 but not dri2. Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-09-14glx/dri2: Don't call X server for SwapBuffers when there's no back buffer.Michel Dänzer1-0/+4
As already done in dri2CopySubBuffer(). Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=36371 https://bugs.freedesktop.org/show_bug.cgi?id=40533 Might fix: https://bugs.freedesktop.org/show_bug.cgi?id=32589 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-09-14GLX: Say something if we cannot connect via DRI2Andrew Deason1-0/+1
See https://bugs.freedesktop.org/show_bug.cgi?id=40437
2011-09-06Enable GLX_EXT_texture_from_pixmap in software.nobled1-2/+81
Signed-off-by: nobled <nobled@dreamwidth.org> Signed-off-by: Stuart Abercrombie <sabercrombie@chromium.org> Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
2011-08-26dri: Remove all DRI1 driversIan Romanick2-3/+3
Acked-by: Kristian Høgsberg <krh@bitplanet.net> Acked-by: Marek Olšák <maraeo@gmail.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Jakob Bornecrantz <jakob@vmware.com> Acked-by: Dave Airlie <airlied@redhat.com> Build-Tested-by: Jakob Bornecrantz <jakob@vmware.com> Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-08-19glx: use a block to fix declarations after code warningBrian Paul1-7/+9
2011-08-18glx: Don't flush twice if we fallback to dri2CopySubBufferKristian Høgsberg1-11/+10
The flush extensions flush call indicates end of frame and should only be called once per frame. However, in the dri2SwapBuffer fallback path, we call flush and then call dri2CopySubBuffer, which also calls flush. Refactor the code to only call flush once.
2011-08-09glx: move declarations before codeBrian Paul1-3/+7
2011-08-05glx/dri2: Paper over errors in DRI2Connect when indirectChristopher James Halse Rogers1-0/+9
DRI2 will throw BadRequest for this when the client is not local, but DRI2 is an implementation detail and not something callers should have to know about. Silently swallow errors in this case, and just propagate the failure through DRI2Connect's return code. Note: This is a candidate for the stable release branches. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28125 Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2011-07-19glx: Avoid calling __glXInitialize() in driReleaseDrawables().Henri Verbeet2-9/+4
This fixes a regression introduced by commit a26121f37530619610a78a5fbe5ef87e44047fda (fd.o bug #39219). Since the __glXInitialize() call should be unnecessary anyway, this is probably a nicer fix for the original problem too. NOTE: This is a candidate for the 7.10 and 7.11 branches. Signed-off-by: Henri Verbeet <hverbeet@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: padfoot@exemail.com.au
2011-07-16darwin: Include glxhash.c in libGL on darwinJeremy Huddleston1-0/+1
Fixes a build regression introduced by 4df137691ee29bb812347fa2c5f19095243ede22 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-07-15drisw: Fix 24bpp software rendering, take 2Marc Pignat1-0/+7
This patch add the support for 24bpp in the dri/swrast implementation. See http://bugs.freedesktop.org/show_bug.cgi?id=23525 Signed-off-by: Marc Pignat <marc at pignat.org> Signed-off-by: Brian Paul <brianp@vmware.com>
2011-07-14Rename swrastg_dri to swrast_driMarek Olšák1-3/+0
I prefer it this way and it has been suggested earlier by others too. Opinions?
2011-07-08GLX/DRI2: handle swap event swap count wrappingJesse Barnes5-2/+108
Create a new GLX drawable struct to track client related info, and add a wrap counter to it drawable and track it as we receive events. This allows us to support the full 64 bits of the event structure we pass to the client even though the server only gives us a 32 bit count. Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-07-08DRI2/GLX: use new swap event typesJesse Barnes2-4/+4
Use the new swap event type so we get valid SBC values. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-07-01scons: Actually add src/glx/SConscript.José Fonseca1-0/+85
2011-06-29drisw: Remove cargo culting that breaks GLX 1.3 ctorsAdam Jackson1-4/+0
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-06-29glx: Verify that drawable creation on the client side actually workedAdam Jackson2-26/+63
... and clean up if it didn't. Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-06-29glx: Alias glXFreeContextEXT to glXDestroyContextAdam Jackson1-14/+6
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-06-20glx: Fix compile.Stéphane Marchesin1-1/+1
2011-06-20glx: Bind to our context before __glXSetCurrentContextJeremy Huddleston1-9/+16
We want to bind to our context before calling __glXSetCurrentContext or messing with the gc rect in order to properly handle error conditions. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20glx: Destroy the old context only after the new one has been boundJeremy Huddleston1-7/+7
This fixes a regression introduced by 49d7e48b33264d94e30af6129c281b6acafa9427 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-20glx: Allow a context-specific fallback for glXGetProcAddressJeremy Huddleston7-1/+20
In applegl, GLX advertises the same extensions provided by OpenGL.framework even if such extensions are not provided by glapi. This allows a client to get access to such API. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-17apple: Use apple_cgl_get_dl_handle() rather than opening a new handleJeremy Huddleston1-22/+2
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-17glx: implement drawable refcounting.Stéphane Marchesin6-21/+37
The current dri context unbind logic will leak drawables until the process dies (they will then get released by the GEM code). There are two ways to fix this: either always call driReleaseDrawables every time we unbind a context (but that costs us round trips to the X server at getbuffers() time) or implement proper drawable refcounting. This patch implements the latter. Signed-off-by: Antoine Labour <piman@chromium.org> Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-06-14apple: Set the glapi dispatch table on context bindJeremy Huddleston4-3/+4
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13glx: Remove check for gc->vtable->destroyJeremy Huddleston1-2/+1
gc->vtable->destroy is always set and is used unconditionally in other places, so don't bother checking for it first. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13apple: applegl_destroy_context: Pass along the correct displayJeremy Huddleston1-1/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-13apple: Dead code removalJeremy Huddleston2-2/+0
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-11apple: Request OpenGL 3.2 from OpenGL.framework if availableJeremy Huddleston1-0/+15
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-11apple: Store the CGL API version number for future referenceJeremy Huddleston2-5/+5
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-11apple: Use a struct glx_config * rather than a void * in ↵Jeremy Huddleston2-19/+17
apple_visual_create_pfobj Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-11apple: Use _glapi_create_table_from_handle to initialize our dispatch tableJeremy Huddleston1-1117/+1
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-08glx: Remove some GLX_USE_APPLEGL guards around glapiJeremy Huddleston1-7/+3
Now that we're using glapi, we don't need some GLX_USE_APPLEGL ifdef-foo Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-08darwin: Use -fvisibility=hidden to set default symbol visibilityJeremy Huddleston2-20/+7
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-08mesa: merge glapidispatch.h into dispatch.hChia-I Wu1-2/+2
glapidispatch.h was located in glapi and shared with mesa core. Because the way it was shared, mesa core must include it indirectly via main/dispatch.h. Now that it is no longer needed by glapi and is located in core mesa, merging it with main/dispatch.h to avoid wrong uses.
2011-06-07apple: Update dispatch table to current OpenGL specsJeremy Huddleston1-25/+233
This updates the apple dispatch table to match the current glapi. Aliases are still not handled very well. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07apple: Dead code removalJeremy Huddleston24-52219/+0
Now that we're using glapi, all of this is no longer needed. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07apple: Remove apple_glx_get_proc_addressJeremy Huddleston3-54/+0
Now that we're using glapi, we don't need to special case this. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07apple: Use glapi rather than reinventing the wheelJeremy Huddleston10-53/+1065
With this change, Apple's libGL is now using glapi rather than implementing its own dispatch. In this implementation, two dispatch tables are created: __ogl_framework_api always points into OpenGL.framework. __applegl_api is the vtable that is used. It points into OpenGL.framework or to local implementations that override / interpose this in OpenGL.framework The initialization for __ogl_framework_api was copied from XQuartz with some modifications and probably still needs further edits to better deal with aliases. This is a good step towards supporting both indirect and direct rendering on darwin. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07apple: Rename __gl_api to __ogl_framework_apiJeremy Huddleston4-14/+14
In starting the migration to using mapi, rename __gl_api to __ogl_framework_api since it is a vtable for OpenGL.framework Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-06dri2: protect dri2FlushFrontBuffer against NULL buffers.Stéphane Marchesin1-0/+6