summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2012-07-18 16:07:27 +0200
committerMichel Dänzer <michel.daenzer@amd.com>2012-07-18 17:18:55 +0200
commit70f0eda12723e19147c07740a4b7fcb91a3076d4 (patch)
tree971c329ddb8c202838871834730b4919da93f62f
parent229a1a7e4da1a9c60b35b79f2a63e0bab451a76e (diff)
downloadexternal_mesa3d-70f0eda12723e19147c07740a4b7fcb91a3076d4.zip
external_mesa3d-70f0eda12723e19147c07740a4b7fcb91a3076d4.tar.gz
external_mesa3d-70f0eda12723e19147c07740a4b7fcb91a3076d4.tar.bz2
st/xorg: reorder exa context creation and use screen param queries
Gives the x-server a more accurate description of the exa hardware capabilities. v2: drop NPOT check Signed-off-by: Lucas Stach <dev@lynxeye.de>
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 91669ce..c8c57ff 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,9 @@ 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 */
+
+ 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 +1046,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)