| @@ -385,26 +385,32 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags | | | @@ -385,26 +385,32 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags |
385 | xf86CollectOptions(pScrn, NULL); | | 385 | xf86CollectOptions(pScrn, NULL); |
386 | /* Process the options */ | | 386 | /* Process the options */ |
387 | if (!(pCg14->Options = malloc(sizeof(CG14Options)))) | | 387 | if (!(pCg14->Options = malloc(sizeof(CG14Options)))) |
388 | return FALSE; | | 388 | return FALSE; |
389 | memcpy(pCg14->Options, CG14Options, sizeof(CG14Options)); | | 389 | memcpy(pCg14->Options, CG14Options, sizeof(CG14Options)); |
390 | xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCg14->Options); | | 390 | xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pCg14->Options); |
391 | pCg14->use_shadow = xf86ReturnOptValBool(pCg14->Options, OPTION_SHADOW_FB, | | 391 | pCg14->use_shadow = xf86ReturnOptValBool(pCg14->Options, OPTION_SHADOW_FB, |
392 | TRUE); | | 392 | TRUE); |
393 | pCg14->use_accel = xf86ReturnOptValBool(pCg14->Options, OPTION_ACCEL, | | 393 | pCg14->use_accel = xf86ReturnOptValBool(pCg14->Options, OPTION_ACCEL, |
394 | TRUE); | | 394 | TRUE); |
395 | pCg14->use_xrender = xf86ReturnOptValBool(pCg14->Options, OPTION_XRENDER, | | 395 | pCg14->use_xrender = xf86ReturnOptValBool(pCg14->Options, OPTION_XRENDER, |
396 | FALSE); | | 396 | FALSE); |
397 | | | 397 | |
| | | 398 | if (pScrn->depth < 24) { |
| | | 399 | if (pCg14->use_xrender) |
| | | 400 | xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disabling xrender on depth < 24\n"); |
| | | 401 | pCg14->use_xrender = FALSE; |
| | | 402 | } |
| | | 403 | |
398 | /* | | 404 | /* |
399 | * This must happen after pScrn->display has been set because | | 405 | * This must happen after pScrn->display has been set because |
400 | * xf86SetWeight references it. | | 406 | * xf86SetWeight references it. |
401 | */ | | 407 | */ |
402 | if (pScrn->depth > 8) { | | 408 | if (pScrn->depth > 8) { |
403 | rgb weight = {0, 0, 0}; | | 409 | rgb weight = {0, 0, 0}; |
404 | rgb mask = {0xff, 0xff00, 0xff0000}; | | 410 | rgb mask = {0xff, 0xff00, 0xff0000}; |
405 | | | 411 | |
406 | if (!xf86SetWeight(pScrn, weight, mask)) { | | 412 | if (!xf86SetWeight(pScrn, weight, mask)) { |
407 | return FALSE; | | 413 | return FALSE; |
408 | } | | 414 | } |
409 | } | | 415 | } |
410 | | | 416 | |