diff options
author | Jon Smirl <[email protected]> | 2005-05-18 20:44:23 +0000 |
---|---|---|
committer | Jon Smirl <[email protected]> | 2005-05-18 20:44:23 +0000 |
commit | 9a1b5af3331361177cf73c1d0b18cea4e260688b (patch) | |
tree | 8189f747cbc61f54e8ef74de377556a714b72893 /src | |
parent | 8818eae253266b8e5df167ccd57567b36dbe32b6 (diff) |
Fix inverted y for egl fbdev, add egl demo3
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_dri.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index eafed1fe98f..0158a41c80d 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -146,7 +146,7 @@ init_core_functions( struct dd_function_table *functions ) #define SPAN_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)drb->Base.Data + (Y) * drb->pitch + (X) * 3; + GLubyte *P = (GLubyte *)drb->Base.Data + (drb->Base.Height - (Y)) * drb->pitch + (X) * 3; #define INC_PIXEL_PTR(P) P += 3 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[BCOMP]; \ @@ -167,7 +167,7 @@ init_core_functions( struct dd_function_table *functions ) #define SPAN_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)drb->Base.Data + (Y) * drb->pitch + (X) * 4; + GLubyte *P = (GLubyte *)drb->Base.Data + (drb->Base.Height - (Y)) * drb->pitch + (X) * 4; #define INC_PIXEL_PTR(P) P += 4 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = VALUE[BCOMP]; \ @@ -194,7 +194,7 @@ init_core_functions( struct dd_function_table *functions ) #define SPAN_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; #define INIT_PIXEL_PTR(P, X, Y) \ - GLushort *P = (GLushort *)drb->Base.Data + (Y) * drb->pitch + (X) * 2; + GLushort *P = (GLushort *)drb->Base.Data + (drb->Base.Height - (Y)) * drb->pitch + (X) * 2; #define INC_PIXEL_PTR(P) P += 1 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = ( (((VALUE[RCOMP]) & 0xf8) << 8) | (((VALUE[GCOMP]) & 0xfc) << 3) | ((VALUE[BCOMP]) >> 3) ) @@ -213,7 +213,7 @@ init_core_functions( struct dd_function_table *functions ) #define SPAN_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; #define INIT_PIXEL_PTR(P, X, Y) \ - GLushort *P = (GLushort *)drb->Base.Data + (Y) * drb->pitch + (X) * 2; + GLushort *P = (GLushort *)drb->Base.Data + (drb->Base.Height - (Y)) * drb->pitch + (X) * 2; #define INC_PIXEL_PTR(P) P += 1 #define STORE_PIXEL(DST, X, Y, VALUE) \ DST[0] = ( (((VALUE[RCOMP]) & 0xf8) << 7) | (((VALUE[GCOMP]) & 0xf8) << 2) | ((VALUE[BCOMP]) >> 3) ) @@ -232,7 +232,7 @@ init_core_functions( struct dd_function_table *functions ) #define SPAN_VARS \ driRenderbuffer *drb = (driRenderbuffer *) rb; #define INIT_PIXEL_PTR(P, X, Y) \ - GLubyte *P = (GLubyte *)drb->Base.Data + (Y) * drb->pitch + (X); + GLubyte *P = (GLubyte *)drb->Base.Data + (drb->Base.Height - (Y)) * drb->pitch + (X); #define INC_PIXEL_PTR(P) P += 1 #define STORE_PIXEL(DST, X, Y, VALUE) \ *DST = VALUE[0] |