diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2007-12-26 15:41:24 -0600 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2007-12-26 15:41:24 -0600 |
commit | 2b440d54617bf0020171ce765708e7a9b48f2185 (patch) | |
tree | f125abe7e2c08ccaee721e895c4adf7f3faac4c2 /src/mesa/swrast | |
parent | ab57cbaccccb30fd743ba3283251430e6bc3a071 (diff) | |
parent | b422e5ad3716d32f2434ca38819f4a877c7eeeeb (diff) |
Merge branch 'master' into autoconf2
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_context.c | 10 | ||||
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 8 | ||||
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 11 |
3 files changed, 13 insertions, 16 deletions
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index 3bf9804bef..314931d467 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -117,7 +117,7 @@ _swrast_update_rasterflags( GLcontext *ctx ) /** - * Examine polycon culls tate to compute the _BackfaceCullSign field. + * Examine polygon cull state to compute the _BackfaceCullSign field. * _BackfaceCullSign will be 0 if no culling, -1 if culling back-faces, * and 1 if culling front-faces. The Polygon FrontFace state also * factors in. @@ -128,21 +128,17 @@ _swrast_update_polygon( GLcontext *ctx ) GLfloat backface_sign; if (ctx->Polygon.CullFlag) { - backface_sign = 1.0; switch (ctx->Polygon.CullFaceMode) { case GL_BACK: - if (ctx->Polygon.FrontFace == GL_CCW) - backface_sign = -1.0; + backface_sign = -1.0; break; case GL_FRONT: - if (ctx->Polygon.FrontFace != GL_CCW) - backface_sign = -1.0; + backface_sign = 1.0; break; case GL_FRONT_AND_BACK: /* fallthrough */ default: backface_sign = 0.0; - break; } } else { diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 0cf425e1c6..969787381c 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -842,7 +842,8 @@ _swrast_DrawPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(invalid PBO access)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, GL_READ_ONLY_ARB, @@ -850,7 +851,8 @@ _swrast_DrawPixels( GLcontext *ctx, if (!buf) { /* buffer is already mapped - that's an error */ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(PBO is mapped)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } pixels = ADD_POINTERS(buf, pixels); } @@ -890,8 +892,6 @@ _swrast_DrawPixels( GLcontext *ctx, /* don't return yet, clean-up */ } -end: - RENDER_FINISH(swrast,ctx); if (unpack->BufferObj->Name) { diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 916ddc1b97..8df15c8704 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -570,7 +570,8 @@ _swrast_ReadPixels( GLcontext *ctx, /* Do all needed clipping here, so that we can forget about it later */ if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { /* The ReadPixels region is totally outside the window bounds */ - goto end; + RENDER_FINISH(swrast, ctx); + return; } if (clippedPacking.BufferObj->Name) { @@ -580,7 +581,8 @@ _swrast_ReadPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(invalid PBO access)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, GL_WRITE_ONLY_ARB, @@ -588,7 +590,8 @@ _swrast_ReadPixels( GLcontext *ctx, if (!buf) { /* buffer is already mapped - that's an error */ _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } pixels = ADD_POINTERS(buf, pixels); } @@ -629,8 +632,6 @@ _swrast_ReadPixels( GLcontext *ctx, /* don't return yet, clean-up */ } - -end: RENDER_FINISH(swrast, ctx); if (clippedPacking.BufferObj->Name) { |