mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-20 17:10:25 +01:00
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
2a5c2bdfd5
commit
6a310bf763
2 changed files with 5 additions and 47 deletions
|
|
@ -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"
|
||||
|
|
@ -981,24 +980,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,
|
||||
|
|
@ -1008,9 +991,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;
|
||||
|
|
@ -1045,9 +1028,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;
|
||||
|
||||
|
|
@ -1059,26 +1039,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…
Add table
Reference in a new issue