i965/fs: set rounding mode when emitting fadd, fmul and ffma instructions
[mesa.git] / src / mesa / swrast / s_stencil.c
index e7c35ff693a8343464c7cad73247750cde25b748..ce3d77c79a91b55a0d2e41a23b6ed3a08f6e6940 100644 (file)
@@ -28,7 +28,6 @@
 #include "main/imports.h"
 #include "main/format_pack.h"
 #include "main/format_unpack.h"
-#include "main/core.h"
 #include "main/stencil.h"
 
 #include "s_context.h"
@@ -280,7 +279,7 @@ compute_pass_fail_masks(GLuint n, const GLubyte origMask[],
 {
    GLuint i;
    for (i = 0; i < n; i++) {
-      ASSERT(newMask[i] == 0 || newMask[i] == 1);
+      assert(newMask[i] == 0 || newMask[i] == 1);
       passMask[i] = origMask[i] & newMask[i];
       failMask[i] = origMask[i] & (newMask[i] ^ 1);
    }
@@ -330,7 +329,7 @@ put_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb,
               const GLubyte stencil[])
 {
    const GLint w = rb->Width, h = rb->Height;
-   gl_pack_ubyte_stencil_func pack_stencil =
+   mesa_pack_ubyte_stencil_func pack_stencil =
       _mesa_get_pack_ubyte_stencil_func(rb->Format);
    GLuint i;
 
@@ -580,7 +579,8 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
    }
 
    ctx->Driver.MapRenderbuffer(ctx, rb, x, y, width, height,
-                               mapMode, &map, &rowStride);
+                               mapMode, &map, &rowStride,
+                               ctx->DrawBuffer->FlipY);
    if (!map) {
       _mesa_error(ctx, GL_OUT_OF_MEMORY, "glClear(stencil)");
       return;
@@ -614,7 +614,7 @@ _swrast_clear_stencil_buffer(struct gl_context *ctx)
          }
       }
       break;
-   case MESA_FORMAT_Z24_UNORM_X8_UINT:
+   case MESA_FORMAT_Z24_UNORM_S8_UINT:
       {
          GLuint clear = (ctx->Stencil.Clear & writeMask & 0xff) << 24;
          GLuint mask = (((~writeMask) & 0xff) << 24) | 0xffffff;