diff options
author | Keith Whitwell <[email protected]> | 1999-09-17 15:14:02 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 1999-09-17 15:14:02 +0000 |
commit | 39d29fe7fec304fa3638db15b868ebbcb8292167 (patch) | |
tree | 26b79fbaa5d458a5194d042ab45b92f53d276ed6 /src/mesa/drivers | |
parent | ecaf1a0865e24d4f3f82cf076c54c033f68a4914 (diff) |
Fix for write-rgba-span and others
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/glide/fxddspan.c | 70 |
1 files changed, 48 insertions, 22 deletions
diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c index fc7c38d5c44..21b48ae789b 100644 --- a/src/mesa/drivers/glide/fxddspan.c +++ b/src/mesa/drivers/glide/fxddspan.c @@ -42,39 +42,65 @@ #if !defined(FXMESA_USE_ARGB) - #define LFB_WRITE_SPAN_MESA(dst_buffer,dst_x,dst_y,src_width,src_stride,src_data) \ - grLfbWriteRegion(dst_buffer,dst_x,dst_y,src_width,1,GR_LFB_SRC_FMT_8888,src_stride,src_data) +/* KW: Rearranged the args in the call to grLfbWriteRegion(). + */ +#define LFB_WRITE_SPAN_MESA(dst_buffer, \ + dst_x, \ + dst_y, \ + src_width, \ + src_stride, \ + src_data) \ + grLfbWriteRegion(dst_buffer, \ + dst_x, \ + dst_y, \ + GR_LFB_SRC_FMT_8888, \ + src_width, \ + 1, \ + src_stride, \ + src_data) \ + + #else /* defined(FXMESA_USE_RGBA) */ - #define MESACOLOR_TO_ARGB(c) ( \ - ( ((unsigned int)(c[ACOMP]))<<24 ) | \ - ( ((unsigned int)(c[RCOMP]))<<16 ) | \ - ( ((unsigned int)(c[GCOMP]))<<8 ) | \ +#define MESACOLOR_TO_ARGB(c) ( \ + ( ((unsigned int)(c[ACOMP]))<<24 ) | \ + ( ((unsigned int)(c[RCOMP]))<<16 ) | \ + ( ((unsigned int)(c[GCOMP]))<<8 ) | \ ( (unsigned int)(c[BCOMP])) ) - /* inline */ void LFB_WRITE_SPAN_MESA(GrBuffer_t dst_buffer, - FxU32 dst_x, FxU32 dst_y, - /* GrLfbSrcFmt_t src_format, format is GR_LFB_SRC_FMT_8888 */ - FxU32 src_width,/* FxU32 src_height, height is 1 */ - FxI32 src_stride, void *src_data ) - { - /* Covert to ARGB */ - GLubyte (*rgba)[4] = src_data; - GLuint argb[MAX_WIDTH]; - int i; +void LFB_WRITE_SPAN_MESA(GrBuffer_t dst_buffer, + FxU32 dst_x, + FxU32 dst_y, + FxU32 src_width, + FxI32 src_stride, + void *src_data ) +{ + /* Covert to ARGB */ + GLubyte (*rgba)[4] = src_data; + GLuint argb[MAX_WIDTH]; + int i; - for (i = 0; i < src_width; i++) - { - argb[i] = MESACOLOR_TO_ARGB(rgba[i]); - } - FX_grLfbWriteRegion(dst_buffer,dst_x,dst_y,GR_LFB_SRC_FMT_8888,src_width,1,src_stride,(void*)argb); - } + for (i = 0; i < src_width; i++) + { + argb[i] = MESACOLOR_TO_ARGB(rgba[i]); + } + FX_grLfbWriteRegion(dst_buffer, + dst_x, + dst_y, + GR_LFB_SRC_FMT_8888, + src_width, + 1, + src_stride, + (void*)argb); +} + #endif /************************************************************************/ /***** Span functions *****/ /************************************************************************/ + static void fxDDWriteRGBASpan(const GLcontext *ctx, GLuint n, GLint x, GLint y, const GLubyte rgba[][4], const GLubyte mask[]) |