GLboolean i830CreateContext( const __GLcontextModes *mesaVis, __DRIcontextPrivate *driContextPriv, void *sharedContextPrivate) { struct dd_function_table functions; struct i830_context *i830 = CALLOC_STRUCT(i830_context); struct intel_context *intel = &i830->intel; GLcontext *ctx = &intel->ctx; GLuint i; if (!i830) return GL_FALSE; i830InitVtbl( i830 ); i830InitDriverFunctions( &functions ); if (!intelInitContext( intel, mesaVis, driContextPriv, sharedContextPrivate, &functions )) { FREE(i830); return GL_FALSE; } intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS; intel->ctx.Const.MaxTextureImageUnits = I830_TEX_UNITS; intel->ctx.Const.MaxTextureCoordUnits = I830_TEX_UNITS; /* Advertise the full hardware capabilities. The new memory * manager should cope much better with overload situations: */ <<<<<<< i830_context.c
GLboolean i830CreateContext(const __GLcontextModes * mesaVis, __DRIcontextPrivate * driContextPriv, void *sharedContextPrivate) { struct dd_function_table functions; struct i830_context *i830 = CALLOC_STRUCT(i830_context); struct intel_context *intel = &i830->intel; GLcontext *ctx = &intel->ctx; if (!i830) return GL_FALSE; i830InitVtbl(i830); i830InitDriverFunctions(&functions); if (!intelInitContext(intel, mesaVis, driContextPriv, sharedContextPrivate, &functions)) { FREE(i830); return GL_FALSE; } intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS; intel->ctx.Const.MaxTextureImageUnits = I830_TEX_UNITS; intel->ctx.Const.MaxTextureCoordUnits = I830_TEX_UNITS; /* Advertise the full hardware capabilities. The new memory * manager should cope much better with overload situations: */ ctx->Const.MaxTextureLevels = 12; ctx->Const.Max3DTextureLevels = 9; ctx->Const.MaxCubeTextureLevels = 11; ctx->Const.MaxTextureRectSize = (1 << 11); ctx->Const.MaxTextureUnits = I830_TEX_UNITS; _tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12, 18 * sizeof(GLfloat)); intel->verts = TNL_CONTEXT(ctx)->clipspace.vertex_buf; driInitExtensions(ctx, i830_extensions, GL_FALSE); i830InitState(i830); i830InitMetaFuncs(i830); _tnl_allow_vertex_fog(ctx, 1); _tnl_allow_pixel_fog(ctx, 0); return GL_TRUE; }
GLboolean i830CreateContext(const __GLcontextModes * mesaVis, __DRIcontext * driContextPriv, void *sharedContextPrivate) { struct dd_function_table functions; struct i830_context *i830 = CALLOC_STRUCT(i830_context); struct intel_context *intel = &i830->intel; GLcontext *ctx = &intel->ctx; if (!i830) return GL_FALSE; i830InitVtbl(i830); i830InitDriverFunctions(&functions); if (!intelInitContext(intel, mesaVis, driContextPriv, sharedContextPrivate, &functions)) { FREE(i830); return GL_FALSE; } _math_matrix_ctr(&intel->ViewportMatrix); /* Initialize swrast, tnl driver tables: */ intelInitSpanFuncs(ctx); intelInitTriFuncs(ctx); /* Install the customized pipeline: */ _tnl_destroy_pipeline(ctx); _tnl_install_pipeline(ctx, intel_pipeline); if (intel->no_rast) FALLBACK(intel, INTEL_FALLBACK_USER, 1); intel->ctx.Const.MaxTextureUnits = I830_TEX_UNITS; intel->ctx.Const.MaxTextureImageUnits = I830_TEX_UNITS; intel->ctx.Const.MaxTextureCoordUnits = I830_TEX_UNITS; /* Advertise the full hardware capabilities. The new memory * manager should cope much better with overload situations: */ ctx->Const.MaxTextureLevels = 12; ctx->Const.Max3DTextureLevels = 9; ctx->Const.MaxCubeTextureLevels = 11; ctx->Const.MaxTextureRectSize = (1 << 11); ctx->Const.MaxTextureUnits = I830_TEX_UNITS; ctx->Const.MaxTextureMaxAnisotropy = 2.0; ctx->Const.MaxDrawBuffers = 1; _tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12, 18 * sizeof(GLfloat)); intel->verts = TNL_CONTEXT(ctx)->clipspace.vertex_buf; i830InitState(i830); _tnl_allow_vertex_fog(ctx, 1); _tnl_allow_pixel_fog(ctx, 0); return GL_TRUE; }