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/common/utils.c | 2 ++ src/mesa/drivers/dri/ffb/ffb_xmesa.c | 2 ++ src/mesa/drivers/dri/gamma/gamma_context.c | 2 ++ src/mesa/drivers/dri/i915/i830_context.c | 2 ++ src/mesa/drivers/dri/i915/i915_context.c | 2 ++ src/mesa/drivers/dri/intel/intel_extensions.c | 1 - src/mesa/drivers/dri/mach64/mach64_context.c | 1 + src/mesa/drivers/dri/mga/mga_xmesa.c | 2 ++ src/mesa/drivers/dri/r128/r128_context.c | 2 ++ src/mesa/drivers/dri/r200/r200_context.c | 2 ++ src/mesa/drivers/dri/r300/r300_context.c | 2 ++ src/mesa/drivers/dri/radeon/radeon_context.c | 2 ++ src/mesa/drivers/dri/s3v/s3v_context.c | 2 ++ src/mesa/drivers/dri/savage/savage_xmesa.c | 4 +++- src/mesa/drivers/dri/tdfx/tdfx_context.c | 2 ++ src/mesa/drivers/dri/trident/trident_context.c | 2 ++ src/mesa/drivers/dri/unichrome/via_context.c | 2 ++ 17 files changed, 32 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index 04d334f278..e4d228c575 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -179,6 +179,7 @@ driGetRendererString( char * buffer, const char * hardware_name, +#define need_GL_ARB_draw_buffers #define need_GL_ARB_multisample #define need_GL_ARB_texture_compression #define need_GL_ARB_transpose_matrix @@ -202,6 +203,7 @@ driGetRendererString( char * buffer, const char * hardware_name, #include "extension_helper.h" static const struct dri_extension all_mesa_extensions[] = { + { "GL_ARB_draw_buffers", GL_ARB_draw_buffers_functions }, { "GL_ARB_multisample", GL_ARB_multisample_functions }, { "GL_ARB_texture_compression", GL_ARB_texture_compression_functions }, { "GL_ARB_transpose_matrix", GL_ARB_transpose_matrix_functions }, diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index 679f8561d2..0cdbbd0ace 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -260,6 +260,8 @@ ffbCreateContext(const __GLcontextModes *mesaVis, ctx->Const.MaxLineWidthAA = 1.0; ctx->Const.LineWidthGranularity = 1.0; + ctx->Const.MaxDrawBuffers = 1; + /* Instead of having GCC emit these constants a zillion times * everywhere in the driver, put them here. */ diff --git a/src/mesa/drivers/dri/gamma/gamma_context.c b/src/mesa/drivers/dri/gamma/gamma_context.c index c91bedce3a..b0ac299daa 100644 --- a/src/mesa/drivers/dri/gamma/gamma_context.c +++ b/src/mesa/drivers/dri/gamma/gamma_context.c @@ -133,6 +133,8 @@ GLboolean gammaCreateContext( const __GLcontextModes *glVisual, ctx->Const.MaxPointSizeAA = 16.0; ctx->Const.PointSizeGranularity = 0.25; + ctx->Const.MaxDrawBuffers = 1; + gmesa->texHeap = mmInit( 0, gmesa->gammaScreen->textureSize ); make_empty_list(&gmesa->TexObjList); diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c index 09b1ec922f..fdce8af31f 100644 --- a/src/mesa/drivers/dri/i915/i830_context.c +++ b/src/mesa/drivers/dri/i915/i830_context.c @@ -97,6 +97,8 @@ i830CreateContext(const __GLcontextModes * mesaVis, ctx->Const.MaxTextureRectSize = (1 << 11); ctx->Const.MaxTextureUnits = I830_TEX_UNITS; + ctx->Const.MaxDrawBuffers = 1; + _tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12, 18 * sizeof(GLfloat)); 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); diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c index 549b239bd3..27d056a3b7 100644 --- a/src/mesa/drivers/dri/intel/intel_extensions.c +++ b/src/mesa/drivers/dri/intel/intel_extensions.c @@ -109,7 +109,6 @@ static const struct dri_extension card_extensions[] = { /** i965-only extensions */ static const struct dri_extension brw_extensions[] = { { "GL_ARB_depth_texture", NULL }, - { "GL_ARB_draw_buffers", NULL }, { "GL_ARB_fragment_program", NULL }, { "GL_ARB_fragment_program_shadow", NULL }, { "GL_ARB_fragment_shader", NULL }, diff --git a/src/mesa/drivers/dri/mach64/mach64_context.c b/src/mesa/drivers/dri/mach64/mach64_context.c index 4edab846b0..9c7f513c6f 100644 --- a/src/mesa/drivers/dri/mach64/mach64_context.c +++ b/src/mesa/drivers/dri/mach64/mach64_context.c @@ -190,6 +190,7 @@ GLboolean mach64CreateContext( const __GLcontextModes *glVisual, ctx->Const.MaxTextureUnits = 2; ctx->Const.MaxTextureImageUnits = 2; ctx->Const.MaxTextureCoordUnits = 2; + ctx->Const.MaxDrawBuffers = 1; heap = mach64Screen->IsPCI ? MACH64_CARD_HEAP : MACH64_AGP_HEAP; diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 41fa9b29ff..2d0f387cdc 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -531,6 +531,8 @@ mgaCreateContext( const __GLcontextModes *mesaVis, ctx->Const.MaxLineWidthAA = 10.0; ctx->Const.LineWidthGranularity = 1.0; + ctx->Const.MaxDrawBuffers = 1; + mmesa->texture_depth = driQueryOptioni (&mmesa->optionCache, "texture_depth"); if (mmesa->texture_depth == DRI_CONF_TEXTURE_DEPTH_FB) diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c index 4d6031f527..f511a67bad 100644 --- a/src/mesa/drivers/dri/r128/r128_context.c +++ b/src/mesa/drivers/dri/r128/r128_context.c @@ -223,6 +223,8 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual, ctx->Const.MaxLineWidthAA = 1.0; ctx->Const.LineWidthGranularity = 1.0; + ctx->Const.MaxDrawBuffers = 1; + #if ENABLE_PERF_BOXES rmesa->boxes = driQueryOptionb(&rmesa->optionCache, "performance_boxes"); #endif diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 47ecd4b05a..c06751516e 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -403,6 +403,8 @@ GLboolean r200CreateContext( const __GLcontextModes *glVisual, ctx->Const.VertexProgram.MaxNativeParameters = R200_VSF_MAX_PARAM; ctx->Const.VertexProgram.MaxNativeAddressRegs = 1; + ctx->Const.MaxDrawBuffers = 1; + /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index e74d29e580..4c14c7eefe 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -311,6 +311,8 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual, #endif #endif + ctx->Const.MaxDrawBuffers = 1; + /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext(ctx); diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index 38066134a9..ea81a3250b 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -353,6 +353,8 @@ radeonCreateContext( const __GLcontextModes *glVisual, rmesa->boxes = 0; + ctx->Const.MaxDrawBuffers = 1; + /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/s3v/s3v_context.c b/src/mesa/drivers/dri/s3v/s3v_context.c index 14502f95ae..0a3bf7258d 100644 --- a/src/mesa/drivers/dri/s3v/s3v_context.c +++ b/src/mesa/drivers/dri/s3v/s3v_context.c @@ -108,6 +108,8 @@ GLboolean s3vCreateContext(const __GLcontextModes *glVisual, ctx->Const.MaxLineWidthAA = 1.0; ctx->Const.LineWidthGranularity = 1.0; + ctx->Const.MaxDrawBuffers = 1; + vmesa->texHeap = mmInit( 0, vmesa->s3vScreen->textureSize ); DEBUG(("vmesa->s3vScreen->textureSize = 0x%x\n", vmesa->s3vScreen->textureSize)); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index ab21505cbd..c5decb093a 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -344,7 +344,9 @@ savageCreateContext( const __GLcontextModes *mesaVis, ctx->Const.MaxLineWidthAA = 3.0; ctx->Const.LineWidthGranularity = 1.0; #endif - + + ctx->Const.MaxDrawBuffers = 1; + /* Dri stuff */ imesa->hHWContext = driContextPriv->hHWContext; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index aeb267a64a..20046fcb3a 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -309,6 +309,8 @@ GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis, ctx->Const.MaxLineWidthAA = 1.0; ctx->Const.LineWidthGranularity = 1.0; + ctx->Const.MaxDrawBuffers = 1; + /* Initialize the software rasterizer and helper modules. */ _swrast_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/trident/trident_context.c b/src/mesa/drivers/dri/trident/trident_context.c index e134cfcf8e..aefd8a243f 100644 --- a/src/mesa/drivers/dri/trident/trident_context.c +++ b/src/mesa/drivers/dri/trident/trident_context.c @@ -128,6 +128,8 @@ tridentCreateContext( const __GLcontextModes *glVisual, ctx->Const.MaxPointSizeAA = 16.0; ctx->Const.PointSizeGranularity = 0.25; + ctx->Const.MaxDrawBuffers = 1; + #if 0 tmesa->texHeap = mmInit( 0, tmesa->tridentScreen->textureSize ); diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index cb66c2d89d..6eb19ac079 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -573,6 +573,8 @@ viaCreateContext(const __GLcontextModes *visual, ctx->Const.MaxPointSizeAA = 1.0; ctx->Const.PointSizeGranularity = 1.0; + ctx->Const.MaxDrawBuffers = 1; + ctx->Driver.GetString = viaGetString; ctx->DriverCtx = (void *)vmesa; -- cgit v1.2.3