[Intel-gfx] [PATCH] Fix directRenderingType check
Zhenyu Wang
zhenyu.z.wang at intel.com
Thu Dec 11 10:02:25 CET 2008
Don't miss classic texture memory allocation in DRI.
---
src/i830_driver.c | 28 +++++++++++++---------------
1 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 7590257..4ed20f1 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1557,21 +1557,14 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
pI830->directRenderingType = DRI_DISABLED;
#ifdef XF86DRI
- if (pI830->directRenderingType == DRI_XF86DRI) {
- if ((pI830->accel == ACCEL_NONE) || pI830->SWCursor) {
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
- "needs HW cursor and 2D acceleration.\n");
- pI830->directRenderingType = DRI_DISABLED;
- } else if (pScrn->depth != 16 && pScrn->depth != 24) {
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
- "runs only at depths 16 and 24.\n");
- pI830->directRenderingType = DRI_DISABLED;
- }
-
- if (pI830->directRenderingType == DRI_XF86DRI) {
- pI830->allocate_classic_textures =
- xf86ReturnOptValBool(pI830->Options, OPTION_LEGACY3D, TRUE);
- }
+ if ((pI830->accel == ACCEL_NONE) || pI830->SWCursor) {
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
+ "needs HW cursor and 2D acceleration.\n");
+ pI830->directRenderingType = DRI_DISABLED;
+ } else if (pScrn->depth != 16 && pScrn->depth != 24) {
+ xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "DRI is disabled because it "
+ "runs only at depths 16 and 24.\n");
+ pI830->directRenderingType = DRI_DISABLED;
}
#endif /* XF86DRI */
@@ -3107,6 +3100,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
*/
if (pI830->directRenderingType == DRI_NONE && I830DRIScreenInit(pScreen))
pI830->directRenderingType = DRI_XF86DRI;
+
+ if (pI830->directRenderingType == DRI_XF86DRI) {
+ pI830->allocate_classic_textures =
+ xf86ReturnOptValBool(pI830->Options, OPTION_LEGACY3D, TRUE);
+ }
#endif
/* Enable tiling by default */
--
1.5.3.8
More information about the Intel-gfx
mailing list