The intel_context.gen field is set by intelInitContext. So, by calling intelInitContext before initializing the vtable, we can can construct different vtables for different gens.
Signed-off-by: Chad Versace <c...@chad-versace.us> --- src/mesa/drivers/dri/i965/brw_context.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index cb37319..fbf77ad 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -70,7 +70,6 @@ GLboolean brwCreateContext( int api, return GL_FALSE; } - brwInitVtbl( brw ); brwInitDriverFunctions( &functions ); if (!intelInitContext( intel, api, mesaVis, driContextPriv, @@ -80,6 +79,8 @@ GLboolean brwCreateContext( int api, return GL_FALSE; } + brwInitVtbl( brw ); + /* Initialize swrast, tnl driver tables: */ intelInitSpanFuncs(ctx); -- 1.7.6.2 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev