cleanup
authorDaniel Borca <dborca@users.sourceforge.net>
Mon, 16 Aug 2004 08:34:13 +0000 (08:34 +0000)
committerDaniel Borca <dborca@users.sourceforge.net>
Mon, 16 Aug 2004 08:34:13 +0000 (08:34 +0000)
src/mesa/drivers/glide/fx.rc
src/mesa/drivers/glide/fxapi.c
src/mesa/drivers/glide/fxddspan.c
src/mesa/drivers/glide/fxsetup.c
src/mesa/drivers/glide/fxtris.c

index ebc80f0486fb7eb4e4c2ddc013b0bc76f2f4699a..f9caf9860a4b602ff5458e82b4006e3c73c43151 100644 (file)
@@ -5,10 +5,10 @@
 #define HWSTR                   "3dfx Voodoo Graphics, Voodoo^2, Voodoo Banshee, Velocity 100/200, Voodoo3, Voodoo4, Voodoo5"
 #define COPYRIGHTSTR            "Copyright \251 Brian E. Paul"
 
-#define VERSIONSTR              "6.1.0.8"
+#define VERSIONSTR              "6.1.0.9"
 #define MANVERSION              6
 #define MANREVISION             1
-#define BUILD_NUMBER            8
+#define BUILD_NUMBER            9
 
 VS_VERSION_INFO VERSIONINFO
  FILEVERSION MANVERSION, MANREVISION, 0, BUILD_NUMBER
index f348dd45bbc7a63466bbd960fa8568681c844f65..8fa06952daa7faa0821771aeafffdf02f64ac96a 100644 (file)
@@ -818,21 +818,17 @@ fxMesaDestroyContext(fxMesaContext fxMesa)
               (unsigned) st.pixelsOut);
    }
 
-   /* [dBorca]
-    * close the hardware first, so we can debug
-    * atexit problems (memory leaks, etc).
-    * NB: fxDDDestroyFxMesaContext must be called
-    * before _mesa_destroy_context; which must be
-    * called before fxTMClose!
+   /* close the hardware first,
+    * so we can debug atexit problems (memory leaks, etc).
     */
    grSstWinClose(fxMesa->glideContext);
    fxCloseHardware();
 
-   fxDDDestroyFxMesaContext(fxMesa);
+   fxDDDestroyFxMesaContext(fxMesa); /* must be before _mesa_destroy_context */
    _mesa_destroy_visual(fxMesa->glVis);
    _mesa_destroy_context(fxMesa->glCtx);
    _mesa_destroy_framebuffer(fxMesa->glBuffer);
-   fxTMClose(fxMesa);
+   fxTMClose(fxMesa); /* must be after _mesa_destroy_context */
 
    FREE(fxMesa);
 
index 4eacfc0b5d3a6b1edc9d1cd69fc983614a2bbbf0..f7b20490e7440b10d703bd5a35b49575aa8f5fd6 100644 (file)
 
 #define HW_WRITE_CLIPLOOP()                                            \
     do {                                                               \
-       int _nc = 1; /* numcliprects */                                 \
+       const int _nc = 1; /* numcliprects */                           \
        /* [dBorca] Hack alert: */                                      \
        /* remember, we need to flip the scissor, too */                \
        /* is it better to do it inside fxDDScissor? */                 \
 
 #define HW_READ_CLIPLOOP()                                             \
     do {                                                               \
-       int _nc = 1; /* numcliprects */                                 \
+       const int _nc = 1; /* numcliprects */                           \
        /* [dBorca] Hack alert: */                                      \
        /* remember, we need to flip the scissor, too */                \
        /* is it better to do it inside fxDDScissor? */                 \
index a1c018a38e635173e33e172174685defe5f096a2..c2112294973d35c4ab35df6df1453dfb2e98a08b 100644 (file)
@@ -503,10 +503,7 @@ fxSelectSingleTMUSrc_NoLock(fxMesaContext fxMesa, GLint tmu, FxBool LODblend)
          tex1.FunctionAlpha = GR_COMBINE_FUNCTION_LOCAL;
          tex1.FactorAlpha   = GR_COMBINE_FACTOR_NONE;
 
-        /* [dBorca] Hack alert:
-          * don't use GR_COMBINE_FUNCTION_SCALE_OTHER
-          * such that Glide recognizes TMU0 in passthrough mode
-          */
+        /* correct values to set TMU0 in passthrough mode */
          tex0.FunctionRGB   = GR_COMBINE_FUNCTION_BLEND;
          tex0.FactorRGB     = GR_COMBINE_FACTOR_ONE;
          tex0.FunctionAlpha = GR_COMBINE_FUNCTION_BLEND;
@@ -1374,7 +1371,7 @@ fxDDBlendFuncSeparate(GLcontext * ctx, GLenum sfactor, GLenum dfactor, GLenum as
    GLboolean haveAlpha = fxMesa->haveHwAlpha;
    GrAlphaBlendFnc_t sfact, dfact, asfact, adfact;
 
-   /* [dBorca] Hack alert:
+   /*
     * 15/16 BPP alpha channel alpha blending modes
     *   0x0    AZERO           Zero
     *   0x4    AONE            One
index e2b6c45a42a6967a9e63444191db6a79fda2c32e..85dade8c58646da8b28fb9be93f8568a14a62877 100644 (file)
@@ -882,6 +882,7 @@ static void fx_render_vb_triangles( GLcontext *ctx,
 {
    fxMesaContext fxMesa = FX_CONTEXT(ctx);
    GrVertex *fxVB = fxMesa->verts;
+   GLuint j;
    (void) flags;
 
    if (TDFX_DEBUG & VERBOSE_VARRAY) {
@@ -890,23 +891,9 @@ static void fx_render_vb_triangles( GLcontext *ctx,
 
    INIT(GL_TRIANGLES);
 
-#if 0
-   /* [dBorca]
-    * apparently, this causes troubles with some programs (GLExcess);
-    * might be a bug in Glide... However, "grDrawVertexArrayContiguous"
-    * eventually calls "grDrawTriangle" for GR_TRIANGLES, so we're better
-    * off doing it by hand...
-    */
-   grDrawVertexArrayContiguous( GR_TRIANGLES, count-start,
-                                fxVB + start, sizeof(GrVertex));
-#else
-   {
-    GLuint j;
-    for (j=start+2; j<count; j+=3) {
-        grDrawTriangle(fxVB + (j-2), fxVB + (j-1), fxVB + j);
-    }
+   for (j=start+2; j<count; j+=3) {
+      grDrawTriangle(fxVB + (j-2), fxVB + (j-1), fxVB + j);
    }
-#endif
 }
 
 
@@ -1200,10 +1187,7 @@ void fxDDChooseRenderState(GLcontext *ctx)
       fxMesa->draw_line = fx_draw_line;
       fxMesa->draw_tri = fx_draw_triangle;
 
-      /* Hook in fallbacks for specific primitives.
-       * [dBorca] Hack alert:
-       * If we're in FSAA mode, we always do anti-aliased primitives.
-       */
+      /* Hook in fallbacks for specific primitives. */
       if (flags & (POINT_FALLBACK|
                   LINE_FALLBACK|
                   TRI_FALLBACK))