st/mesa: optimize DEPTH_STENCIL copies using fragment shader
[mesa.git] / src / mesa / swrast / s_span.c
index cd97d0416e54f561a2657a522c319bbd298e8064..dcb2db01e6d09c204ce444195eb1b73fd1380125 100644 (file)
@@ -37,7 +37,7 @@
 #include "main/format_pack.h"
 #include "main/format_unpack.h"
 #include "main/macros.h"
-#include "util/imports.h"
+
 #include "main/image.h"
 #include "main/samplerobj.h"
 #include "main/state.h"
@@ -74,7 +74,7 @@ _swrast_span_default_attribs(struct gl_context *ctx, SWspan *span)
       if (ctx->DrawBuffer->Visual.depthBits <= 16)
          span->z = FloatToFixed(ctx->Current.RasterPos[2] * depthMax + 0.5F);
       else {
-         GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax; 
+         GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax;
          tmpf = MIN2(tmpf, depthMax);
          span->z = (GLint)tmpf;
       }
@@ -390,7 +390,7 @@ _swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span )
 
    if (ctx->DrawBuffer->Visual.depthBits <= 16) {
       GLfixed zval = span->z;
-      GLuint *z = span->array->z; 
+      GLuint *z = span->array->z;
       for (i = 0; i < n; i++) {
          z[i] = FixedToInt(zval);
          zval += span->zStep;
@@ -426,7 +426,7 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
    GLfloat x = sqrtf(dudx * dudx + dvdx * dvdx);
    GLfloat y = sqrtf(dudy * dudy + dvdy * dvdy);
    GLfloat rho = MAX2(x, y);
-   GLfloat lambda = util_fast_log2(rho);
+   GLfloat lambda = log2f(rho);
    return lambda;
 }
 
@@ -453,7 +453,7 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
    maxU = MAX2(dsdx2, dsdy2) * texW;
    maxV = MAX2(dtdx2, dtdy2) * texH;
    rho = MAX2(maxU, maxV);
-   lambda = util_fast_log2(rho);
+   lambda = logf2(rho);
    return lambda;
 }
 #endif
@@ -1314,7 +1314,7 @@ _swrast_write_rgba_span( struct gl_context *ctx, SWspan *span)
    {
       const GLuint numBuffers = fb->_NumColorDrawBuffers;
       const struct gl_program *fp = ctx->FragmentProgram._Current;
-      const GLboolean multiFragOutputs = 
+      const GLboolean multiFragOutputs =
          _swrast_use_fragment_program(ctx)
          && fp->info.outputs_written >= (1 << FRAG_RESULT_DATA0);
       /* Save srcColorType because convert_color_type() can change it */