diff options
author | Ian Romanick <idr@freedesktop.org> | 2009-01-27 19:10:43 -0800 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2009-01-28 16:28:11 -0800 |
commit | 8aa209c766b79144db499063dd1c8482562b07bf (patch) | |
tree | 7dad57db6aca007ebb389149dcfdc93f60a6af45 /src/mesa/drivers | |
parent | 474cda6fa912a766821d20b5b21d6eeba6ea9225 (diff) |
Make GL_ARB_draw_buffers mandatory
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/drivers')
23 files changed, 40 insertions, 2 deletions
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; diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index e93ada2893..338cd37382 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1773,6 +1773,8 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa) ctx->Const.MaxTextureImageUnits = fxMesa->haveTwoTMUs ? 2 : 1; ctx->Const.MaxTextureUnits = MAX2(ctx->Const.MaxTextureImageUnits, ctx->Const.MaxTextureCoordUnits); + ctx->Const.MaxDrawBuffers = 1; + fxMesa->new_state = _NEW_ALL; if (!fxMesa->haveHwStencil) { /* don't touch stencil if there is none */ diff --git a/src/mesa/drivers/windows/gldirect/dglcontext.c b/src/mesa/drivers/windows/gldirect/dglcontext.c index 4ad7a76e67..e9c23d1ccb 100644 --- a/src/mesa/drivers/windows/gldirect/dglcontext.c +++ b/src/mesa/drivers/windows/gldirect/dglcontext.c @@ -1482,6 +1482,7 @@ SkipPrimaryCreate: #else lpCtx->glCtx->Const.MaxTextureSize = 1024; #endif + lpCtx->glCtx->Const.MaxDrawBuffers = 1; // Setup the Display Driver pointers dglSetupDDPointers(lpCtx->glCtx); diff --git a/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c b/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c index 0f8fe33eb1..fa44a952a0 100644 --- a/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c +++ b/src/mesa/drivers/windows/gldirect/dx7/gld_wgl_dx7.c @@ -1422,6 +1422,8 @@ BOOL gldInitialiseMesa_DX( lpCtx->glCtx->Const.MaxTextureUnits = 1; } + lpCtx->glCtx->Const.MaxDrawBuffers = 1; + // max texture size // MaxTextureSize = min(gld->d3dCaps8.MaxTextureHeight, gld->d3dCaps8.MaxTextureWidth); MaxTextureSize = min(gld->d3dCaps.dwMaxTextureHeight, gld->d3dCaps.dwMaxTextureWidth); diff --git a/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c b/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c index 690f68b68f..011d810e97 100644 --- a/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c +++ b/src/mesa/drivers/windows/gldirect/dx8/gld_wgl_dx8.c @@ -1204,6 +1204,7 @@ BOOL gldInitialiseMesa_DX( MaxTextureSize >>= 1; } lpCtx->glCtx->Const.MaxTextureLevels = (TextureLevels) ? TextureLevels : 8; + lpCtx->glCtx->Const.MaxDrawBuffers = 1; IDirect3DDevice8_SetRenderState(gld->pDev, D3DRS_LIGHTING, FALSE); IDirect3DDevice8_SetRenderState(gld->pDev, D3DRS_CULLMODE, D3DCULL_NONE); diff --git a/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c b/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c index dc465c5418..a03b865bb4 100644 --- a/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c +++ b/src/mesa/drivers/windows/gldirect/dx9/gld_wgl_dx9.c @@ -1206,6 +1206,7 @@ BOOL gldInitialiseMesa_DX( MaxTextureSize >>= 1; } lpCtx->glCtx->Const.MaxTextureLevels = (TextureLevels) ? TextureLevels : 8; + lpCtx->glCtx->Const.MaxDrawBuffers = 1; IDirect3DDevice9_SetRenderState(gld->pDev, D3DRS_LIGHTING, FALSE); IDirect3DDevice9_SetRenderState(gld->pDev, D3DRS_CULLMODE, D3DCULL_NONE); diff --git a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c index b590dc795a..342a742867 100644 --- a/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c +++ b/src/mesa/drivers/windows/gldirect/mesasw/gld_wgl_mesasw.c @@ -1625,6 +1625,7 @@ BOOL gldInitialiseMesa_MesaSW( // Added this to force max texture diminsion to 256. KeithH ctx->Const.MaxTextureLevels = 8; + ctx->Const.MaxDrawBuffers = 1; _mesa_enable_sw_extensions(ctx); _mesa_enable_imaging_extensions(ctx); |