On 07/23/2012 01:45 PM, Ian Romanick wrote: > On 07/21/2012 05:36 PM, Chad Versace wrote: >> This turns on window system multisampling. >> >> No Piglit regressions on Ivybridge. >> >> Tested with `glxgears -samples 1`. >> >> Passes 53/70 of oglconform's winsys multisample tests. The failing tests >> mostly consist of those that call glDrawPixels on the depth and stencil >> buffer (which fail due to a swrast fallback) or do fancy things with the >> msaa alpha enums. >> >> CC: Eric Anholt <e...@anholt.net> >> CC: Ian Romanick <i...@freedesktop.org> >> Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> >> --- >> src/mesa/drivers/dri/intel/intel_screen.c | 44 >> +++++++++++++++++++++++++++++-- >> 1 file changed, 42 insertions(+), 2 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c >> b/src/mesa/drivers/dri/intel/intel_screen.c >> index 61daea7..420901e 100644 >> --- a/src/mesa/drivers/dri/intel/intel_screen.c >> +++ b/src/mesa/drivers/dri/intel/intel_screen.c >> @@ -866,14 +866,54 @@ intel_screen_make_configs(__DRIscreen *dri_screen) >> GLX_SWAP_UNDEFINED_OML, GLX_NONE, GLX_SWAP_COPY_OML, >> }; >> >> - static const uint8_t msaa_samples[] = {0}; >> + static const uint8_t msaa_samples[] = {0, 4}; >> + >> + struct intel_screen *screen = dri_screen->driverPrivate; >> + >> + int num_msaa_modes; >> + if (screen->gen >= 6) >> + num_msaa_modes = 2; >> + else >> + num_msaa_modes = 1; >> >> /* Starting with DRI2 protocol version 1.1 we can request a >> depth/stencil >> * buffer that has a different number of bits per pixel than the color >> * buffer. This isn't yet supported here. >> */ >> struct config_params params[] = { >> - /* Configs without accumulation buffer. */ >> + /* Multisample configs. */ > > The new configs should go at the end. This is to maintain the numbering that > I > mentioned in the previous patch.
Will do in the final patch. Interestingly, listing the multisample configs before the singlesample configs exposes a nasty bug under Gnome Shell. Paul and I are investigating. > It occurs to me that there is some advantage in advertising 24/0 formats on > GPUs > that require the use of separate stencil. On these GPUs we allocate a giant > (32-bits per pixel!) stencil buffer that the application is never going to > use. > > Of course, adding these in a sensible way will ruin the config numbering. > Alas. Good idea. We can do that in a follow-up patch. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev