Merge branch '7.8' into master
authorPauli Nieminen <suokkos@gmail.com>
Wed, 17 Mar 2010 09:26:48 +0000 (11:26 +0200)
committerPauli Nieminen <suokkos@gmail.com>
Wed, 17 Mar 2010 09:26:48 +0000 (11:26 +0200)
Conflicts:
Makefile
src/mesa/main/version.h

Makefile
src/mesa/drivers/dri/r600/r700_state.c
src/mesa/drivers/dri/radeon/radeon_dma.c
src/mesa/main/imports.c
src/mesa/main/imports.h
src/mesa/shader/lex.yy.c
src/mesa/shader/nvfragparse.c
src/mesa/shader/program_lexer.l
src/mesa/shader/slang/slang_compile.c
src/mesa/state_tracker/st_cb_texture.c

index 4a81312046830ed00bc884de52bb37d52c1591c4..81fe0d1e876cc7c5c974edfca1ed6a578e6ab82d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -243,7 +243,6 @@ MAIN_FILES = \
        $(DIRECTORY)/src/mesa/shader/descrip.mms                        \
        $(DIRECTORY)/src/mesa/shader/slang/*.[ch]                       \
        $(DIRECTORY)/src/mesa/shader/slang/descrip.mms                  \
-       $(DIRECTORY)/src/mesa/shader/slang/library/*.[ch]               \
        $(DIRECTORY)/src/mesa/shader/slang/library/*.gc                 \
        $(DIRECTORY)/src/mesa/shader/slang/library/Makefile             \
        $(DIRECTORY)/src/mesa/swrast/*.[ch]                             \
@@ -379,15 +378,6 @@ SGI_GLU_FILES = \
        $(DIRECTORY)/src/glu/sgi/libtess/*.[ch]                         \
        $(DIRECTORY)/src/glu/sgi/libutil/*.[ch]
 
-MESA_GLU_FILES = \
-       $(DIRECTORY)/src/glu/mesa/README[12]            \
-       $(DIRECTORY)/src/glu/mesa/Makefile*             \
-       $(DIRECTORY)/src/glu/mesa/descrip.mms           \
-       $(DIRECTORY)/src/glu/mesa/mms_depend            \
-       $(DIRECTORY)/src/glu/mesa/*.def                 \
-       $(DIRECTORY)/src/glu/mesa/depend                \
-       $(DIRECTORY)/src/glu/mesa/*.[ch]
-
 GLW_FILES = \
        $(DIRECTORY)/src/glw/*.[ch]                     \
        $(DIRECTORY)/src/glw/Makefile*                  \
@@ -450,11 +440,7 @@ GLUT_FILES = \
        $(DIRECTORY)/src/glut/glx/*.[ch]                \
        $(DIRECTORY)/src/glut/beos/*.[ch]               \
        $(DIRECTORY)/src/glut/beos/*.cpp                \
-       $(DIRECTORY)/src/glut/beos/Makefile             \
-       $(DIRECTORY)/src/glut/fbdev/Makefile            \
-       $(DIRECTORY)/src/glut/fbdev/*[ch]               \
-       $(DIRECTORY)/src/glut/mini/*[ch]                \
-       $(DIRECTORY)/src/glut/mini/glut.pc.in           \
+       $(DIRECTORY)/src/glut/beos/Makefile
 
 DEPEND_FILES = \
        $(TOP)/src/mesa/depend          \
index 2953ffd0288651f48fe06f7c1066757089f4321e..1ff233d91ee86bcdf11e92beb770a14f42963b67 100644 (file)
@@ -615,7 +615,7 @@ static GLuint translate_logicop(GLenum logicop)
        case GL_XOR:
                return 0x66;
        case GL_EQUIV:
-               return 0xaa;
+               return 0x99;
        case GL_AND_REVERSE:
                return 0x44;
        case GL_AND_INVERTED:
index 22499bc38d1b8fb981f59626f0c7cc9b3b86daf8..6b7690cf8b397dc2275e36826369116143d21332 100644 (file)
@@ -184,9 +184,6 @@ void radeonRefillCurrentDmaRegion(radeonContextPtr rmesa, int size)
        radeon_print(RADEON_DMA, RADEON_NORMAL, "%s size %d minimum_size %d\n",
                        __FUNCTION__, size, rmesa->dma.minimum_size);
 
-       if (!is_empty_list(&rmesa->dma.reserved))
-               radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo);
-
        if (is_empty_list(&rmesa->dma.free)
              || last_elem(&rmesa->dma.free)->bo->size < size) {
                dma_bo = CALLOC_STRUCT(radeon_dma_bo);
@@ -336,9 +333,6 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
                legacy_track_pending(rmesa->radeonScreen->bom, 0);
        }
 
-       if (!is_empty_list(&rmesa->dma.reserved))
-               radeon_bo_unmap(first_elem(&rmesa->dma.reserved)->bo);
-
        /* move waiting bos to free list.
           wait list provides gpu time to handle data before reuse */
        foreach_s(dma_bo, temp, &rmesa->dma.wait) {
@@ -368,6 +362,7 @@ void radeonReleaseDmaRegions(radeonContextPtr rmesa)
 
        /* move reserved to wait list */
        foreach_s(dma_bo, temp, &rmesa->dma.reserved) {
+               radeon_bo_unmap(dma_bo->bo);
                /* free objects that are too small to be used because of large request */
                if (dma_bo->bo->size < rmesa->dma.minimum_size) {
                   radeon_bo_unref(dma_bo->bo);
index 56e8195810ea4f79ac4b5f27b0fc3dbd4a2008d7..1ae085336480246b7b298e44fbbd94cfd72e29b2 100644 (file)
@@ -795,18 +795,20 @@ _mesa_strdup( const char *s )
    }
 }
 
-/** Wrapper around strtod() */
-double
-_mesa_strtod( const char *s, char **end )
+/** Wrapper around strtof() */
+float
+_mesa_strtof( const char *s, char **end )
 {
 #ifdef _GNU_SOURCE
    static locale_t loc = NULL;
    if (!loc) {
       loc = newlocale(LC_CTYPE_MASK, "C", NULL);
    }
-   return strtod_l(s, end, loc);
+   return strtof_l(s, end, loc);
+#elif defined(_ISOC99_SOURCE) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
+   return strtof(s, end);
 #else
-   return strtod(s, end);
+   return (float)strtod(s, end);
 #endif
 }
 
index fb4a00eca7b5aa608349a82290b43010449ed33b..d28f4ad125d27f4588e4f02407b9b7a3f9f91deb 100644 (file)
@@ -575,8 +575,8 @@ _mesa_getenv( const char *var );
 extern char *
 _mesa_strdup( const char *s );
 
-extern double
-_mesa_strtod( const char *s, char **end );
+extern float
+_mesa_strtof( const char *s, char **end );
 
 extern unsigned int
 _mesa_str_checksum(const char *str);
index a08617ff8d44f2965858a20e4e1dc6b488be6599..4c5c644a6ed47a11774d05c80601a4417d4ed5fa 100644 (file)
@@ -2198,7 +2198,7 @@ case 142:
 YY_RULE_SETUP
 #line 326 "program_lexer.l"
 {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
        YY_BREAK
@@ -2210,7 +2210,7 @@ YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
 #line 330 "program_lexer.l"
 {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
        YY_BREAK
@@ -2218,7 +2218,7 @@ case 144:
 YY_RULE_SETUP
 #line 334 "program_lexer.l"
 {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
        YY_BREAK
@@ -2226,7 +2226,7 @@ case 145:
 YY_RULE_SETUP
 #line 338 "program_lexer.l"
 {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
        YY_BREAK
index d03cb4e493bb8c99fcedc4826b500da65d930557..0de3c5804d21b80ff324b0c5d180a3f9c4e4266e 100644 (file)
@@ -456,7 +456,7 @@ Parse_ScalarConstant(struct parse_state *parseState, GLfloat *number)
 {
    char *end = NULL;
 
-   *number = (GLfloat) _mesa_strtod((const char *) parseState->pos, &end);
+   *number = (GLfloat) _mesa_strtof((const char *) parseState->pos, &end);
 
    if (end && end > (char *) parseState->pos) {
       /* got a number */
index b00765793dcb6ad576f14c8f465b2ec40c0afe30..fe18272cdbaf46f037bee471e8a4c8820a7cab5a 100644 (file)
@@ -324,19 +324,19 @@ ARRAYSHADOW2D             { return_token_or_IDENTIFIER(require_ARB_fp && require
    return INTEGER;
 }
 {num}?{frac}{exp}?        {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
 {num}"."/[^.]             {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
 {num}{exp}                {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
 {num}"."{exp}             {
-   yylval->real = (float) _mesa_strtod(yytext, NULL);
+   yylval->real = _mesa_strtof(yytext, NULL);
    return REAL;
 }
 
index b95c15fea6114e7c3bb80c193bf9a185aaf1a305..ad86676157076015637560fee71c14f2c1fadde1 100644 (file)
@@ -246,7 +246,7 @@ parse_general_number(slang_parse_ctx *ctx, float *number)
    if (flt[strlen(flt) - 1] == 'f' || flt[strlen(flt) - 1] == 'F') {
       flt[strlen(flt) - 1] = '\0';
    }
-   *number = (float)_mesa_strtod(flt, (char **)NULL);
+   *number = _mesa_strtof(flt, (char **)NULL);
    free(flt);
 
    return 1;
@@ -312,7 +312,7 @@ parse_float(slang_parse_ctx * C, float *number)
       slang_string_concat(whole, "E");
       slang_string_concat(whole, exponent);
 
-      *number = (float) (_mesa_strtod(whole, (char **) NULL));
+      *number = _mesa_strtof(whole, (char **) NULL);
 
       _slang_free(whole);
    }
index 3ef030f5a9bdf76c64dcdfec94401d1b6f0fba42..84b78181a972d4bbed104f23c2fba449985eed5e 100644 (file)
@@ -900,6 +900,8 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level,
 
    _mesa_unmap_pbo_dest(ctx, &ctx->Pack);
 
+   screen->tex_transfer_destroy(tex_xfer);
+
    /* destroy the temp / dest surface */
    util_destroy_rgba_surface(dst_texture, dst_surface);
 }