diff options
author | Nicolai Hähnle <[email protected]> | 2009-09-06 13:15:04 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2009-09-06 13:15:04 +0200 |
commit | f02f63997ce65530788a6dfcb28f11790a14d938 (patch) | |
tree | fc6aedb5256bfb84eb170cb82addd2b6605510f8 /src/mesa/swrast | |
parent | e95e76e1255a3ad0ce604271301d090337b2e82b (diff) | |
parent | 9778731732b4753e79a1b786c65325a52392411d (diff) |
Merge branch 'master' into r300-compiler
Conflicts:
src/gallium/drivers/r300/r300_tgsi_to_rc.c
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r-- | src/mesa/swrast/s_bitmap.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_context.c | 3 | ||||
-rw-r--r-- | src/mesa/swrast/s_drawpix.c | 67 | ||||
-rw-r--r-- | src/mesa/swrast/s_readpix.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast/s_triangle.c | 2 |
5 files changed, 16 insertions, 64 deletions
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c index 5e7822cf323..3dbdf2a61a8 100644 --- a/src/mesa/swrast/s_bitmap.c +++ b/src/mesa/swrast/s_bitmap.c @@ -56,7 +56,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, ASSERT(ctx->RenderMode == GL_RENDER); - bitmap = _mesa_map_bitmap_pbo(ctx, unpack, bitmap); + bitmap = (const GLubyte *) _mesa_map_pbo_source(ctx, unpack, bitmap); if (!bitmap) return; @@ -133,7 +133,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py, swrast_render_finish(ctx); - _mesa_unmap_bitmap_pbo(ctx, unpack); + _mesa_unmap_pbo_source(ctx, unpack); } diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c index e7c2ace32c7..abf00085651 100644 --- a/src/mesa/swrast/s_context.c +++ b/src/mesa/swrast/s_context.c @@ -220,6 +220,9 @@ _swrast_update_deferred_texture(GLcontext *ctx) /* Z comes from fragment program/shader */ swrast->_DeferredTexture = GL_FALSE; } + else if (fprog && fprog->UsesKill) { + swrast->_DeferredTexture = GL_FALSE; + } else if (ctx->Query.CurrentOcclusionObject) { /* occlusion query depends on shader discard/kill results */ swrast->_DeferredTexture = GL_FALSE; diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index a9ef8e685f1..6970b2e9cb5 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -831,11 +831,13 @@ _swrast_DrawPixels( GLcontext *ctx, SWcontext *swrast = SWRAST_CONTEXT(ctx); GLboolean save_vp_override = ctx->VertexProgram._Overriden; - /* We are creating fragments directly, without going through vertex programs. + /* We are creating fragments directly, without going through vertex + * programs. * - * This override flag tells the fragment processing code that its input comes - * from a non-standard source, and it may therefore not rely on optimizations - * that assume e.g. constant color if there is no color vertex array. + * This override flag tells the fragment processing code that its input + * comes from a non-standard source, and it may therefore not rely on + * optimizations that assume e.g. constant color if there is no color + * vertex array. */ _mesa_set_vp_override(ctx, GL_TRUE); @@ -847,7 +849,7 @@ _swrast_DrawPixels( GLcontext *ctx, if (swrast->NewState) _swrast_validate_derived( ctx ); - pixels = _mesa_map_drawpix_pbo(ctx, unpack, pixels); + pixels = _mesa_map_pbo_source(ctx, unpack, pixels); if (!pixels) { swrast_render_finish(ctx); _mesa_set_vp_override(ctx, save_vp_override); @@ -892,58 +894,5 @@ _swrast_DrawPixels( GLcontext *ctx, swrast_render_finish(ctx); _mesa_set_vp_override(ctx, save_vp_override); - _mesa_unmap_drawpix_pbo(ctx, unpack); + _mesa_unmap_pbo_source(ctx, unpack); } - - - -#if 0 /* experimental */ -/* - * Execute glDrawDepthPixelsMESA(). - */ -void -_swrast_DrawDepthPixelsMESA( GLcontext *ctx, - GLint x, GLint y, - GLsizei width, GLsizei height, - GLenum colorFormat, GLenum colorType, - const GLvoid *colors, - GLenum depthType, const GLvoid *depths, - const struct gl_pixelstore_attrib *unpack ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - - if (swrast->NewState) - _swrast_validate_derived( ctx ); - - swrast_render_start(ctx); - - switch (colorFormat) { - case GL_COLOR_INDEX: - if (ctx->Visual.rgbMode) - draw_rgba_pixels(ctx, x,y, width, height, colorFormat, colorType, - unpack, colors); - else - draw_index_pixels(ctx, x, y, width, height, colorType, - unpack, colors); - break; - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_ALPHA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_RGB: - case GL_BGR: - case GL_RGBA: - case GL_BGRA: - case GL_ABGR_EXT: - draw_rgba_pixels(ctx, x, y, width, height, colorFormat, colorType, - unpack, colors); - break; - default: - _mesa_problem(ctx, "unexpected format in glDrawDepthPixelsMESA"); - } - - swrast_render_finish(ctx); -} -#endif diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index e901fc6b5dc..48b9408d242 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -574,7 +574,7 @@ _swrast_ReadPixels( GLcontext *ctx, return; } - pixels = _mesa_map_readpix_pbo(ctx, &clippedPacking, pixels); + pixels = _mesa_map_pbo_dest(ctx, &clippedPacking, pixels); if (!pixels) return; @@ -616,5 +616,5 @@ _swrast_ReadPixels( GLcontext *ctx, swrast_render_finish(ctx); - _mesa_unmap_readpix_pbo(ctx, &clippedPacking); + _mesa_unmap_pbo_dest(ctx, &clippedPacking); } diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c index 1d2fed71691..1ab0e19f922 100644 --- a/src/mesa/swrast/s_triangle.c +++ b/src/mesa/swrast/s_triangle.c @@ -61,7 +61,7 @@ _swrast_culltriangle( GLcontext *ctx, GLfloat fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1]; GLfloat c = ex*fy-ey*fx; - if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign < 0.0F) + if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F) return GL_FALSE; return GL_TRUE; |