diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2011-12-06 09:53:16 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2011-12-06 18:22:55 +0100 |
commit | 2c438ad8b82f47ac3252403052df16655184acbd (patch) | |
tree | b19ac1b0e2be79ec38014b6f42c028e932a70faf /vmwgfx/vmwgfx_driver.c | |
parent | 1736a76246f0a0dab01f5a1066332168d34b2803 (diff) |
vmwgfx: Add an option to enable rendercheck mode
Rendercheck mode is used to enable acceleration of all supported composite
operations, regardless of the current data location. The mode is off by
default, but could be turned on to test the hardware composite operation
implementation. Due to excessive data migration, rendercheck mode will be
slow.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Diffstat (limited to 'vmwgfx/vmwgfx_driver.c')
-rw-r--r-- | vmwgfx/vmwgfx_driver.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c index fe98bca..088ac3d 100644 --- a/vmwgfx/vmwgfx_driver.c +++ b/vmwgfx/vmwgfx_driver.c @@ -449,6 +449,11 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) &ms->accelerate_render) ? X_CONFIG : X_PROBED; + ms->rendercheck = FALSE; + ms->from_rendercheck = xf86GetOptValBool(ms->Options, OPTION_RENDERCHECK, + &ms->rendercheck) ? + X_CONFIG : X_DEFAULT; + ms->enable_dri = ms->accelerate_render; ms->from_dri = xf86GetOptValBool(ms->Options, OPTION_DRI, &ms->enable_dri) ? @@ -993,11 +998,18 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ms->from_render = X_PROBED; } } + if (ms->xat == NULL && ms->rendercheck) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Turning off renercheck mode.\n"); + ms->rendercheck = FALSE; + ms->from_rendercheck = X_PROBED; + } } if (!vmwgfx_saa_init(pScreen, ms->fd, ms->xat, &xorg_flush, ms->direct_presents, - ms->only_hw_presents)) { + ms->only_hw_presents, + ms->rendercheck)) { FatalError("Failed to initialize SAA.\n"); } @@ -1018,6 +1030,11 @@ drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86DrvMsg(pScrn->scrnIndex, ms->from_render, "Render acceleration is %s.\n", (ms->xat != NULL) ? "enabled" : "disabled"); + + xf86DrvMsg(pScrn->scrnIndex, ms->from_rendercheck, + "Rendercheck mode is %s.\n", + (ms->rendercheck) ? "enabled" : "disabled"); + xf86DrvMsg(pScrn->scrnIndex, ms->from_dri, "Direct rendering (3D) is %s.\n", (ms->dri2_available) ? "enabled" : "disabled"); if (ms->xat != NULL) { |