xlib: plug in more meta functions, if TEST_META_FUNCS is set

This commit is contained in:
Brian Paul
2009-08-31 21:14:50 -06:00
parent 056612241a
commit ae5d78198f

View File

@@ -1148,23 +1148,25 @@ xmesa_init_driver_functions( XMesaVisual xmvisual,
driver->IndexMask = index_mask; driver->IndexMask = index_mask;
driver->ColorMask = color_mask; driver->ColorMask = color_mask;
driver->Enable = enable; driver->Enable = enable;
if (TEST_META_FUNCS)
driver->Clear = _mesa_meta_clear;
else
driver->Clear = clear_buffers;
driver->Viewport = xmesa_viewport; driver->Viewport = xmesa_viewport;
#ifndef XFree86Server
driver->CopyPixels = xmesa_CopyPixels;
if (TEST_META_FUNCS) { if (TEST_META_FUNCS) {
driver->Clear = _mesa_meta_clear;
driver->CopyPixels = _mesa_meta_copy_pixels;
driver->BlitFramebuffer = _mesa_meta_blit_framebuffer;
driver->DrawPixels = _mesa_meta_draw_pixels; driver->DrawPixels = _mesa_meta_draw_pixels;
} }
else if (xmvisual->undithered_pf == PF_8R8G8B && else {
xmvisual->dithered_pf == PF_8R8G8B && driver->Clear = clear_buffers;
xmvisual->BitsPerPixel == 32) { #ifndef XFree86Server
driver->DrawPixels = xmesa_DrawPixels_8R8G8B; driver->CopyPixels = xmesa_CopyPixels;
} if (xmvisual->undithered_pf == PF_8R8G8B &&
else if (xmvisual->undithered_pf == PF_5R6G5B) { xmvisual->dithered_pf == PF_8R8G8B &&
driver->DrawPixels = xmesa_DrawPixels_5R6G5B; xmvisual->BitsPerPixel == 32) {
driver->DrawPixels = xmesa_DrawPixels_8R8G8B;
}
else if (xmvisual->undithered_pf == PF_5R6G5B) {
driver->DrawPixels = xmesa_DrawPixels_5R6G5B;
}
} }
#endif #endif
driver->TestProxyTexImage = test_proxy_teximage; driver->TestProxyTexImage = test_proxy_teximage;