struct gl_pixelstore_attrib scissoredUnpack;
/* check if there's any raster operations enabled which we can't handle */
- if ((swrast->_RasterMask & (ALPHATEST_BIT |
+ if (swrast->_RasterMask & (ALPHATEST_BIT |
/*BLEND_BIT |*/ /* blending ok, through pixpipe */
DEPTH_BIT | /* could be done with RGB:DEPTH */
FOG_BIT | /* could be done with RGB:DEPTH */
LOGIC_OP_BIT |
/*CLIP_BIT |*/ /* clipping ok, below */
STENCIL_BIT |
- /*MASKING_BIT |*/ /* masking ok, test follows */
+ MASKING_BIT |
ALPHABUF_BIT | /* nope! see 565 span kludge */
MULTI_DRAW_BIT |
OCCLUSION_BIT | /* nope! at least not yet */
TEXTURE_BIT |
- FRAGPROG_BIT))
- ||
- ((swrast->_RasterMask & MASKING_BIT) /*&& (ctx->Visual.greenBits != 8)*/ && (ctx->Visual.greenBits != 5))
- ) {
+ FRAGPROG_BIT)) {
_swrast_Bitmap(ctx, px, py, width, height, unpack, bitmap);
return;
}
if (!grLfbLock(GR_LFB_WRITE_ONLY,
fxMesa->currentFB,
mode,
- GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) {
+ GR_ORIGIN_LOWER_LEFT, FXTRUE, &info)) {
_swrast_Bitmap(ctx, px, py, width, height, unpack, bitmap);
return;
}
{
const GLint winX = 0;
- const GLint winY = fxMesa->height - 1;
+ const GLint winY = 0;
/* The dest stride depends on the hardware and whether we're drawing
* to the front or back buffer. This compile-time test seems to do
* the job for now.
GLint row;
/* compute dest address of bottom-left pixel in bitmap */
GLushort *dst = (GLushort *) info.lfbPtr
- + (winY - py) * dstStride + (winX + px);
+ + (winY + py) * dstStride + (winX + px);
for (row = 0; row < height; row++) {
const GLubyte *src =
if (mask != 128)
src++;
}
- dst -= dstStride;
+ dst += dstStride;
}
}
if (!grLfbLock(GR_LFB_WRITE_ONLY,
fxMesa->currentFB,
GR_LFBWRITEMODE_8888,
- GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) {
+ GR_ORIGIN_LOWER_LEFT, FXTRUE, &info)) {
_swrast_Bitmap(ctx, px, py, width, height, unpack, bitmap);
return;
}
{
const GLint winX = 0;
- const GLint winY = fxMesa->height - 1;
+ const GLint winY = 0;
/* The dest stride depends on the hardware and whether we're drawing
* to the front or back buffer. This compile-time test seems to do
* the job for now.
GLint row;
/* compute dest address of bottom-left pixel in bitmap */
GLuint *dst = (GLuint *) info.lfbPtr
- + (winY - py) * dstStride + (winX + px);
+ + (winY + py) * dstStride + (winX + px);
for (row = 0; row < height; row++) {
const GLubyte *src =
if (mask != 128)
src++;
}
- dst -= dstStride;
+ dst += dstStride;
}
}
if (!grLfbLock(GR_LFB_WRITE_ONLY,
fxMesa->currentFB,
GR_LFBWRITEMODE_8888,
- GR_ORIGIN_UPPER_LEFT, FXTRUE, &info)) {
+ GR_ORIGIN_LOWER_LEFT, FXTRUE, &info)) {
_swrast_DrawPixels(ctx, x, y, width, height, format, type, unpack, pixels);
return;
}
{
const GLint winX = 0;
- const GLint winY = fxMesa->height - 1;
+ const GLint winY = 0;
const GLint dstStride = info.strideInBytes / 4; /* stride in GLuints */
- GLuint *dst = (GLuint *) info.lfbPtr + (winY - y) * dstStride + (winX + x);
+ GLuint *dst = (GLuint *) info.lfbPtr + (winY + y) * dstStride + (winX + x);
const GLubyte *src = (GLubyte *)_mesa_image_address(unpack, pixels,
width, height, format,
type, 0, 0, 0);
GLint row;
for (row = 0; row < height; row++) {
MEMCPY(dst, src, widthInBytes);
- dst -= dstStride;
+ dst += dstStride;
src += srcStride;
}
}
ctx->Driver.DrawBuffer = fxDDSetDrawBuffer;
ctx->Driver.GetBufferSize = fxDDBufferSize;
switch (fxMesa->colDepth) {
- case 15:
- ctx->Driver.ReadPixels = fxDDReadPixels555;
- ctx->Driver.Bitmap = fxDDDrawBitmap2;
- break;
- case 16:
- ctx->Driver.ReadPixels = fxDDReadPixels565;
- ctx->Driver.Bitmap = fxDDDrawBitmap2;
- break;
- case 32:
- ctx->Driver.DrawPixels = fxDDDrawPixels8888;
- ctx->Driver.ReadPixels = fxDDReadPixels8888;
- ctx->Driver.Bitmap = fxDDDrawBitmap4;
- break;
+ case 15:
+ ctx->Driver.ReadPixels = fxDDReadPixels555;
+ ctx->Driver.Bitmap = fxDDDrawBitmap2;
+ break;
+ case 16:
+ ctx->Driver.ReadPixels = fxDDReadPixels565;
+ ctx->Driver.Bitmap = fxDDDrawBitmap2;
+ break;
+ case 32:
+ ctx->Driver.DrawPixels = fxDDDrawPixels8888;
+ ctx->Driver.ReadPixels = fxDDReadPixels8888;
+ ctx->Driver.Bitmap = fxDDDrawBitmap4;
+ break;
}
ctx->Driver.Finish = fxDDFinish;
ctx->Driver.Flush = NULL;