static void brw_init_driver_functions(struct brw_context *brw, struct dd_function_table *functions) { _mesa_init_driver_functions(functions); /* GLX uses DRI2 invalidate events to handle window resizing. * Unfortunately, EGL does not - libEGL is written in XCB (not Xlib), * which doesn't provide a mechanism for snooping the event queues. * * So EGL still relies on viewport hacks to handle window resizing. * This should go away with DRI3000. */ if (!brw->driContext->driScreenPriv->dri2.useInvalidate) functions->Viewport = intel_viewport; functions->Flush = intel_glFlush; functions->Finish = intelFinish; functions->GetString = intelGetString; functions->UpdateState = intelInvalidateState; intelInitTextureFuncs(functions); intelInitTextureImageFuncs(functions); intelInitTextureSubImageFuncs(functions); intelInitTextureCopyImageFuncs(functions); intelInitClearFuncs(functions); intelInitBufferFuncs(functions); intelInitPixelFuncs(functions); intelInitBufferObjectFuncs(functions); intel_init_syncobj_functions(functions); brw_init_object_purgeable_functions(functions); brwInitFragProgFuncs( functions ); brw_init_common_queryobj_functions(functions); if (brw->gen >= 6) gen6_init_queryobj_functions(functions); else gen4_init_queryobj_functions(functions); functions->QuerySamplesForFormat = brw_query_samples_for_format; functions->NewTransformFeedback = brw_new_transform_feedback; functions->DeleteTransformFeedback = brw_delete_transform_feedback; functions->GetTransformFeedbackVertexCount = brw_get_transform_feedback_vertex_count; if (brw->gen >= 7) { functions->BeginTransformFeedback = gen7_begin_transform_feedback; functions->EndTransformFeedback = gen7_end_transform_feedback; functions->PauseTransformFeedback = gen7_pause_transform_feedback; functions->ResumeTransformFeedback = gen7_resume_transform_feedback; } else { functions->BeginTransformFeedback = brw_begin_transform_feedback; functions->EndTransformFeedback = brw_end_transform_feedback; } if (brw->gen >= 6) functions->GetSamplePosition = gen6_get_sample_position; }
void intelInitDriverFunctions(struct dd_function_table *functions) { _mesa_init_driver_functions(functions); functions->Flush = intel_glFlush; functions->Finish = intelFinish; functions->GetString = intelGetString; functions->UpdateState = intelInvalidateState; intelInitTextureFuncs(functions); intelInitTextureImageFuncs(functions); intelInitTextureSubImageFuncs(functions); intelInitTextureCopyImageFuncs(functions); intelInitClearFuncs(functions); intelInitBufferFuncs(functions); intelInitPixelFuncs(functions); intelInitBufferObjectFuncs(functions); intel_init_syncobj_functions(functions); }