summaryrefslogtreecommitdiff
path: root/hw/kdrive/ephyr/ephyrdriext.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-01Do not check xfree argument for NULLMikhail Gusarov1-12/+9
xfree itself checks for NULL, and even this is not necessary as passing NULL to free(3) is safe. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Add type name argument to CreateNewResourceTypeAlan Coopersmith1-3/+1
Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18Ensure all resource types created have names registeredAlan Coopersmith1-0/+2
Calls RegisterResourceName to record the type name for use by X-Resource, XACE/SELinux/XTsol, and DTrace. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18Check for failures from CreateNewResourceTypeAlan Coopersmith1-0/+4
Make sure to check return value before setting bitmask flags. For most calls, just fails to init the extension. Since Xinput already calls FatalError() on initialization failure, so does failure to allocate Xinput's resource type. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2009-09-21input: define server-supported protocol versions in one single file.Peter Hutterer1-4/+4
include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: RĂ©mi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-16Change xf86dristr.h includes to use xf86driproto.h insteadAlan Coopersmith1-1/+1
Clears warnings about obsolete headers, but raises minimum required version of xf86driproto to 2.1.0 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14ephyr: switch to byte counting functionsPeter Hutterer1-7/+7
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11KDrive: Xephyr: DRI: Warning fixesDaniel Stone1-22/+22
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2008-12-12Remove #define NEED_EVENTS and NEED_REPLIESPeter Hutterer1-2/+0
A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-08-28Prepare for array-index based devPrivates.Tomas Carnecky1-2/+4
TODO: static indices can be made just an int; some indices can be combined.
2008-07-24Remove all empty extension reset hooks, replace with NULL.Adam Jackson1-11/+1
2008-07-23[Xephyr] various X86_64 build cleanupsDodji Seketeli1-14/+13
2008-04-23xephyr: XEPHYR_DRI is identical to XF86DRIGeorge Sapountzis1-4/+0
2008-02-21[Xephyr/GL] properly route expose event on GL drawablesDodji Seketeli1-4/+20
When an expose event happens on an host GL window paired with an internal drawable, route that expose event to the clients listening to the expose event on the internal drawable.
2008-01-15Removed some warnings.Tiago Vignatti1-1/+1
2007-12-13devPrivates rework: more cleanup from previous merge operation.Eamon Walsh1-32/+11
2007-10-03Xephyr: port XV/GL stuff of the new multiscreen architectureDodji Seketeli1-5/+8
We can now launch GL or XV apps in any of the Xephyr screens we want. * hw/kdrive/ephyr/hostx.c,h: (hostx_get_window): (hostx_create_window): make these functions be screen number aware. * hw/kdrive/ephyr/XF86dri.c : fix some compiler warnings. * hw/kdrive/ephyr/ephyrdri.c: (ephyrDRIQueryDirectRenderingCapable), (ephyrDRIOpenConnection), (ephyrDRIAuthConnection), (ephyrDRICloseConnection), (ephyrDRIGetClientDriverName), (ephyrDRICreateContext), (ephyrDRIDestroyContext), (ephyrDRICreateDrawable), (ephyrDRIGetDrawableInfo), (ephyrDRIGetDeviceInfo): in all those functions, don't forward the screen number we receive - from the client - to the host X. We (Xephyr) are always targetting the same X display screen, which is the one Xephyr got launched against. So we enforce that in the code. * hw/kdrive/ephyr/ephyrdriext.c: (EphyrMirrorHostVisuals): make this duplicate the visuals of the host X default screen into a given Xephyr screen. This way we have a chance to update the visuals of all Xephyr screen to make them mirror those of the host X. (many other places): specify screen number where required by the api change in hostx.h. * hw/kdrive/ephyr/ephyrglxext.c: specify screen number where required by the api change in hostx.h * hw/kdrive/ephyr/ephyrhostglx.c: don't forward the screen number we receive - from the client - to the host X. We (Xephyr) are always targetting the same X display screen, which is the one Xephyr got launched against. So we enforce that in the code. * hw/kdrive/ephyr/ephyrhostvideo.c,h: take in account the screen number received from the client app. This is useful to know on which Xephyr screen we need to display video stuff. * hw/kdrive/ephyr/ephyrvideo.c: update this to reflect the API change in hw/kdrive/ephyr/ephyrhostvideo.h. (ephyrSetPortAttribute): when parameters are not valid - they exceed their validity range - send them to the host anyway and do not return an error to clients. Some host expose buggy validity range, so rejecting client for that is too harsh.
2007-10-02Xephyr: check presence of extensions in host XDodji Seketeli1-0/+10
* hw/kdrive/ephyr/hostx.c,h: (hostx_has_xshape), (hostx_has_glx), (hostx_has_dri): added these new entry points * hw/kdrive/ephyr/ephyrdriext.c: (ephyrDRIExtensionInit): check presence of DRI and XShape extensions before trying to use them. * hw/kdrive/ephyr/ephyrglxext.c: (ephyrHijackGLXExtension): check presence of glx extension before we use it.
2007-10-02Xephyr: fix a clipping issue xephyr-driDodji Seketeli1-23/+25
* hw/kdrive/ephyr/ephyrdri.c: (ephyrDRIGetDrawableInfo): force the back clipping rects to equal the front clipping rects. * hw/kdrive/ephyr/ephyrdriext.c: (ProcXF86DRIGetDrawableInfo): properly overclip the clipping rects we got from the client. This bug fixes a clipping rect that was too small in height, basically. Also fix a possible mem corruption. * hw/kdrive/ephyr/hostx.c: (hostx_set_window_geometry): remove a useless XSync
2007-10-02Xephyr: properly clip GL drawables in XephyrDodji Seketeli1-35/+125
2007-10-02Xephyr: make accelerated glxgears work in XephyrDodji Seketeli1-39/+656
* hw/kdrive/ephyr/ephyr.c: (ephyrInitialize): cleanup ephyrDRI extension init. remove functions that belongs in ephyrdriext.c . * hw/kdrive/ephyr/ephyrdri.c: (ephyrDRICreateDrawable): create the drawable on the host X peer window, not on the host xephyr main window. (ephyrDRIGetDrawableInfo): get drawable info of the host X peer window. * hw/kdrive/ephyr/ephyrdriext.c: make ephyr DRI extention wrap a bunch of screen ops so that it can update the host X peer window whenever DRI bound drawable are moved in Xephyr. Also code the building blocks of the management of the host X window peer. * hw/kdrive/ephyr/hostx.c,h: (hostx_create_window): added this new entry point (hostx_destroy_window): ditto ()hostx_set_window_geometry): ditto
2007-10-02Xephyr: fix a host X hang.Dodji Seketeli1-4/+5
* hw/kdrive/ephyr/ephyrdri.c: (ephyrDRIGetDrawableInfo): quickly hook this into getting the drawable info from the host X server. For the time being, this only gets the drawable info of the Xephyr main window in the host. It should really get the info of a the peer drawable in the host X. So there should be a peer drawable to begin with. * hw/kdrive/ephyr/ephyrdriext.c: (ProcXF86DRIGetDrawableInfo): some cleanups. Properly get the the drawable info otherwise there is a host X hang. * hw/kdrive/ephyr/ephyrhostglx.c: do not (ephyrHostGLXQueryVersion): do not use C bindings of the glx protocol calls. Some of those actually access DRI context directly, resulting in the context having three clients. Instead all XF86DRI proto fowarding request should be coded by hand and only forward the protocol requests
2007-10-02Xephyr: Make glxinfo work on the ATI R200 free driver.Dodji Seketeli1-18/+17
* hw/kdrive/ephyr/ephyr.c: (EphyrDuplicateVisual): when duplicating the visual, copy the color component masks and the class from the hostX (EphyrMirrorHostVisuals): don't mix blue and green mask. * hw/kdrive/ephyr/ephyrdri.c: add more logs. (ephyrDRICreateDrawable): actually implement this. for the moment it creates a DRI drawable for the hostX window, no matter what drawable this call was issued for. (ephyrDRIGetDrawableInfo): actually implemented this. for the moment the drawable info queried for its attrs is the Xephyr main main window. * hw/kdrive/ephyr/ephyrdriext.c: (ProcXF86DRIGetDrawableInfo): properly hook this dispatch function to the ephyrDRIGetDrawableInfo() function. * hw/kdrive/ephyr/ephyrglxext.c: add a bunch of GLX implementation hooks here. Hijack some of the xserver GLX hooks with them. Still need to properly support byteswapped clients though. * hw/kdrive/ephyr/ephyrhostglx.c,h: actually implemented the protocol level forwarding functions used by the GLX entr points in ephyrglxext.c. Here as well, there are a bunch of them, but we are far from having implemented all the GLX calls. * hw/kdrive/ephyr/hostx.c,h: (hostx_get_window_attributes): added this new entry point (hostx_allocate_resource_id_peer): added this to keep track of resource IDs peers: one member of the peer is in Xephyr, the other is in host X. (hostx_get_resource_id_peer): ditto.
2007-10-02XEPHYR: more GLX/DRI proxying work.Dodji Seketeli1-171/+202
* hw/kdrive/ephyr/XF86dri.c: re format this correctly. Make function decls honour the Ansi-C standard. * hw/kdrive/ephyr/ephyr.c: protect glx/dri related extension initialisation with the XEPHYR_DRI macro. Initialize the GLX ext hijacking at startup. * hw/kdrive/ephyr/ephyrdri.c: add more logging to ease debugging * hw/kdrive/ephyr/ephyrdriext.c: ditto. reformat. * hw/kdrive/ephyr/ephyrglxext.c,h: add this extension to proxy GLX requests to the host X. started to proxy those nedded to make glxinfo work with fglrx. Not yet finished. * hw/kdrive/ephyr/ephyrhostglx.c,h: put here the actual Xlib code used to hit the host X server because Xlib stuff cannot be mixed with xserver internal code, otherwise compilation erros due to type clashes happen. So no Xlib type should be exported by the entrypoints defined here.
2007-10-02make xephyr talk DRI protocol with hostXDodji Seketeli1-3/+7
* configure.ac,include/dix-config.h.in: define the XEPHYR_DRI macro. define it when --enable-xephyr and --enable-dri are both turned on. * hw/kdrive/ephyr/XF86dri.c: copy this from mesa source to enable Xephyr to talk DRI protocol the host X. In mesa, this is used by libGL.so to talk DRI protocol with the server. * hw/kdrive/ephyr/ephyr.c: finally initialise the DRI extension in the ephyrInitScreen() function. * hw/kdrive/ephyr/ephyrdri.c,ephyrdriext.c: safeguard the compilation using the XEPHYR_DRI macro.
2007-10-02Initial dri forwarding big bricks.Dodji Seketeli1-0/+691
* hw/kdrive/ephyr/ephyrdriext.c: added this to implement a DRI extension into Xephyr. Normally the DRI extension is only present in the xfree86 server, but I have ported it to Xephyr. The extension calls functions that declared/defined in ephyrdri.h ephyrdri.c that forwards the DRI calls to the host X. It does not work yet, as this entry is just to put the big bricks in place. * hw/kdrive/ephyr/ephyrdri.c,h: declaration & definition of the DRI client API that would hit the hostX server. * hw/kdrive/ephyr/GL/internal/dri_interface.h: added this, otherwise inclusion of /usr/include/X11/dri/xf86dri.h won't compile