diff options
author | Luc Verhaegen <libv@skynet.be> | 2010-03-04 14:49:33 +0100 |
---|---|---|
committer | Luc Verhaegen <libv@skynet.be> | 2010-03-09 07:36:41 +0100 |
commit | f065640e154291ce735262245bfdc7a66f57f7fa (patch) | |
tree | 9c1592891845ebede4313826c77782b90df99178 /src | |
parent | fadde9dbbefd56f869398f2c5cfeb8cc48c072fe (diff) |
Diffstat (limited to 'src')
-rw-r--r-- | src/mach64_context.c | 7 | ||||
-rw-r--r-- | src/mach64_screen.c | 8 | ||||
-rw-r--r-- | src/mach64_tex.c | 12 | ||||
-rw-r--r-- | src/mach64_tris.c | 3 |
4 files changed, 18 insertions, 12 deletions
diff --git a/src/mach64_context.c b/src/mach64_context.c index 99abd20..9c7f513 100644 --- a/src/mach64_context.c +++ b/src/mach64_context.c @@ -57,10 +57,6 @@ #include "utils.h" #include "vblank.h" -#define need_GL_ARB_multisample -#define need_GL_ARB_vertex_buffer_object -#include "extension_helper.h" - #ifndef MACH64_DEBUG int MACH64_DEBUG = (0); #endif @@ -82,9 +78,7 @@ static const struct dri_debug_control debug_control[] = const struct dri_extension card_extensions[] = { - { "GL_ARB_multisample", GL_ARB_multisample_functions }, { "GL_ARB_multitexture", NULL }, - { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions }, { "GL_EXT_texture_edge_clamp", NULL }, { "GL_MESA_ycbcr_texture", NULL }, { "GL_SGIS_generate_mipmap", NULL }, @@ -196,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/mach64_screen.c b/src/mach64_screen.c index 6bfb4c3..6440027 100644 --- a/src/mach64_screen.c +++ b/src/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; @@ -104,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; @@ -119,7 +122,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__); @@ -370,7 +374,7 @@ mach64CreateBuffer( __DRIscreenPrivate *driScrnPriv, static void mach64DestroyBuffer(__DRIdrawablePrivate *driDrawPriv) { - _mesa_unreference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate))); + _mesa_reference_framebuffer((GLframebuffer **)(&(driDrawPriv->driverPrivate)), NULL); } diff --git a/src/mach64_tex.c b/src/mach64_tex.c index 1f9d3c5..225d231 100644 --- a/src/mach64_tex.c +++ b/src/mach64_tex.c @@ -99,7 +99,7 @@ static void mach64SetTexFilter( mach64TexObjPtr t, } } -static void mach64SetTexBorderColor( mach64TexObjPtr t, GLubyte c[4] ) +static void mach64SetTexBorderColor( mach64TexObjPtr t, const GLfloat c[4] ) { #if 0 GLuint border = mach64PackColor( 4, c[0], c[1], c[2], c[3] ); @@ -131,7 +131,7 @@ mach64AllocTexObj( struct gl_texture_object *texObj ) mach64SetTexWrap( t, texObj->WrapS, texObj->WrapT ); mach64SetTexFilter( t, texObj->MinFilter, texObj->MagFilter ); - mach64SetTexBorderColor( t, texObj->_BorderChan ); + mach64SetTexBorderColor( t, texObj->BorderColor ); return t; } @@ -152,6 +152,7 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_ALPHA8: case GL_ALPHA12: case GL_ALPHA16: + case GL_COMPRESSED_ALPHA: case 2: case GL_LUMINANCE_ALPHA: case GL_LUMINANCE4_ALPHA4: @@ -160,9 +161,11 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_LUMINANCE12_ALPHA4: case GL_LUMINANCE12_ALPHA12: case GL_LUMINANCE16_ALPHA16: + case GL_COMPRESSED_LUMINANCE_ALPHA: case 4: case GL_RGBA: case GL_RGBA2: + case GL_COMPRESSED_RGBA: if (mmesa->mach64Screen->cpp == 4) return &_mesa_texformat_argb8888; else @@ -193,6 +196,7 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_RGB10: case GL_RGB12: case GL_RGB16: + case GL_COMPRESSED_RGB: if (mmesa->mach64Screen->cpp == 4) return &_mesa_texformat_argb8888; else @@ -204,6 +208,7 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_LUMINANCE8: case GL_LUMINANCE12: case GL_LUMINANCE16: + case GL_COMPRESSED_LUMINANCE: if (mmesa->mach64Screen->cpp == 4) return &_mesa_texformat_argb8888; /* inefficient but accurate */ else @@ -214,6 +219,7 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat, case GL_INTENSITY8: case GL_INTENSITY12: case GL_INTENSITY16: + case GL_COMPRESSED_INTENSITY: if (mmesa->mach64Screen->cpp == 4) return &_mesa_texformat_argb8888; /* inefficient but accurate */ else @@ -465,7 +471,7 @@ static void mach64DDTexParameter( GLcontext *ctx, GLenum target, case GL_TEXTURE_BORDER_COLOR: if ( t->base.bound ) FLUSH_BATCH( mmesa ); - mach64SetTexBorderColor( t, tObj->_BorderChan ); + mach64SetTexBorderColor( t, tObj->BorderColor ); break; case GL_TEXTURE_BASE_LEVEL: diff --git a/src/mach64_tris.c b/src/mach64_tris.c index f2e8e2e..c2a0adf 100644 --- a/src/mach64_tris.c +++ b/src/mach64_tris.c @@ -1297,7 +1297,8 @@ do { \ #define LOCAL_VARS(n) \ mach64ContextPtr mmesa = MACH64_CONTEXT(ctx); \ - GLuint color[n], spec[n]; \ + GLuint color[n] = { 0 }; \ + GLuint spec[n] = { 0 }; \ GLuint vertex_size = mmesa->vertex_size; \ const GLuint xyoffset = 9; \ const GLuint coloroffset = 8; \ |