diff options
author | Jouk <[email protected]> | 2007-10-31 08:18:58 +0100 |
---|---|---|
committer | Jouk <[email protected]> | 2007-10-31 08:18:58 +0100 |
commit | d1414da8f9dbf3c27cf05509be51e8c70ed1185d (patch) | |
tree | b6b3fdccea77d6173c1a829e0d2710d5b973dd5a /src/mesa/drivers/dri/i965/intel_context.c | |
parent | b263435a98173645fa3f4a5dce4566e53470f38f (diff) | |
parent | d2f19a554a9089fddb5e978e3a732bbf71d77f93 (diff) |
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_context.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c index 2cf311c7135..49431b2a0b2 100644 --- a/src/mesa/drivers/dri/i965/intel_context.c +++ b/src/mesa/drivers/dri/i965/intel_context.c @@ -84,6 +84,11 @@ int INTEL_DEBUG = (0); #define need_GL_EXT_multi_draw_arrays #define need_GL_EXT_secondary_color #define need_GL_EXT_point_parameters +#define need_GL_VERSION_2_0 +#define need_GL_VERSION_2_1 +#define need_GL_ARB_shader_objects +#define need_GL_ARB_vertex_shader + #include "extension_helper.h" #ifndef VERBOSE @@ -190,6 +195,13 @@ const struct dri_extension card_extensions[] = { "GL_MESA_ycbcr_texture", NULL }, { "GL_NV_blend_square", NULL }, { "GL_SGIS_generate_mipmap", NULL }, + { "GL_ARB_shading_language_100", GL_VERSION_2_0_functions}, + { "GL_ARB_shading_language_120", GL_VERSION_2_1_functions}, + { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions}, + { "GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions}, + { "GL_ARB_fragment_shader", NULL }, + /* XXX not implement yet, to compile builtin glsl lib */ + { "GL_ARB_draw_buffers", NULL }, { NULL, NULL } }; @@ -330,8 +342,8 @@ GLboolean intelInitContext( struct intel_context *intel, GLcontext *shareCtx = (GLcontext *) sharedContextPrivate; __DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv; intelScreenPrivate *intelScreen = (intelScreenPrivate *)sPriv->private; - volatile drmI830Sarea *saPriv = (volatile drmI830Sarea *) - (((GLubyte *)sPriv->pSAREA)+intelScreen->sarea_priv_offset); + volatile drmI830Sarea *saPriv = (drmI830Sarea *) + (((GLubyte *)sPriv->pSAREA)+intelScreen->sarea_priv_offset); if (!_mesa_initialize_context(&intel->ctx, mesaVis, shareCtx, @@ -349,9 +361,6 @@ GLboolean intelInitContext( struct intel_context *intel, driParseConfigFiles (&intel->optionCache, &intelScreen->optionCache, intel->driScreen->myNum, "i965"); - intel->vblank_flags = (intel->intelScreen->irq_active != 0) - ? driGetDefaultVBlankFlags(&intel->optionCache) : VBLANK_FLAG_NO_IRQ; - ctx->Const.MaxTextureMaxAnisotropy = 2.0; if (getenv("INTEL_STRICT_CONFORMANCE")) { @@ -498,7 +507,7 @@ GLboolean intelInitContext( struct intel_context *intel, _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" ); _mesa_enable_extension( ctx, "GL_S3_s3tc" ); } - else if (driQueryOptionb (&intelScreen->optionCache, "force_s3tc_enable")) { + else if (driQueryOptionb (&intel->optionCache, "force_s3tc_enable")) { _mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" ); } @@ -559,6 +568,8 @@ void intelDestroyContext(__DRIcontextPrivate *driContextPriv) #endif /* free the Mesa context */ + intel->ctx.VertexProgram.Current = NULL; + intel->ctx.FragmentProgram.Current = NULL; _mesa_destroy_context(&intel->ctx); } @@ -583,12 +594,16 @@ GLboolean intelMakeCurrent(__DRIcontextPrivate *driContextPriv, } if ( intel->driDrawable != driDrawPriv ) { - /* Shouldn't the readbuffer be stored also? */ - driDrawableInitVBlank( driDrawPriv, intel->vblank_flags, - &intel->vbl_seq ); + if (driDrawPriv->swap_interval == (unsigned)-1) { + driDrawPriv->vblFlags = (intel->intelScreen->irq_active != 0) + ? driGetDefaultVBlankFlags(&intel->optionCache) + : VBLANK_FLAG_NO_IRQ; + driDrawableInitVBlank( driDrawPriv ); + } intel->driDrawable = driDrawPriv; intelWindowMoved( intel ); + /* Shouldn't the readbuffer be stored also? */ } _mesa_make_current(&intel->ctx, |