>From what I understand from my research, accumulation buffers are typically specific to fixed-function chipsets, right? So not all of these drivers will prefer to expose the accumbuf visuals, and those that do probably don't want to advertise them as CAVEAT_SLOW. Also, Gallium's dri state tracker needs to be changed to respect this when calling driCreateConfigs.
Otherwise this looks fine. ~ C. On Mon, Feb 8, 2010 at 5:09 PM, Ian Romanick <i...@freedesktop.org> wrote: > From: Ian Romanick <ian.d.roman...@intel.com> > > Modify the interface to driCreateConfigs allowing drivers to not > expose configs with an accumuation buffer. All of the drivers calling > function have been updated to pass true for the accumulation > selector. This maintains the current behavior. > --- > src/mesa/drivers/dri/common/utils.c | 5 +++-- > src/mesa/drivers/dri/common/utils.h | 3 ++- > src/mesa/drivers/dri/ffb/ffb_xmesa.c | 2 +- > src/mesa/drivers/dri/i810/i810screen.c | 2 +- > src/mesa/drivers/dri/intel/intel_screen.c | 3 ++- > src/mesa/drivers/dri/mach64/mach64_screen.c | 2 +- > src/mesa/drivers/dri/mga/mga_xmesa.c | 2 +- > src/mesa/drivers/dri/nouveau/nouveau_screen.c | 3 ++- > src/mesa/drivers/dri/r128/r128_screen.c | 2 +- > src/mesa/drivers/dri/radeon/radeon_screen.c | 9 +++++---- > src/mesa/drivers/dri/savage/savage_xmesa.c | 2 +- > src/mesa/drivers/dri/sis/sis_screen.c | 2 +- > src/mesa/drivers/dri/swrast/swrast.c | 3 ++- > src/mesa/drivers/dri/tdfx/tdfx_screen.c | 3 ++- > src/mesa/drivers/dri/unichrome/via_screen.c | 2 +- > 15 files changed, 26 insertions(+), 19 deletions(-) > > diff --git a/src/mesa/drivers/dri/common/utils.c > b/src/mesa/drivers/dri/common/utils.c > index 81d026a..833f9ad 100644 > --- a/src/mesa/drivers/dri/common/utils.c > +++ b/src/mesa/drivers/dri/common/utils.c > @@ -424,7 +424,8 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, > const uint8_t * depth_bits, const uint8_t * stencil_bits, > unsigned num_depth_stencil_bits, > const GLenum * db_modes, unsigned num_db_modes, > - const uint8_t * msaa_samples, unsigned num_msaa_modes) > + const uint8_t * msaa_samples, unsigned num_msaa_modes, > + GLboolean enable_accum) > { > static const uint8_t bits_table[4][4] = { > /* R G B A */ > @@ -486,7 +487,7 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, > __GLcontextModes *modes; > unsigned i, j, k, h; > unsigned num_modes; > - unsigned num_accum_bits = 2; > + unsigned num_accum_bits = (enable_accum) ? 2 : 1; > > switch ( fb_type ) { > case GL_UNSIGNED_BYTE_3_3_2: > diff --git a/src/mesa/drivers/dri/common/utils.h > b/src/mesa/drivers/dri/common/utils.h > index 2aa6de6..02ca3fe 100644 > --- a/src/mesa/drivers/dri/common/utils.h > +++ b/src/mesa/drivers/dri/common/utils.h > @@ -104,7 +104,8 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type, > const uint8_t * depth_bits, const uint8_t * stencil_bits, > unsigned num_depth_stencil_bits, > const GLenum * db_modes, unsigned num_db_modes, > - const uint8_t * msaa_samples, unsigned num_msaa_modes); > + const uint8_t * msaa_samples, unsigned num_msaa_modes, > + GLboolean enable_accum); > > __DRIconfig **driConcatConfigs(__DRIconfig **a, > __DRIconfig **b); > diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c > b/src/mesa/drivers/dri/ffb/ffb_xmesa.c > index 6a84651..7fdf883 100644 > --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c > +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c > @@ -658,7 +658,7 @@ ffbFillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, back_buffer_modes, > back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, > __LINE__); > diff --git a/src/mesa/drivers/dri/i810/i810screen.c > b/src/mesa/drivers/dri/i810/i810screen.c > index 476c801..825a1b5 100644 > --- a/src/mesa/drivers/dri/i810/i810screen.c > +++ b/src/mesa/drivers/dri/i810/i810screen.c > @@ -92,7 +92,7 @@ i810FillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, > back_buffer_modes, back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", > __func__, __LINE__ ); > diff --git a/src/mesa/drivers/dri/intel/intel_screen.c > b/src/mesa/drivers/dri/intel/intel_screen.c > index b308ae1..8344b82 100644 > --- a/src/mesa/drivers/dri/intel/intel_screen.c > +++ b/src/mesa/drivers/dri/intel/intel_screen.c > @@ -413,7 +413,8 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp) > back_buffer_modes, > ARRAY_SIZE(back_buffer_modes), > msaa_samples_array, > - ARRAY_SIZE(msaa_samples_array)); > + ARRAY_SIZE(msaa_samples_array), > + GL_TRUE); > if (configs == NULL) > configs = new_configs; > else > diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c > b/src/mesa/drivers/dri/mach64/mach64_screen.c > index 5cbfb85..99aad57 100644 > --- a/src/mesa/drivers/dri/mach64/mach64_screen.c > +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c > @@ -119,7 +119,7 @@ mach64FillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, back_buffer_modes, > back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", > __func__, __LINE__); > diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c > b/src/mesa/drivers/dri/mga/mga_xmesa.c > index e7813b6..a0a65cb 100644 > --- a/src/mesa/drivers/dri/mga/mga_xmesa.c > +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c > @@ -160,7 +160,7 @@ mgaFillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, > back_buffer_modes, back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", > __func__, __LINE__ ); > diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c > b/src/mesa/drivers/dri/nouveau/nouveau_screen.c > index de63282..6abab8c 100644 > --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c > +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c > @@ -83,7 +83,8 @@ nouveau_get_configs(void) > back_buffer_modes, > Elements(back_buffer_modes), > msaa_samples, > - Elements(msaa_samples)); > + Elements(msaa_samples), > + GL_TRUE); > assert(config); > > configs = configs ? driConcatConfigs(configs, config) > diff --git a/src/mesa/drivers/dri/r128/r128_screen.c > b/src/mesa/drivers/dri/r128/r128_screen.c > index ef6b5a3..afc44d4 100644 > --- a/src/mesa/drivers/dri/r128/r128_screen.c > +++ b/src/mesa/drivers/dri/r128/r128_screen.c > @@ -449,7 +449,7 @@ r128FillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, back_buffer_modes, > back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, > __LINE__); > diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c > b/src/mesa/drivers/dri/radeon/radeon_screen.c > index 93b6399..7d5cdb5 100644 > --- a/src/mesa/drivers/dri/radeon/radeon_screen.c > +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c > @@ -293,18 +293,18 @@ radeonFillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, > back_buffer_modes, > back_buffer_factor, > msaa_samples_array, > - 1); > + 1, TRUE); > configs_a8r8g8b8 = driCreateConfigs(GL_BGRA, > GL_UNSIGNED_INT_8_8_8_8_REV, > depth_bits_array, > stencil_bits_array, > 1, back_buffer_modes, 1, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > configs = driConcatConfigs(configs_r5g6b5, configs_a8r8g8b8); > } else > configs = driCreateConfigs(GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, > back_buffer_modes, back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > > if (configs == NULL) { > fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", > @@ -1676,7 +1676,8 @@ __DRIconfig **radeonInitScreen2(__DRIscreen *psp) > back_buffer_modes, > ARRAY_SIZE(back_buffer_modes), > msaa_samples_array, > - ARRAY_SIZE(msaa_samples_array)); > + ARRAY_SIZE(msaa_samples_array), > + GL_TRUE); > if (configs == NULL) > configs = new_configs; > else > diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c > b/src/mesa/drivers/dri/savage/savage_xmesa.c > index 8e879ca..788c49f 100644 > --- a/src/mesa/drivers/dri/savage/savage_xmesa.c > +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c > @@ -939,7 +939,7 @@ savageFillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, > back_buffer_modes, back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", > __func__, __LINE__ ); > diff --git a/src/mesa/drivers/dri/sis/sis_screen.c > b/src/mesa/drivers/dri/sis/sis_screen.c > index cb7ed8a..0b98541 100644 > --- a/src/mesa/drivers/dri/sis/sis_screen.c > +++ b/src/mesa/drivers/dri/sis/sis_screen.c > @@ -103,7 +103,7 @@ sisFillInModes(__DRIscreen *psp, int bpp) > configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, > stencil_bits_array, depth_buffer_factor, > back_buffer_modes, back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, > __LINE__); > return NULL; > diff --git a/src/mesa/drivers/dri/swrast/swrast.c > b/src/mesa/drivers/dri/swrast/swrast.c > index 4e82366..40535b0 100644 > --- a/src/mesa/drivers/dri/swrast/swrast.c > +++ b/src/mesa/drivers/dri/swrast/swrast.c > @@ -132,7 +132,8 @@ swrastFillInModes(__DRIscreen *psp, > configs = driCreateConfigs(fb_format, fb_type, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, back_buffer_modes, > - back_buffer_factor, msaa_samples_array, 1); > + back_buffer_factor, msaa_samples_array, 1, > + GL_TRUE); > if (configs == NULL) { > fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, > __LINE__); > diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c > b/src/mesa/drivers/dri/tdfx/tdfx_screen.c > index 9f6b35f..d554bcd 100644 > --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c > +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c > @@ -383,7 +383,8 @@ tdfxFillInModes(__DRIscreen *psp, > stencil_bits_array, > deep ? 2 : 4, > db_modes, 2, > - msaa_samples_array, 1); > + msaa_samples_array, 1, > + GL_TRUE); > } > > /** > diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c > b/src/mesa/drivers/dri/unichrome/via_screen.c > index 8c91c93..5512501 100644 > --- a/src/mesa/drivers/dri/unichrome/via_screen.c > +++ b/src/mesa/drivers/dri/unichrome/via_screen.c > @@ -354,7 +354,7 @@ viaFillInModes( __DRIscreen *psp, > depth_bits_array, stencil_bits_array, > depth_buffer_factor, back_buffer_modes, > back_buffer_factor, > - msaa_samples_array, 1); > + msaa_samples_array, 1, TRUE); > if (configs == NULL) { > fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, > __LINE__); > -- > 1.6.6 > > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > Mesa3d-dev mailing list > Mesa3d-dev@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mesa3d-dev > -- Only fools are easily impressed by what is only barely beyond their reach. ~ Unknown Corbin Simpson <mostawesomed...@gmail.com> ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev