[Mesa-dev] decoupling XCB from Mesa
j.glisse at gmail.com
Tue Mar 29 08:08:07 PDT 2011
On Tue, Mar 29, 2011 at 2:28 AM, Srini <srini_rajini at yahoo.com> wrote:
> So, can you please suggest me which is the exact API or place to do this
> is there any such pointer for FAKE_FRONT_LEFT been maintained in kernel DRM
> module? or some where in x server kernel module? if it is so i can get some
> reference from there.
> please suggest me.
Question is what do you want to do exactly ? If you want to use mesa
software renderer i suggest you use the llvmpipe one and add proper
hook for your window system into mesa/src/gallium/state_tracker/egl/
(create a subdir their for your window system and look at the drm
folder for the simpler example).
If you also want to use the classic mesa driver than you need either
to add a new API to all of them (mesa/src/mesa/drivers/dri/) or fake
the dri interface (likely easier thought i can't remember if the dri
stuff in driver do any X/DRI2 protocol directly or just use the
callback stuff in mesa/include/GL/internal/dri_interface.h) in this
case the egl implementation need to call flush callback of
__DRI2flushExtensionRec also the invalidate callback will be call
through glx_dri2 code.
I think the biggest issue in faking dri api is that a lot of code is
in the src/glx stuff and this code callback into the driver for things
to happen. Basicly you will have to make sure that all call to
appropriate dri_interface.h callback are made corresponding to each
event (swapbuffer, new surface ...).
Gallium driver are more easier to work with, basicly just add you
window specific code into the mesa/src/gallium/state_tracker/egl/
More information about the mesa-dev