i965: Fix all non-snb regression in the snb attribute interpolation commit.
[mesa.git] / src / mesa / drivers / dri / tdfx / tdfx_dd.c
index 2cef079515366e8d145562e0bc0f5ef2b61b9b9d..2cbbeb811415eaeccfa8665d798ed6e4556bdb2f 100644 (file)
 #include "tdfx_context.h"
 #include "tdfx_dd.h"
 #include "tdfx_lock.h"
-#include "tdfx_vb.h"
 #include "tdfx_pixels.h"
 
 #include "utils.h"
 #include "main/context.h"
-#include "main/enums.h"
-#include "main/framebuffer.h"
-#include "swrast/swrast.h"
-#if defined(USE_X86_ASM)
-#include "x86/common_x86_asm.h"
-#endif
 
 
 #define DRIVER_DATE    "20061113"
@@ -91,7 +84,7 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name )
       else {
         /* unexpected result: replace spaces with hyphens */
         int i;
-        for (i = 0; hardware[i] && (i < sizeof(hardware)); i++) {
+        for (i = 0; i < sizeof(hardware) && hardware[i]; i++) {
            if (hardware[i] == ' ' || hardware[i] == '\t') {
               hardware[i] = '-';
            }
@@ -110,13 +103,13 @@ static const GLubyte *tdfxDDGetString( GLcontext *ctx, GLenum name )
 
 
 static void
-tdfxBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q)
+tdfxBeginQuery(GLcontext *ctx, struct gl_query_object *q)
 {
    tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
 
    (void) q;
 
-   if (target == GL_SAMPLES_PASSED_ARB) {
+   if (q->Target == GL_SAMPLES_PASSED_ARB) {
       LOCK_HARDWARE(fxMesa);
       fxMesa->Glide.grFinish();
       fxMesa->Glide.grReset(GR_STATS_PIXELS);
@@ -126,14 +119,14 @@ tdfxBeginQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q)
 
 
 static void
-tdfxEndQuery(GLcontext *ctx, GLenum target, struct gl_query_object *q)
+tdfxEndQuery(GLcontext *ctx, struct gl_query_object *q)
 {
    tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
    FxI32 total_pixels;
    FxI32 z_fail_pixels;
 
 
-   if (target == GL_SAMPLES_PASSED_ARB) {
+   if (q->Target == GL_SAMPLES_PASSED_ARB) {
       LOCK_HARDWARE(fxMesa);
       fxMesa->Glide.grFinish();