Drop VisualConfigPriv support from the DRI module.
No DDX driver uses this, and this patch stops the DRI module from poking around GLX module data structures.
This commit is contained in:
parent
7d74690536
commit
0af8180683
|
@ -67,7 +67,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "dristruct.h"
|
||||
#include "xf86.h"
|
||||
#include "xf86drm.h"
|
||||
#include "glxserver.h"
|
||||
#include "mi.h"
|
||||
#include "mipointer.h"
|
||||
#include "xf86_OSproc.h"
|
||||
|
@ -972,24 +971,8 @@ static Bool
|
|||
DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv)
|
||||
{
|
||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||
__GLXscreen *pGLXScreen = glxGetScreen(pScreen);
|
||||
__GLcontextModes *modes = pGLXScreen->modes;
|
||||
void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
|
||||
DRIContextPrivPtr pDRIContextPriv;
|
||||
void *contextStore;
|
||||
VisualPtr visual;
|
||||
int visNum;
|
||||
|
||||
visual = pScreen->visuals;
|
||||
|
||||
/* Find the X visual that corresponds the the first GLX visual */
|
||||
for (visNum = 0;
|
||||
visNum < pScreen->numVisuals;
|
||||
visNum++, visual++) {
|
||||
if (modes->visualID == visual->vid)
|
||||
break;
|
||||
}
|
||||
if (visNum == pScreen->numVisuals) return FALSE;
|
||||
|
||||
if (!(pDRIContextPriv =
|
||||
DRICreateContextPriv(pScreen,
|
||||
|
@ -999,9 +982,9 @@ DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv)
|
|||
|
||||
contextStore = DRIGetContextStore(pDRIContextPriv);
|
||||
if (pDRIPriv->pDriverInfo->CreateContext && needCtxPriv) {
|
||||
if (!pDRIPriv->pDriverInfo->CreateContext(pScreen, visual,
|
||||
if (!pDRIPriv->pDriverInfo->CreateContext(pScreen, NULL,
|
||||
pDRIPriv->pSAREA->dummy_context,
|
||||
*pVisualConfigPriv,
|
||||
NULL,
|
||||
(DRIContextType)(long)contextStore)) {
|
||||
DRIDestroyContextPriv(pDRIContextPriv);
|
||||
return FALSE;
|
||||
|
@ -1036,9 +1019,6 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
|
|||
XID context, drm_context_t * pHWContext)
|
||||
{
|
||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||
__GLXscreen *pGLXScreen = glxGetScreen(pScreen);
|
||||
__GLcontextModes *modes = pGLXScreen->modes;
|
||||
void **pVisualConfigPriv = pGLXScreen->pVisualPriv;
|
||||
DRIContextPrivPtr pDRIContextPriv;
|
||||
void *contextStore;
|
||||
|
||||
|
@ -1050,26 +1030,14 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
|
|||
}
|
||||
}
|
||||
|
||||
/* Find the GLX visual associated with the one requested */
|
||||
for (modes = pGLXScreen->modes; modes != NULL; modes = modes->next) {
|
||||
if (modes->visualID == visual->vid)
|
||||
break;
|
||||
pVisualConfigPriv++;
|
||||
}
|
||||
|
||||
if (modes == NULL) {
|
||||
/* No matching GLX visual found */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(pDRIContextPriv = DRICreateContextPriv(pScreen, pHWContext, 0))) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
contextStore = DRIGetContextStore(pDRIContextPriv);
|
||||
if (pDRIPriv->pDriverInfo->CreateContext) {
|
||||
if (!((*pDRIPriv->pDriverInfo->CreateContext)(pScreen, visual,
|
||||
*pHWContext, *pVisualConfigPriv,
|
||||
if (!((*pDRIPriv->pDriverInfo->CreateContext)(pScreen, NULL,
|
||||
*pHWContext, NULL,
|
||||
(DRIContextType)(long)contextStore))) {
|
||||
DRIDestroyContextPriv(pDRIContextPriv);
|
||||
return FALSE;
|
||||
|
|
|
@ -337,19 +337,9 @@ ProcXF86DRICreateContext(
|
|||
rep.sequenceNumber = client->sequence;
|
||||
|
||||
pScreen = screenInfo.screens[stuff->screen];
|
||||
visual = pScreen->visuals;
|
||||
|
||||
/* Find the requested X visual */
|
||||
for (i = 0; i < pScreen->numVisuals; i++, visual++)
|
||||
if (visual->vid == stuff->visual)
|
||||
break;
|
||||
if (i == pScreen->numVisuals) {
|
||||
/* No visual found */
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
if (!DRICreateContext( pScreen,
|
||||
visual,
|
||||
NULL,
|
||||
stuff->context,
|
||||
(drm_context_t *)&rep.hHWContext)) {
|
||||
return BadValue;
|
||||
|
|
Loading…
Reference in New Issue
Block a user