diff options
author | Dodji Seketeli <dodji@openedhand.com> | 2007-10-03 16:13:16 +0200 |
---|---|---|
committer | Dodji Seketeli <dodji@openedhand.com> | 2007-10-03 16:14:08 +0200 |
commit | 604ebb5a6de372e6a8a96e0ee997db7929126860 (patch) | |
tree | 72523d93657c444198a044282fe342edb9492d9e /exa | |
parent | 1365aeff5499a051375e43a9fcbf54733ac93929 (diff) | |
parent | 4ba76a7e2b62d26f43c0e670de571afb75ec92f4 (diff) |
Merge Xephyr-XV/GL stuff into master
Diffstat (limited to 'exa')
-rw-r--r-- | exa/exa.c | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -722,6 +722,48 @@ exaDriverAlloc(void) return xcalloc(1, sizeof(ExaDriverRec)); } +static Bool +exaDriverValidateEntryPoints (ExaDriverPtr pExaDriver) +{ + Bool res=TRUE ; + + if (!pExaDriver) + return FALSE ; + + if (!pExaDriver->memoryBase) { + LogMessage(X_ERROR, + "Exa: Exa::memoryBase member " + "must be assigned to a value different from zero\n") ; + res = FALSE ; + } + if (!pExaDriver->memorySize) { + LogMessage(X_ERROR, + "Exa: Exa::memorySize member must be different from zero\n") ; + res = FALSE ; + } + if (pExaDriver->offScreenBase > pExaDriver->memorySize) { + LogMessage(X_ERROR, + "Exa: Exa::ffscreenBase must be <= pExaDriver->memorySize member\n") ; + res = FALSE ; + } + if (!pExaDriver->PrepareSolid) { + LogMessage(X_ERROR, + "Exa: Exa::PrepareSolid member is required to be non NULL\n") ; + res = FALSE ; + } + if (!pExaDriver->PrepareCopy) { + LogMessage(X_ERROR, + "Exa: Exa::PrepareCopy member is required to be non NULL\n") ; + res = FALSE ; + } + if (!pExaDriver->WaitMarker) { + LogMessage(X_ERROR, + "Exa: Exa::WaitWarker member is required to be non NULL\n") ; + res = FALSE ; + } + return res ; +} + /** * @param pScreen screen being initialized * @param pScreenInfo EXA driver record @@ -806,6 +848,12 @@ exaDriverInit (ScreenPtr pScreen, { pScreenInfo->maxPitchPixels = pScreenInfo->maxX; } + if (!exaDriverValidateEntryPoints(pScreenInfo)) + { + LogMessage(X_ERROR, "Exa(%d): EXA driver entry points validation failed\n", + pScreen->myNum) ; + return FALSE ; + } #ifdef RENDER ps = GetPictureScreenIfSet(pScreen); |