mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 18:10:17 +01:00
dri/swrast: Fix frontbuffer rendering.
Was broken since the endianness fixes.
This commit is contained in:
parent
6ec259eb17
commit
4cf14fa80b
1 changed files with 11 additions and 6 deletions
|
|
@ -37,7 +37,7 @@
|
|||
#define _SWRAST_SPANTEMP_ONCE
|
||||
|
||||
static INLINE void
|
||||
PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
|
||||
PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLvoid *p )
|
||||
{
|
||||
__DRIcontext *ctx = swrast_context(glCtx);
|
||||
__DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer);
|
||||
|
|
@ -179,7 +179,8 @@ NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
|
|||
if (mask) {
|
||||
for (i = 0; i < count; i++) {
|
||||
if (mask[i]) {
|
||||
RB_TYPE pixel[4];
|
||||
RB_TYPE row[4];
|
||||
INIT_PIXEL_PTR(pixel, x, y);
|
||||
STORE_PIXEL(pixel, x + i, y, src[i]);
|
||||
PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
|
||||
}
|
||||
|
|
@ -212,7 +213,8 @@ NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
|
|||
if (mask) {
|
||||
for (i = 0; i < count; i++) {
|
||||
if (mask[i]) {
|
||||
RB_TYPE pixel[4];
|
||||
RB_TYPE row[4];
|
||||
INIT_PIXEL_PTR(pixel, x, y);
|
||||
#ifdef STORE_PIXEL_RGB
|
||||
STORE_PIXEL_RGB(pixel, x + i, y, src[i]);
|
||||
#else
|
||||
|
|
@ -253,7 +255,8 @@ NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
|
|||
if (mask) {
|
||||
for (i = 0; i < count; i++) {
|
||||
if (mask[i]) {
|
||||
RB_TYPE pixel[4];
|
||||
RB_TYPE row[4];
|
||||
INIT_PIXEL_PTR(pixel, x, y);
|
||||
STORE_PIXEL(pixel, x + i, y, src);
|
||||
PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
|
||||
}
|
||||
|
|
@ -285,7 +288,8 @@ NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
|
|||
ASSERT(mask);
|
||||
for (i = 0; i < count; i++) {
|
||||
if (mask[i]) {
|
||||
RB_TYPE pixel[4];
|
||||
RB_TYPE row[4];
|
||||
INIT_PIXEL_PTR(pixel, x, y);
|
||||
STORE_PIXEL(pixel, x[i], y[i], src[i]);
|
||||
PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
|
||||
}
|
||||
|
|
@ -307,7 +311,8 @@ NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
|
|||
ASSERT(mask);
|
||||
for (i = 0; i < count; i++) {
|
||||
if (mask[i]) {
|
||||
RB_TYPE pixel[4];
|
||||
RB_TYPE row[4];
|
||||
INIT_PIXEL_PTR(pixel, x, y);
|
||||
STORE_PIXEL(pixel, x[i], y[i], src);
|
||||
PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue