r100/r200/r300/r600: enable accel for Copy/DrawPixels without kms
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 12 Mar 2010 18:58:56 +0000 (13:58 -0500)
committerAlex Deucher <alexdeucher@gmail.com>
Wed, 24 Mar 2010 19:42:13 +0000 (15:42 -0400)
meta ops should work ok without kms.

src/mesa/drivers/dri/r200/r200_state.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r600/r700_state.c
src/mesa/drivers/dri/radeon/radeon_state.c

index 9c2ac05ad6c55a4b489dd02eef939306e298aa05..29d7bed8b6a993d364fa8df949e931c356a08d93 100644 (file)
@@ -2496,11 +2496,10 @@ void r200InitStateFuncs( radeonContextPtr radeon, struct dd_function_table *func
    functions->DrawBuffer               = radeonDrawBuffer;
    functions->ReadBuffer               = radeonReadBuffer;
 
-   if (radeon->radeonScreen->kernel_mm) {
-          functions->CopyPixels                = _mesa_meta_CopyPixels;
-          functions->DrawPixels                = _mesa_meta_DrawPixels;
+   functions->CopyPixels                = _mesa_meta_CopyPixels;
+   functions->DrawPixels                = _mesa_meta_DrawPixels;
+   if (radeon->radeonScreen->kernel_mm)
           functions->ReadPixels                = radeonReadPixels;
-   }
 
    functions->AlphaFunc                        = r200AlphaFunc;
    functions->BlendColor               = r200BlendColor;
index 749a2464e7cbf3ee66acc1e757e071542677e7b1..e660b1fb3bbb7b2fa704469824d52e2287fcdc83 100644 (file)
@@ -2396,11 +2396,10 @@ void r300InitStateFuncs(radeonContextPtr radeon, struct dd_function_table *funct
        functions->DrawBuffer = radeonDrawBuffer;
        functions->ReadBuffer = radeonReadBuffer;
 
-       if (radeon->radeonScreen->kernel_mm) {
-               functions->CopyPixels = _mesa_meta_CopyPixels;
-               functions->DrawPixels = _mesa_meta_DrawPixels;
+       functions->CopyPixels = _mesa_meta_CopyPixels;
+       functions->DrawPixels = _mesa_meta_DrawPixels;
+       if (radeon->radeonScreen->kernel_mm)
                functions->ReadPixels = radeonReadPixels;
-       }
 }
 
 void r300InitShaderFunctions(r300ContextPtr r300)
index 1ff233d91ee86bcdf11e92beb770a14f42963b67..1da31e7b2b4e2dec09ab62ac58b1b23912a8d377 100644 (file)
@@ -1861,10 +1861,9 @@ void r700InitStateFuncs(radeonContextPtr radeon, struct dd_function_table *funct
        functions->DrawBuffer = radeonDrawBuffer;
        functions->ReadBuffer = radeonReadBuffer;
 
-       if (radeon->radeonScreen->kernel_mm) {
-               functions->CopyPixels = _mesa_meta_CopyPixels;
-               functions->DrawPixels = _mesa_meta_DrawPixels;
+       functions->CopyPixels = _mesa_meta_CopyPixels;
+       functions->DrawPixels = _mesa_meta_DrawPixels;
+       if (radeon->radeonScreen->kernel_mm)
                functions->ReadPixels = radeonReadPixels;
-       }
 }
 
index 0afbc19c1273a71694f9979d39325fd26b670080..539b067742fda0b588a0b13fe98af4d343547f55 100644 (file)
@@ -2249,11 +2249,10 @@ void radeonInitStateFuncs( GLcontext *ctx , GLboolean dri2 )
 
    ctx->Driver.DrawBuffer              = radeonDrawBuffer;
    ctx->Driver.ReadBuffer              = radeonReadBuffer;
-   if (dri2) {
-          ctx->Driver.CopyPixels               = _mesa_meta_CopyPixels;
-          ctx->Driver.DrawPixels               = _mesa_meta_DrawPixels;
+   ctx->Driver.CopyPixels               = _mesa_meta_CopyPixels;
+   ctx->Driver.DrawPixels               = _mesa_meta_DrawPixels;
+   if (dri2)
           ctx->Driver.ReadPixels               = radeonReadPixels;
-   }
 
    ctx->Driver.AlphaFunc               = radeonAlphaFunc;
    ctx->Driver.BlendEquationSeparate   = radeonBlendEquationSeparate;