diff options
author | Connor Behan <connor.behan@gmail.com> | 2014-03-04 01:43:00 -0800 |
---|---|---|
committer | Connor Behan <connor.behan@gmail.com> | 2014-03-11 23:58:51 -0700 |
commit | 5ef5812a7a272aa08543cfd9b633f33c35e34dbd (patch) | |
tree | a8dc35a9512de13e40fa468cd4d58d2597793ef4 | |
parent | 9eb693640136bc8bcbe706d642519b4eb23286d4 (diff) |
Remove overuse of COMPOSITE_SETUP()
COMPOSITE_SETUP() involves expensive register writes so
R128EnterServer() should call it once when there are 3D windows and 0
times when there are no 3D windows.
Instead the code was calling it once when there were no 3D windows and
arbitrarily many times when there were 3D windows.
Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r-- | src/r128_dri.c | 6 | ||||
-rw-r--r-- | src/r128_exa_render.c | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/r128_dri.c b/src/r128_dri.c index ff7bbc2..2c905a4 100644 --- a/src/r128_dri.c +++ b/src/r128_dri.c @@ -308,7 +308,11 @@ static void R128EnterServer(ScreenPtr pScreen) #endif #ifdef USE_EXA if (info->ExaDriver) exaMarkSync(pScreen); - info->state_2d.composite_setup = FALSE; + /* EXA and DRI are fighting over control of the texture hardware. + * That means we need to setup compositing when the server wakes + * up if a 3D app is running. + */ + if (info->have3DWindows) info->state_2d.composite_setup = FALSE; #endif } diff --git a/src/r128_exa_render.c b/src/r128_exa_render.c index cb9f929..f00daf7 100644 --- a/src/r128_exa_render.c +++ b/src/r128_exa_render.c @@ -458,12 +458,7 @@ R128CCEPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, if (!info->state_2d.composite_setup) { COMPOSITE_SETUP(); - /* DRI and EXA are fighting over control of the texture hardware. - * That means we need to set up the compositing hardware every time - * while a 3D app is running and once after it closes. - */ - if (!info->have3DWindows) - info->state_2d.composite_setup = TRUE; + info->state_2d.composite_setup = TRUE; } /* We cannot guarantee that this register will stay zero - DRI needs it too. */ |