Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 809 → Rev 810

/programs/system/drivers/ati2d/accel_2d.h
2,7 → 2,9
#define FILL_RECT 1
#define DRAW_RECT 2
#define LINE_2P 3
#define BLIT 4
 
 
typedef unsigned int color_t;
typedef unsigned int u32_t;
 
31,6 → 33,16
 
typedef struct
{
int src_x;
int src_y;
int dst_x;
int dst_y;
int w;
int h;
}blit_t;
 
typedef struct
{
int x0;
int y0;
int x1;
46,6 → 58,7
 
int Line2P(line2p_t *draw);
 
int Blit(blit_t *blit);
 
# define RADEON_GMC_SRC_PITCH_OFFSET_CNTL (1 << 0)
# define RADEON_GMC_DST_PITCH_OFFSET_CNTL (1 << 1)
66,6 → 79,8
#define RADEON_CP_PACKET3 0xC0000000
 
# define RADEON_CNTL_PAINT 0x00009100
# define RADEON_CNTL_BITBLT 0x00009200
 
# define RADEON_CNTL_PAINT_POLYLINE 0x00009500
# define RADEON_CNTL_PAINT_MULTI 0x00009A00
 
/programs/system/drivers/ati2d/accel_2d.inc
100,14 → 100,6
OUT_RING(fill->bmp0);
OUT_RING(fill->bmp1);
 
// OUT_RING(0xCCCC3333);
// OUT_RING(0xCCCC3333);
// OUT_RING(~0x11884422);
// OUT_RING(~0x11884422);
 
// OUT_RING(0x88112244);
// OUT_RING(0x88112244);
 
OUT_RING((y0<<16)|x0);
OUT_RING((y1<<16)|x1);
COMMIT_RING();
117,8 → 109,52
return 0;
}
 
int Blit(blit_t *blit)
{
int x0, y0, x1, y1;
 
x0 = blit->src_x;
y0 = blit->src_y;
 
x1 = x0+blit->w-1;
y1 = y0+blit->h-1;
 
 
if( ! BlockClip( &x0, &y0, &x1, &y1))
{
u32 *ring, write;
int w, h;
u32 ifl;
 
w = x1-x0+1;
h = y1-y0+1;
 
ifl = safe_cli();
 
BEGIN_RING();
OUT_RING(CP_PACKET3(RADEON_CNTL_BITBLT, 5));
 
OUT_RING(RADEON_GMC_SRC_PITCH_OFFSET_CNTL |
RADEON_GMC_DST_PITCH_OFFSET_CNTL |
RADEON_GMC_BRUSH_NONE |
RADEON_GMC_DST_32BPP |
RADEON_GMC_SRC_DATATYPE_COLOR |
RADEON_DP_SRC_SOURCE_MEMORY |
(1 << 28)+(1 << 30) | R5XX_ROP3_S);
 
OUT_RING(rhd.dst_pitch_offset);
OUT_RING(rhd.dst_pitch_offset);
 
OUT_RING((x0<<16)|y0);
OUT_RING((blit->dst_x<<16)|blit->dst_y);
OUT_RING((w<<16)|h);
COMMIT_RING();
 
safe_sti(ifl);
} ;
return 0;
}
 
int Line2P(line2p_t *draw)
{
 
/programs/system/drivers/ati2d/ati2d.c
138,14 → 138,19
return DrawRect((draw_t*)inp);
break;
 
case FILL_RECT:
if(io->inp_size==8)
return FillRect((fill_t*)inp);
break;
 
case LINE_2P:
if(io->inp_size==5)
return Line2P((line2p_t*)inp);
break;
 
case FILL_RECT:
if(io->inp_size==8)
return FillRect((fill_t*)inp);
case BLIT:
if(io->inp_size==6)
return Blit((blit_t*)inp);
break;
 
default: