[Mesa-dev] [PATCH 1/3] st/xorg: reorder exa context creation and use screen param queries
Lucas Stach
dev at lynxeye.de
Tue Jul 17 16:26:01 PDT 2012
Gives the x-server a more accurate description of the exa hardware
capabilities.
Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
src/gallium/state_trackers/xorg/xorg_exa.c | 17 ++++++++++-------
1 Datei geändert, 10 Zeilen hinzugefügt(+), 7 Zeilen entfernt(-)
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 91669ce..27a814a 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -991,6 +991,11 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
if (!exa)
return NULL;
+ exa->scrn = ms->screen;
+ exa->pipe = exa->scrn->context_create(exa->scrn, NULL);
+ if (exa->pipe == NULL)
+ goto out_err;
+
pExa = exaDriverAlloc();
if (!pExa) {
goto out_err;
@@ -1012,8 +1017,11 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
#ifdef EXA_MIXED_PIXMAPS
pExa->flags |= EXA_MIXED_PIXMAPS;
#endif
- pExa->maxX = 8191; /* FIXME */
- pExa->maxY = 8191; /* FIXME */
+ if (!exa->scrn->get_param(exa->scrn, PIPE_CAP_NPOT_TEXTURES))
+ pExa->flags |= EXA_OFFSCREEN_ALIGN_POT;
+
+ pExa->maxX = pExa->maxY =
+ 1 << (exa->scrn->get_param(exa->scrn, PIPE_CAP_MAX_TEXTURE_2D_LEVELS) - 1);
pExa->WaitMarker = ExaWaitMarker;
pExa->MarkSync = ExaMarkSync;
@@ -1040,11 +1048,6 @@ xorg_exa_init(ScrnInfoPtr pScrn, Bool accel)
goto out_err;
}
- exa->scrn = ms->screen;
- exa->pipe = exa->scrn->context_create(exa->scrn, NULL);
- if (exa->pipe == NULL)
- goto out_err;
-
/* Share context with DRI */
ms->ctx = exa->pipe;
if (cust && cust->winsys_context_throttle)
--
1.7.10.4
More information about the mesa-dev
mailing list