From 510916f50961a3a9286807e7f75ba716f3e7f967 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 7 Jan 2009 14:09:07 -0800 Subject: mesa: Remove _Active and _UseTexEnvProgram flags from fragment programs. There was a note in state.c about _Active deserving to die, and there were potential issues with it due to i965 forgetting to set _UseTexEnvProgram. Removing both simplifies things. Reviewed-by: Brian Paul --- src/mesa/drivers/dri/intel/intel_pixel_draw.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c index 0d66935ad2..2af839b803 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c @@ -386,27 +386,6 @@ intelDrawPixels(GLcontext * ctx, if (INTEL_DEBUG & DEBUG_PIXEL) _mesa_printf("%s: fallback to swrast\n", __FUNCTION__); - if (ctx->FragmentProgram._Current == ctx->FragmentProgram._TexEnvProgram) { - /* - * We don't want the i915 texenv program to be applied to DrawPixels. - * This is really just a performance optimization (mesa will other- - * wise happily run the fragment program on each pixel in the image). - */ - struct gl_fragment_program *fpSave = ctx->FragmentProgram._Current; - /* can't just set current frag prog to 0 here as on buffer resize - we'll get new state checks which will segfault. Remains a hack. */ - ctx->FragmentProgram._Current = NULL; - ctx->FragmentProgram._UseTexEnvProgram = GL_FALSE; - ctx->FragmentProgram._Active = GL_FALSE; - _swrast_DrawPixels( ctx, x, y, width, height, format, type, - unpack, pixels ); - ctx->FragmentProgram._Current = fpSave; - ctx->FragmentProgram._UseTexEnvProgram = GL_TRUE; - ctx->FragmentProgram._Active = GL_TRUE; - _swrast_InvalidateState(ctx, _NEW_PROGRAM); - } - else { - _swrast_DrawPixels( ctx, x, y, width, height, format, type, - unpack, pixels ); - } + _swrast_DrawPixels(ctx, x, y, width, height, format, type, + unpack, pixels); } -- cgit v1.2.3 From 2fd9c2ebd6a7bd96af667ec7a97dae44ef51f7a3 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 28 Jan 2009 16:55:16 -0700 Subject: intel: save/restore GL matrix mode in intel_meta_set_passthrough_transform(), intel_meta_restore_transform() (cherry picked from master, commit 723648f2ee2a8e529063c9da84e9dff9c8c6be99) --- src/mesa/drivers/dri/intel/intel_context.h | 1 + src/mesa/drivers/dri/intel/intel_pixel.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 048286c196..348da347dd 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -168,6 +168,7 @@ struct intel_context GLint saved_vp_x, saved_vp_y; GLsizei saved_vp_width, saved_vp_height; + GLenum saved_matrix_mode; } meta; GLint refcount; diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c index cf2f32d384..5e32288844 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel.c +++ b/src/mesa/drivers/dri/intel/intel_pixel.c @@ -181,6 +181,7 @@ intel_meta_set_passthrough_transform(struct intel_context *intel) intel->meta.saved_vp_y = ctx->Viewport.Y; intel->meta.saved_vp_width = ctx->Viewport.Width; intel->meta.saved_vp_height = ctx->Viewport.Height; + intel->meta.saved_matrix_mode = ctx->Transform.MatrixMode; _mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height); @@ -202,6 +203,8 @@ intel_meta_restore_transform(struct intel_context *intel) _mesa_MatrixMode(GL_MODELVIEW); _mesa_PopMatrix(); + _mesa_MatrixMode(intel->meta.saved_matrix_mode); + _mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y, intel->meta.saved_vp_width, intel->meta.saved_vp_height); } -- cgit v1.2.3 From 999fe905c91515065b8774514fdec901967c6977 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 28 Jan 2009 17:00:23 -0700 Subject: intel: check if stencil test is enabled in intel_stencil_drawpixels() (cherry picked from master/commit 72ee0e247d799c85612c72bbd2257648e11fa583) --- src/mesa/drivers/dri/intel/intel_pixel_draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c index 0e83afa645..bb36649dac 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c @@ -92,7 +92,7 @@ intel_texture_drawpixels(GLcontext * ctx, return GL_FALSE; } - /* We don't have a way to generate fragments with stencil values which * + /* We don't have a way to generate fragments with stencil values which * will set the resulting stencil value. */ if (format == GL_STENCIL_INDEX) @@ -225,6 +225,10 @@ intel_stencil_drawpixels(GLcontext * ctx, return GL_FALSE; } + /* We don't support stencil testing/ops here */ + if (ctx->Stencil.Enabled) + return GL_FALSE; + /* We use FBOs for our wrapping of the depthbuffer into a color * destination. */ -- cgit v1.2.3 From e13593678f62941db06b7ae1a21b81c643371659 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 9 Feb 2009 11:16:20 -0700 Subject: re-add MSAA support (cherry picked from commit f7d80aa00611917bc8ce637136d982b151b8f44f) This also involved adding the new MSAA fields to driCreateConfigs(). Also, re-add prog_instructions->Sampler field for i965 driver. Will have to revisit that. --- configs/linux-dri | 13 +++------- src/mesa/drivers/dri/ffb/ffb_xmesa.c | 6 +++-- src/mesa/drivers/dri/i810/i810screen.c | 4 ++- src/mesa/drivers/dri/intel/intel_screen.c | 11 +++++--- src/mesa/drivers/dri/mach64/mach64_screen.c | 4 ++- src/mesa/drivers/dri/mga/mga_xmesa.c | 4 ++- src/mesa/drivers/dri/r128/r128_screen.c | 39 +++++++++++++++-------------- src/mesa/drivers/dri/radeon/radeon_screen.c | 5 ++-- src/mesa/drivers/dri/savage/savage_xmesa.c | 5 ++-- src/mesa/drivers/dri/sis/sis_screen.c | 4 ++- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 4 ++- src/mesa/drivers/dri/unichrome/via_screen.c | 4 ++- src/mesa/shader/prog_instruction.h | 2 +- 13 files changed, 60 insertions(+), 45 deletions(-) (limited to 'src/mesa/drivers/dri/intel') diff --git a/configs/linux-dri b/configs/linux-dri index c667a386f3..dc2ab4f9d9 100644 --- a/configs/linux-dri +++ b/configs/linux-dri @@ -57,16 +57,9 @@ PROGRAM_DIRS := egl $(PROGRAM_DIRS) # EGL directories EGL_DRIVERS_DIRS = demo glx -DRIVER_DIRS = +DRIVER_DIRS = dri WINDOW_SYSTEM = dri GALLIUM_WINSYS_DIRS = drm -# gamma are missing because they have not been converted to use the new -# interface. - -# XXX: need to figure out a way for gallium and non-gallium builds to -# coexist: -# - -#DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ -# savage sis tdfx trident unichrome ffb +DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \ + savage sis tdfx trident unichrome ffb diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index 0cdbbd0ace..eb086e3055 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -628,6 +628,7 @@ ffbFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[3]; uint8_t stencil_bits_array[3]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; depth_bits_array[1] = depth_bits; @@ -656,9 +657,10 @@ ffbFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, + fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); return NULL; } diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 48603f5d79..6d7cf1f38b 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -77,6 +77,7 @@ i810FillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -94,7 +95,8 @@ i810FillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(GL_RGB, GL_UNSIGNED_SHORT_5_6_5, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); 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 e17f18a98f..f29e0e966b 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -478,6 +478,7 @@ intelFillInModes(__DRIscreenPrivate *psp, uint8_t depth_bits_array[3]; uint8_t stencil_bits_array[3]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; depth_bits_array[1] = depth_bits; @@ -509,7 +510,9 @@ intelFillInModes(__DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); + if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); @@ -679,7 +682,7 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) static const GLenum back_buffer_modes[] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML }; - uint8_t depth_bits[4], stencil_bits[4]; + uint8_t depth_bits[4], stencil_bits[4], msaa_samples_array[1]; int color; const __DRIconfig **configs = NULL; @@ -748,7 +751,9 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) stencil_bits, ARRAY_SIZE(depth_bits), back_buffer_modes, - ARRAY_SIZE(back_buffer_modes)); + ARRAY_SIZE(back_buffer_modes), + msaa_samples_array, ARRAY_SIZE(msaa_samples_array)); + 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 6bfb4c32b1..59a3573898 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -93,6 +93,7 @@ mach64FillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -119,7 +120,8 @@ mach64FillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); 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 2d0f387cdc..98185a6c9e 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -129,6 +129,7 @@ mgaFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[3]; uint8_t stencil_bits_array[3]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; @@ -158,7 +159,8 @@ mgaFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index cb3a147dba..e72ca45be9 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -422,7 +422,7 @@ r128FillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; - + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -446,26 +446,27 @@ r128FillInModes( __DRIscreenPrivate *psp, fb_type = GL_UNSIGNED_INT_8_8_8_8_REV; } - configs = driCreateConfigs(fb_format, fb_type, - depth_bits_array, stencil_bits_array, - depth_buffer_factor, back_buffer_modes, - back_buffer_factor); - if (configs == NULL) { - fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, - __LINE__); - return NULL; - } + 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); + if (configs == NULL) { + fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, + __LINE__); + return NULL; + } - /* Mark the visual as slow if there are "fake" stencil bits. - */ - for (i = 0; configs[i]; i++) { - m = &configs[i]->modes; - if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) { - m->visualRating = GLX_SLOW_CONFIG; - } - } + /* Mark the visual as slow if there are "fake" stencil bits. + */ + for (i = 0; configs[i]; i++) { + m = &configs[i]->modes; + if ((m->stencilBits != 0) && (m->stencilBits != stencil_bits)) { + m->visualRating = GLX_SLOW_CONFIG; + } + } - return (const __DRIconfig **) configs; + return (const __DRIconfig **) configs; } diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index f5665c4af1..b52a084777 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -276,7 +276,7 @@ radeonFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; - + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -303,7 +303,8 @@ radeonFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index c5decb093a..ba4008e644 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -910,7 +910,7 @@ savageFillInModes( __DRIscreenPrivate *psp, uint8_t depth_bits_array[2]; uint8_t stencil_bits_array[2]; - + uint8_t msaa_samples_array[1]; depth_bits_array[0] = depth_bits; depth_bits_array[1] = depth_bits; @@ -937,7 +937,8 @@ savageFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); 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 b1a5d15236..e31b5223f7 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -77,6 +77,7 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) }; uint8_t depth_bits_array[4]; uint8_t stencil_bits_array[4]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; stencil_bits_array[0] = 0; @@ -100,7 +101,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, - back_buffer_modes, back_buffer_factor); + back_buffer_modes, back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); return NULL; diff --git a/src/mesa/drivers/dri/tdfx/tdfx_screen.c b/src/mesa/drivers/dri/tdfx/tdfx_screen.c index cd22b84951..90a4a2c3c0 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -361,6 +361,7 @@ tdfxFillInModes(__DRIscreenPrivate *psp, static const GLenum db_modes[2] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML }; uint8_t depth_bits_array[4]; uint8_t stencil_bits_array[4]; + uint8_t msaa_samples_array[1]; if(deep) { depth_bits_array[0] = 0; depth_bits_array[1] = 24; @@ -383,7 +384,8 @@ tdfxFillInModes(__DRIscreenPrivate *psp, depth_bits_array, stencil_bits_array, deep ? 2 : 4, - db_modes, 2); + db_modes, 2, + msaa_samples_array, 1); } /** diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 988f9935ac..c25b87b4a4 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -342,6 +342,7 @@ viaFillInModes( __DRIscreenPrivate *psp, */ static const uint8_t depth_bits_array[4] = { 0, 16, 24, 32 }; static const uint8_t stencil_bits_array[4] = { 0, 0, 8, 0 }; + uint8_t msaa_samples_array[1]; const unsigned depth_buffer_factor = 3; if ( pixel_bits == 16 ) { @@ -356,7 +357,8 @@ viaFillInModes( __DRIscreenPrivate *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, + msaa_samples_array, 1); if (configs == NULL) { fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__); diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h index f978334ab2..c649b3db5e 100644 --- a/src/mesa/shader/prog_instruction.h +++ b/src/mesa/shader/prog_instruction.h @@ -418,7 +418,7 @@ struct prog_instruction */ GLint BranchTarget; -#if 0 +#if 01 /* XXX just use this for i965 driver for now! */ /** * For TEX instructions in shaders, the sampler to use for the * texture lookup. -- cgit v1.2.3 From eaf15db895e3a5c6c5ccc2f23a4f0fa522855868 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 10 Feb 2009 13:47:49 +0100 Subject: gallium: Fixups for driCreateConfigs MSAA support. Add the MSAA samples array or make sure its contents are initialized. --- 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 | 4 ++++ src/mesa/drivers/dri/mach64/mach64_screen.c | 2 ++ src/mesa/drivers/dri/mga/mga_xmesa.c | 2 ++ src/mesa/drivers/dri/r128/r128_screen.c | 2 ++ src/mesa/drivers/dri/radeon/radeon_screen.c | 4 +++- 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 | 5 ++++- src/mesa/drivers/dri/tdfx/tdfx_screen.c | 2 ++ src/mesa/drivers/dri/unichrome/via_screen.c | 2 +- 12 files changed, 28 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/intel') diff --git a/src/mesa/drivers/dri/ffb/ffb_xmesa.c b/src/mesa/drivers/dri/ffb/ffb_xmesa.c index eb086e3055..00bdcec7a6 100644 --- a/src/mesa/drivers/dri/ffb/ffb_xmesa.c +++ b/src/mesa/drivers/dri/ffb/ffb_xmesa.c @@ -642,6 +642,8 @@ ffbFillInModes( __DRIscreenPrivate *psp, stencil_bits_array[1] = 0; stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; back_buffer_factor = (have_back_buffer) ? 3 : 1; diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 6d7cf1f38b..9a5a39c1db 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -89,6 +89,8 @@ i810FillInModes( __DRIscreenPrivate *psp, stencil_bits_array[0] = 0; stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index f29e0e966b..4c06170cdf 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -495,6 +495,8 @@ intelFillInModes(__DRIscreenPrivate *psp, stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; back_buffer_factor = (have_back_buffer) ? 3 : 1; @@ -733,6 +735,8 @@ __DRIconfig **intelInitScreen2(__DRIscreenPrivate *psp) depth_bits[3] = 24; stencil_bits[3] = 8; + msaa_samples_array[0] = 0; + fb_format[0] = GL_RGB; fb_type[0] = GL_UNSIGNED_SHORT_5_6_5; diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c index 59a3573898..43e59594dd 100644 --- a/src/mesa/drivers/dri/mach64/mach64_screen.c +++ b/src/mesa/drivers/dri/mach64/mach64_screen.c @@ -105,6 +105,8 @@ mach64FillInModes( __DRIscreenPrivate *psp, stencil_bits_array[0] = 0; stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; diff --git a/src/mesa/drivers/dri/mga/mga_xmesa.c b/src/mesa/drivers/dri/mga/mga_xmesa.c index 98185a6c9e..926534d6df 100644 --- a/src/mesa/drivers/dri/mga/mga_xmesa.c +++ b/src/mesa/drivers/dri/mga/mga_xmesa.c @@ -144,6 +144,8 @@ mgaFillInModes( __DRIscreenPrivate *psp, stencil_bits_array[1] = 0; stencil_bits_array[2] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 3 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; diff --git a/src/mesa/drivers/dri/r128/r128_screen.c b/src/mesa/drivers/dri/r128/r128_screen.c index e72ca45be9..7cda4ca5d3 100644 --- a/src/mesa/drivers/dri/r128/r128_screen.c +++ b/src/mesa/drivers/dri/r128/r128_screen.c @@ -434,6 +434,8 @@ r128FillInModes( __DRIscreenPrivate *psp, stencil_bits_array[0] = 0; stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index b52a084777..56c22faafa 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -288,6 +288,8 @@ radeonFillInModes( __DRIscreenPrivate *psp, stencil_bits_array[0] = 0; stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; @@ -304,7 +306,7 @@ radeonFillInModes( __DRIscreenPrivate *psp, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, back_buffer_factor, - msaa_samples_array, 1); + msaa_samples_array, 1); if (configs == NULL) { fprintf( stderr, "[%s:%u] Error creating FBConfig!\n", __func__, __LINE__ ); diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index ba4008e644..326d595352 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -922,6 +922,8 @@ savageFillInModes( __DRIscreenPrivate *psp, stencil_bits_array[0] = 0; stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; back_buffer_factor = (have_back_buffer) ? 2 : 1; diff --git a/src/mesa/drivers/dri/sis/sis_screen.c b/src/mesa/drivers/dri/sis/sis_screen.c index e31b5223f7..9eb27fef08 100644 --- a/src/mesa/drivers/dri/sis/sis_screen.c +++ b/src/mesa/drivers/dri/sis/sis_screen.c @@ -88,6 +88,8 @@ sisFillInModes(__DRIscreenPrivate *psp, int bpp) depth_bits_array[3] = 32; stencil_bits_array[3] = 0; + msaa_samples_array[0] = 0; + depth_buffer_factor = 4; back_buffer_factor = 2; diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index a90b30b49d..b00f4ff2fe 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -147,6 +147,7 @@ swrastFillInModes(__DRIscreen *psp, uint8_t depth_bits_array[4]; uint8_t stencil_bits_array[4]; + uint8_t msaa_samples_array[1]; depth_bits_array[0] = 0; depth_bits_array[1] = 0; @@ -161,6 +162,8 @@ swrastFillInModes(__DRIscreen *psp, stencil_bits_array[2] = 0; stencil_bits_array[3] = (stencil_bits == 0) ? 8 : stencil_bits; + msaa_samples_array[0] = 0; + depth_buffer_factor = 4; back_buffer_factor = 2; @@ -190,7 +193,7 @@ swrastFillInModes(__DRIscreen *psp, configs = driCreateConfigs(fb_format, fb_type, depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, - back_buffer_factor); + back_buffer_factor, msaa_samples_array, 1); 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 90a4a2c3c0..6d509a4d88 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_screen.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_screen.c @@ -378,6 +378,8 @@ tdfxFillInModes(__DRIscreenPrivate *psp, stencil_bits_array[3] = 8; } + msaa_samples_array[0] = 0; + return driCreateConfigs( deep ? GL_RGBA : GL_RGB, deep ? GL_UNSIGNED_INT_8_8_8_8 : GL_UNSIGNED_SHORT_5_6_5, diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index c25b87b4a4..e9f566161c 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -342,7 +342,7 @@ viaFillInModes( __DRIscreenPrivate *psp, */ static const uint8_t depth_bits_array[4] = { 0, 16, 24, 32 }; static const uint8_t stencil_bits_array[4] = { 0, 0, 8, 0 }; - uint8_t msaa_samples_array[1]; + uint8_t msaa_samples_array[1] = { 0 }; const unsigned depth_buffer_factor = 3; if ( pixel_bits == 16 ) { -- cgit v1.2.3