diff options
author | Dave Airlie <airlied@redhat.com> | 2008-05-28 15:55:44 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-06-04 14:08:27 +1000 |
commit | 0b734bd7cf921592eee441f759687e10f48a2cbc (patch) | |
tree | 3659fe5f86b0a1285ae5a6de592994ba8084074c /src/mesa/drivers/dri/common/dri_util.c | |
parent | f688827ebdc7fa8ef1160086565f9e109768a250 (diff) |
mesa/drm/ttm: allow build against non-TTM aware libdrm
I'll release a libdrm 2.3.1 without TTM apis included from a special
drm branch that should allow mesa 7.1 to build against it.
I've had to turn off DRI2 stuff.
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.c')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index daa3fc5814..6efdf4312a 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -771,8 +771,10 @@ static void driDestroyScreen(__DRIscreen *psp) (*psp->DriverAPI.DestroyScreen)(psp); if (psp->dri2.enabled) { +#ifdef TTM_API drmBOUnmap(psp->fd, &psp->dri2.sareaBO); drmBOUnreference(psp->fd, &psp->dri2.sareaBO); +#endif } else { (void)drmUnmap((drmAddress)psp->pSAREA, SAREA_MAX); (void)drmUnmap((drmAddress)psp->pFB, psp->fbSize); @@ -904,6 +906,7 @@ dri2CreateNewScreen(int scrn, int fd, unsigned int sarea_handle, const __DRIextension **extensions, const __DRIconfig ***driver_configs, void *data) { +#ifdef TTM_API static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; unsigned int *p; @@ -971,6 +974,9 @@ dri2CreateNewScreen(int scrn, int fd, unsigned int sarea_handle, psp->DriverAPI = driDriverAPI; return psp; +#else + return NULL; +#endif } static const __DRIextension **driGetExtensions(__DRIscreen *psp) |