History log of /external/mesa3d/src/glx/dri_glx.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5fdc42fb877644ae4c3343c9391f959bc7d71515 11-Feb-2013 Brian Paul <brianp@vmware.com> dri_glx: fix use after free report

the critical error would use driverName.

Found by internal RH coverity scan.

Note: This is a candidate for stable branches.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit a0ec9185eb90568ab57170dc682de0ba0c9e5e62)

Conflicts:

src/glx/dri_glx.c
/external/mesa3d/src/glx/dri_glx.c
6c9af977401ff986964d678f8870eee23c504077 04-Feb-2012 Carl Worth <cworth@cworth.org> dri: Emit a critical error if a named driver fails to load.

Something has gone wrong if we were asked to load a driver of a
specific name, but it failed to load for some reason. The user really
should be made aware of this, (and instructed to set LIBGL_DEBUG for
more details).

Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
/external/mesa3d/src/glx/dri_glx.c
43409fa7b0e64f6d73c3d33bc9a39ba26dd4caeb 30-Nov-2011 Ian Romanick <ian.d.romanick@intel.com> glx: Add glx_screen_vtable::create_context_attribs

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glx/dri_glx.c
4dbd13cb3f5aeff6ddc85fd091b4677369c19778 07-Dec-2011 Ian Romanick <ian.d.romanick@intel.com> glx: Send DestroyContext protocol at the correct times

Send the DestroyContext protocol immediately when glXDestroyContext is
called, and never call it when glXFreeContextEXT is called. In both
cases, either destroy the client-side structures or, if the context is
current, set xid to None so that the client-side structures will be
destroyed later.

I believe this restores the behavior of the original SGI code. See
src/glx/x11 around commit 5df82c8. The spec doesn't say anything
about glXDestroyContext not really destroying imported contexts (it
acts like glXFreeContextEXT instead), but that's what the original
code did. Note that glXFreeContextEXT on a non-imported context does
not destroy it either.

Fixes the piglit test glx-free-context.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glx/dri_glx.c
c4a8c54c3bb31547cba57702ffea99293afef522 06-Dec-2011 Ian Romanick <ian.d.romanick@intel.com> glx: Don't create a shared context if the other context isn't the same kind

Each of the DRI, DRI2, and DRISW backends contain code like the
following in their create-context routine:

if (shareList) {
pcp_shared = (struct dri2_context *) shareList;
shared = pcp_shared->driContext;
}

This assumes that the glx_context *shareList is actually the correct
derived type. However, if shareList was created as an
indirect-rendering context, it will not be the expected type. As a
result, shared will contain garbage. This garbage will be passed to
the driver, and the driver will probably segfault. This can be
observed with the following GLX code:

ctx0 = glXCreateContext(dpy, visinfo, NULL, False);
ctx1 = glXCreateContext(dpy, visinfo, ctx0, True);

Create-context is the only case where this occurs. All other cases
where a context is passed to the backend, it is the 'this' pointer
(i.e., we got to the backend by call something from ctx->vtable).

To work around this, check that the shareList->vtable->destroy method
is the same as the destroy method of the expected type. We could also
check that shareList->vtable matches the vtable or by adding a "tag"
to glx_context to identify the derived type.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/glx/dri_glx.c
63a6fd6603574c1c01324fbeb0863e39d3864c16 06-Dec-2011 Aaron Plattner <aplattner@nvidia.com> glx: Fix indirect fallback when a non-Mesa GLX extension is present.

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>
/external/mesa3d/src/glx/dri_glx.c
e4344161bde2e24fcfba65d30d58f087bd8bf94d 25-Aug-2011 Ian Romanick <ian.d.romanick@intel.com> dri: Remove all DRI1 drivers

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>
/external/mesa3d/src/glx/dri_glx.c
559e4f8ebcb186b491d7d687ac43f22a62448fc1 15-Jun-2011 Jeremy Huddleston <jeremyhu@apple.com> glx: Allow a context-specific fallback for glXGetProcAddress

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>
/external/mesa3d/src/glx/dri_glx.c
bf69ce37f0dcbb479078ee676d5100ac63e20750 16-Jun-2011 Stéphane Marchesin <marcheu@chromium.org> glx: implement drawable refcounting.

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>
/external/mesa3d/src/glx/dri_glx.c
0e8e8ba29a7cbe2fe45939cb972f437ccd21bcd5 30-Jan-2011 Henri Verbeet <hverbeet@gmail.com> glx: Fix leaks in DRI screen creation error paths.

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/glx/dri_glx.c
16887d042a917fa4773e4d853f50051b54e9948c 27-Aug-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Drop broken drawable garbage collection

Doesn't work for pixmaps, was looking up the GLX XID and was never thread
safe. Instead, just destroy the client side structures when the
drawable is no long current for a context.
/external/mesa3d/src/glx/dri_glx.c
c491e585e43d48a2aeec96ccc4008da6c443fb42 28-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move bind and unbind to context vtable
/external/mesa3d/src/glx/dri_glx.c
c356f5867f2c1fad7155df538b9affa8dbdcf869 28-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Rename __GLXcontext and __GLXdisplayPrivate to struct types.
/external/mesa3d/src/glx/dri_glx.c
66fc35cde9ed68a09920ad6a28de794dd1d3aa8c 28-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Rename __GLXscreenConfigs to struct glx_screen

Because double underscores in private type names is painful.
/external/mesa3d/src/glx/dri_glx.c
38c51a76533a90cf2c9381c99247cfac45fe70eb 28-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Use _X_EXPORT instead of our own PUBLIC macro

We're an X client library, so we can use Xfuncproto.h.
/external/mesa3d/src/glx/dri_glx.c
6ddf66e9230ee862ac341c4767cf6b3b2dd2552b 28-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Rename __GLcontextModes to struct glx_config

With this rename, we use 'config' consitently to refer to GLX configurations
instead of the modes/configs/visual mess before.
/external/mesa3d/src/glx/dri_glx.c
bc34aa6128b9d509a25232d70dc826f1921fd221 26-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Drop duplicate psc field in dri context struct

Same problem as fixed for drisw in 4d58b5b482d06ab8d4c4b2db33d0b48b7c82d064.
/external/mesa3d/src/glx/dri_glx.c
d77bb8e059ecfed9b714301fc31b093c6026c7bc 24-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Don't destroy context with XID 0

We use XID 0 to indicate the context has already been destroyed, but it's
currently bound.
/external/mesa3d/src/glx/dri_glx.c
6393a33944ec9983426cecd5f6c9f05ac089e1ae 24-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: zero out drawable structs after allocation
/external/mesa3d/src/glx/dri_glx.c
6ec39db726beead21d97bf64ddbe1f0b2d2d6ca1 23-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Refactor and simplify context creation

This lets us better separate context creation between the different
backends.
/external/mesa3d/src/glx/dri_glx.c
c796bb0cc3fde409545bff320540ddf5c029e513 23-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move context destroy to context vtable
/external/mesa3d/src/glx/dri_glx.c
7b7845a076c933e096ac511b4184141ba194449a 23-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move WaitGL, WaitX, UseXFont to context vtable functions
/external/mesa3d/src/glx/dri_glx.c
31819830b66a49f1b62e09090cc65aefc657aeb8 23-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Allocate the __GLXcontext in the DRI drivers
/external/mesa3d/src/glx/dri_glx.c
a7292f2920a28a190ca39ce530454a852ec36d59 20-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move DRI CopySubBuffer extension to DRI1 code

We do this in the X server for DRI2.
/external/mesa3d/src/glx/dri_glx.c
bab13969d8bf3ff9259524c3f4ab96d81485ccef 20-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move driver_configs to DRI screen privates
/external/mesa3d/src/glx/dri_glx.c
271c3c3a90ccfd01da9d7ac7fa451518f4e6a27c 20-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move __DRIdrawable pointers to DRI drawable privates
/external/mesa3d/src/glx/dri_glx.c
70887d517290060a80c7f5dd8c0ea0c834c4d91e 19-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move __driScreen into the dri screen privates
/external/mesa3d/src/glx/dri_glx.c
089fc37c6fa158824279e08e3b378ced94d6f803 19-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Move DRI1 specific extensions and code to DRI1 screen private
/external/mesa3d/src/glx/dri_glx.c
f972115d33e391499e049b83a1559959f2ca9f72 19-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Add screen privates for dri drivers and moved some fields there

GLXscreenConfigs is badly named and a dumping ground for a lot of stuff.
This patch creates private screen structs for the dri drivers and moves
some of their fields over there.
/external/mesa3d/src/glx/dri_glx.c
a296d96de45d38a6ed0b3c817334d443facc169b 19-Jul-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Rename various DRI structs away from obnoxious __GLXfooRec convention

Enough is enough.
/external/mesa3d/src/glx/dri_glx.c
643b2af0203764cb9f0a5b9e082937ab3f243523 21-May-2010 Kristian Høgsberg <krh@bitplanet.net> glx: Split tfp functions out to context vtable

This introduces a new per-context vtable, which lets us clean up all the
#ifdef's a bit and move the DRI2 specific implementation into dri2_glx.c.
/external/mesa3d/src/glx/dri_glx.c
80b280db883edc9550484dba03bd5c124b6a9bf9 02-Apr-2010 Jeremy Huddleston <jeremyhu@apple.com> apple: Change ifdefs for DRI to be DRI && !APPLE

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
/external/mesa3d/src/glx/dri_glx.c
115203281cf791221f586f03c14cfe4e0a44dd7a 02-Apr-2010 Jeremy Huddleston <jeremyhu@apple.com> Revert accidental commits from the xquartz tree

This reverts commit 9aadc793f3db64cefa0b08f18abad424a659dacc.
This reverts commit 69ea4e7718efb60b6b0d795a355cebd6712ceac1.
This reverts commit dbe8b013936d977ec63d6607bfd2fc6772d29787.
This reverts commit 23215ef4d60a86d9f3b3fdc08e3fdadc59e98890.
This reverts commit 9495e3703062d1ddaf3161f4efc23f0b51284d9b.
This reverts commit 0594cf70883b64692ba617d85f4f9b4e636e5c2b.
This reverts commit 86a7978d37393ee34f876569ac06ffdb8d7289ae.
This reverts commit 437902ce978cde9a0e1aa260f12dc232a8501c42.
/external/mesa3d/src/glx/dri_glx.c
23215ef4d60a86d9f3b3fdc08e3fdadc59e98890 01-Apr-2010 Jeremy Huddleston <jeremyhu@apple.com> apple: Change ifdefs for DRI to be DRI && !APPLE

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
/external/mesa3d/src/glx/dri_glx.c
ae7b3a632dd3f3b005459d77b66a77948260f716 06-Mar-2010 Brian Paul <brianp@vmware.com> glx: Move initialization of ext_list_first_time to where it's storage is allocated

Move the initialization of ext_list_first_time from all of the DRI loader's
CreateScreen routines, to where the storage for the screen config is
allocated.

It needs to get set in the screen-config even if DRI is forced off
using LIBGL_ALWAYS_INDIRECT, so that psc->direct_support is initialized
correctly, otherwise __glXExtensionBitIsEnabled() always returns FALSE

Specifically, this causes a problem with an X server which advertises
GLX<=1.2, and the GLX_SGIX_fbconfig extension.
glXGetFBConfigFromVisualSGIX() uses __glXExtensionBitIsEnabled() to
check if the GLX_SGIX_fbconfig extension is available, but that function
won't return correct information because that data has never been
initialized, because ext_list_first_time was never set...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Brian Paul <brianp@vmware.com>

(cherry picked from commit 96ab4d2b84178209ee59017458d9964b32b7e183)
/external/mesa3d/src/glx/dri_glx.c
86d98fa4a2dfdae75e6ecd9a7e6e73d4183075a0 15-Feb-2010 Vinson Lee <vlee@vmware.com> glx: Silence uninitialized variable warning.
/external/mesa3d/src/glx/dri_glx.c
6e8897ff9f90601ebf6eed500ad942c11b54d1f7 09-Feb-2010 Kristian Høgsberg <krh@bitplanet.net> Retire miniglx and move the actual glx code up to src/glx
/external/mesa3d/src/glx/dri_glx.c