From 8aa209c766b79144db499063dd1c8482562b07bf Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 27 Jan 2009 19:10:43 -0800 Subject: Make GL_ARB_draw_buffers mandatory Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i915/i915_context.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa/drivers/dri/i915/i915_context.c') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index 3d6af38057..c224c68b66 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -172,6 +172,8 @@ i915CreateContext(const __GLcontextModes * mesaVis, ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; + ctx->Const.MaxDrawBuffers = 1; + driInitExtensions(ctx, i915_extensions, GL_FALSE); -- cgit v1.2.3 From 425c803c039735aaaeb70f1613268fd4909862dc Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 27 Jan 2009 23:44:18 -0800 Subject: intel: Fix up some extension string issues Move the remaining extension string enables to intel_extensions.c. Make sure that GL_NV_texture_env_combine4 is not enabled on i830. --- src/mesa/drivers/dri/i915/i915_context.c | 13 ------------- src/mesa/drivers/dri/intel/intel_extensions.c | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 14 deletions(-) (limited to 'src/mesa/drivers/dri/i915/i915_context.c') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index c224c68b66..6e2d41e19a 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -50,16 +50,6 @@ * Mesa's Driver Functions ***************************************/ -static const struct dri_extension i915_extensions[] = { - {"GL_ARB_depth_texture", NULL}, - {"GL_ARB_fragment_program", NULL}, - {"GL_ARB_shadow", NULL}, - {"GL_ARB_texture_non_power_of_two", NULL}, - {"GL_ATI_texture_env_combine3", NULL}, - {"GL_EXT_shadow_funcs", NULL}, - {NULL, NULL} -}; - /* Override intel default. */ static void @@ -174,9 +164,6 @@ i915CreateContext(const __GLcontextModes * mesaVis, ctx->Const.MaxDrawBuffers = 1; - driInitExtensions(ctx, i915_extensions, GL_FALSE); - - _tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12, 36 * sizeof(GLfloat)); diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 27d056a3b7..28223ca141 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -98,7 +98,6 @@ static const struct dri_extension card_extensions[] = { { "GL_MESA_ycbcr_texture", NULL }, { "GL_NV_blend_square", NULL }, { "GL_NV_point_sprite", GL_NV_point_sprite_functions }, - { "GL_NV_texture_env_combine4", NULL }, { "GL_NV_vertex_program", GL_NV_vertex_program_functions }, { "GL_NV_vertex_program1_1", NULL }, { "GL_SGIS_generate_mipmap", NULL }, @@ -106,6 +105,19 @@ static const struct dri_extension card_extensions[] = { }; +/** i915 / i945-only extensions */ +static const struct dri_extension i915_extensions[] = { + { "GL_ARB_depth_texture", NULL }, + { "GL_ARB_fragment_program", NULL }, + { "GL_ARB_shadow", NULL }, + { "GL_ARB_texture_non_power_of_two", NULL }, + { "GL_ATI_texture_env_combine3", NULL }, + { "GL_EXT_shadow_funcs", NULL }, + { "GL_NV_texture_env_combine4", NULL }, + { NULL, NULL } +}; + + /** i965-only extensions */ static const struct dri_extension brw_extensions[] = { { "GL_ARB_depth_texture", NULL }, @@ -132,6 +144,7 @@ static const struct dri_extension brw_extensions[] = { { "GL_EXT_vertex_array_bgra", NULL }, { "GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions }, { "GL_ATI_texture_env_combine3", NULL }, + { "GL_NV_texture_env_combine4", NULL }, { NULL, NULL } }; @@ -169,4 +182,8 @@ intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging) if (intel == NULL || IS_965(intel->intelScreen->deviceID)) driInitExtensions(ctx, brw_extensions, GL_FALSE); + + if (intel == NULL || IS_915(intel->intelScreen->deviceID) + || IS_945(intel->intelScreen->deviceID)) + driInitExtensions(ctx, i915_extensions, GL_FALSE); } -- cgit v1.2.3