Subversion Repositories Kolibri OS

Rev

Rev 876 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1.  
  2. int Line(draw_t *draw)
  3. {
  4.      local_pixmap_t *dstpixmap;
  5.      clip_t clip;
  6.      int x0, y0, x1, y1;
  7.  
  8.      dstpixmap = (draw->dstpix == (void*)-1) ? &scr_pixmap : draw->dstpix ;
  9.  
  10.      x0 = draw->x0;
  11.      y0 = draw->y0;
  12.  
  13.      x1 = draw->x1;
  14.      y1 = draw->y1;
  15.  
  16.      clip.xmin = 0;
  17.      clip.ymin = 0;
  18.      clip.xmax = dstpixmap->width-1;
  19.      clip.ymax = dstpixmap->height-1;
  20.  
  21.      if ( !LineClip(&clip, &x0, &y0, &x1, &y1 ))
  22.      {
  23.         u32_t efl;
  24.         u32_t *ring, write;
  25.  
  26.         efl = safe_cli();
  27.  
  28. #if R300_PIO
  29.  
  30.         R5xxFIFOWait(6);
  31.  
  32.         OUTREG(R5XX_DP_GUI_MASTER_CNTL,
  33.                rhd.gui_control             |
  34.                R5XX_GMC_BRUSH_SOLID_COLOR  |
  35.                R5XX_GMC_SRC_DATATYPE_COLOR |
  36.                R5XX_GMC_CLR_CMP_CNTL_DIS   |
  37.                R5XX_GMC_WR_MSK_DIS         |
  38.                R5XX_ROP3_P
  39.               );
  40.  
  41.         OUTREG(R5XX_DST_LINE_PATCOUNT, 0x55 << R5XX_BRES_CNTL_SHIFT);
  42.  
  43.         OUTREG(R5XX_DP_BRUSH_FRGD_CLR, draw->color);
  44.         OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
  45.  
  46.         OUTREG(R5XX_DST_LINE_START,(y0<<16)|x0);
  47.         OUTREG(R5XX_DST_LINE_END,(y1<<16)|x1);
  48. #else
  49.        BEGIN_RING();
  50.          OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT_POLYLINE, 4));
  51.          OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  52.                   RADEON_GMC_BRUSH_SOLID_COLOR      |
  53.                   RADEON_GMC_DST_32BPP              |
  54.                   RADEON_GMC_SRC_DATATYPE_COLOR     |
  55.                   R5XX_GMC_CLR_CMP_CNTL_DIS         |
  56.                   R5XX_GMC_WR_MSK_DIS               |
  57.                   R5XX_ROP3_P);
  58.  
  59.          OUT_RING(dstpixmap->pitch_offset);
  60.          OUT_RING(draw->color);
  61.          OUT_RING((y0<<16)|x0);
  62.          OUT_RING((y1<<16)|x1);
  63.        COMMIT_RING();
  64.  
  65. #endif
  66.         safe_sti(efl);
  67.      };
  68.      return ERR_OK;
  69. }
  70.  
  71. int DrawRect(draw_t* draw)
  72. {
  73.      int x0, y0, x1, y1;
  74.  
  75.      local_pixmap_t *dstpixmap;
  76.      clip_t dst_clip;
  77.  
  78.      dstpixmap = (draw->dstpix == (void*)-1) ? &scr_pixmap : draw->dstpix ;
  79.  
  80.      x0 = draw->x0;
  81.      y0 = draw->y0;
  82.  
  83.      x1 = x0+draw->w-1;
  84.      y1 = y0+draw->h-1;
  85.  
  86.      dst_clip.xmin = 0;
  87.      dst_clip.ymin = 0;
  88.      dst_clip.xmax = dstpixmap->width-1;
  89.      dst_clip.ymax = dstpixmap->height-1;
  90.  
  91.  
  92. //  dbgprintf("draw rect x0:%d, y0:%d, x1:%d, y1:%d, color: %x\n",
  93. //             x0, y0, x1, y1, draw->color);
  94.  
  95.      if( ! BlockClip( &dst_clip, &x0, &y0, &x1, &y1))
  96.      {
  97.         u32_t *ring, write;
  98.         u32_t ifl;
  99.         int w, h;
  100.  
  101.         w = x1-x0+1;
  102.         h = y1-y0+1;
  103.  
  104.         ifl = safe_cli();
  105.  
  106. #if R300_PIO
  107.  
  108.         R5xxFIFOWait(6);
  109.  
  110.         OUTREG(R5XX_DP_GUI_MASTER_CNTL,
  111.                rhd.gui_control              |
  112.                R5XX_ROP3_P                  |
  113.                R5XX_GMC_BRUSH_SOLID_COLOR   |
  114.                R5XX_GMC_SRC_DATATYPE_COLOR  |
  115.                R5XX_GMC_CLR_CMP_CNTL_DIS    |
  116.                R5XX_GMC_WR_MSK_DIS
  117.               );
  118.  
  119.         OUTREG(R5XX_DP_BRUSH_FRGD_CLR, draw->color);
  120.         OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
  121.         OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
  122.         OUTREG(R5XX_DST_Y_X,(draw->y0<<16)|draw->x0);
  123.         OUTREG(R5XX_DST_WIDTH_HEIGHT,(w<<16)|h);
  124. #else
  125.       BEGIN_RING();
  126.         OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT_MULTI, 4));
  127.  
  128.         OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  129.                  RADEON_GMC_BRUSH_SOLID_COLOR      |
  130.                  RADEON_GMC_DST_32BPP              |
  131.                  RADEON_GMC_SRC_DATATYPE_COLOR     |
  132.                  R5XX_GMC_CLR_CMP_CNTL_DIS         |
  133.                  R5XX_GMC_WR_MSK_DIS               |
  134.                  R5XX_ROP3_P
  135.                 );
  136.  
  137.         OUT_RING(dstpixmap->pitch_offset);
  138.         OUT_RING(draw->color);
  139.         OUT_RING((draw->x0<<16)|y0);
  140.         OUT_RING((w<<16)|h);
  141.       COMMIT_RING();
  142. #endif
  143.         safe_sti(ifl);
  144.      };
  145.      return ERR_OK;
  146. }
  147.  
  148. int FillRect(fill_t *fill)
  149. {
  150.      local_pixmap_t *dstpixmap;
  151.      clip_t dst_clip;
  152.      int x0, y0, x1, y1;
  153.  
  154.      dstpixmap = (fill->dstpix == (void*)-1) ? &scr_pixmap : fill->dstpix ;
  155.  
  156.      x0 = fill->x;
  157.      y0 = fill->y;
  158.  
  159.      x1 = x0+fill->w-1;
  160.      y1 = y0+fill->h-1;
  161.  
  162.      dst_clip.xmin = 0;
  163.      dst_clip.ymin = 0;
  164.      dst_clip.xmax = dstpixmap->width-1;
  165.      dst_clip.ymax = dstpixmap->height-1;
  166.  
  167. //  dbgprintf("fill rect x0:%d, y0:%d, x1:%d, y1:%d\n",
  168. //             x0, y0, x1, y1);
  169.  
  170.      if( ! BlockClip(&dst_clip, &x0, &y0, &x1, &y1))
  171.      {
  172.         u32_t *ring, write;
  173.         u32_t ifl = safe_cli();
  174.  
  175. #if R300_PIO
  176.  
  177.         int w = x1-x0+1;
  178.         int h = y1-y0+1;
  179.  
  180.         R5xxFIFOWait(9);
  181.  
  182.         OUTREG(R5XX_DP_GUI_MASTER_CNTL,
  183.                RADEON_GMC_DST_PITCH_OFFSET_CNTL |
  184.                R5XX_GMC_BRUSH_8X8_MONO_FG_BG    |
  185.                RADEON_GMC_DST_32BPP             |
  186.                R5XX_GMC_SRC_DATATYPE_COLOR      |
  187.                R5XX_GMC_CLR_CMP_CNTL_DIS        |
  188.                R5XX_GMC_WR_MSK_DIS              |
  189.                R5XX_ROP3_P
  190.                );
  191.  
  192.         OUTREG(R5XX_DP_BRUSH_BKGD_CLR, fill->bkcolor);
  193.         OUTREG(R5XX_DP_BRUSH_FRGD_CLR, fill->fcolor);
  194.  
  195.         OUTREG(R5XX_BRUSH_DATA0, fill->bmp0);
  196.         OUTREG(R5XX_BRUSH_DATA1, fill->bmp1);
  197.  
  198.         OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
  199.         OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
  200.  
  201.         OUTREG(R5XX_DST_Y_X,(y0<<16)|x0);
  202.         OUTREG(R5XX_DST_HEIGHT_WIDTH,(h<<16)|w);
  203. #else
  204.       BEGIN_RING();
  205.         OUT_RING(CP_PACKET3(RADEON_CNTL_PAINT, 7));
  206.         OUT_RING(RADEON_GMC_DST_PITCH_OFFSET_CNTL    |
  207.                  R5XX_GMC_BRUSH_8X8_MONO_FG_BG       |
  208.                  RADEON_GMC_DST_32BPP                |
  209.                  RADEON_GMC_SRC_DATATYPE_COLOR       |
  210.                  R5XX_GMC_CLR_CMP_CNTL_DIS           |
  211.                  R5XX_GMC_WR_MSK_DIS                 |
  212.                  R5XX_ROP3_P
  213.                 );
  214.  
  215.         OUT_RING(dstpixmap->pitch_offset);
  216.         OUT_RING(fill->bkcolor);
  217.         OUT_RING(fill->fcolor);
  218.  
  219.         OUT_RING(fill->bmp0);
  220.         OUT_RING(fill->bmp1);
  221.  
  222.         OUT_RING((y0<<16)|x0);
  223.         OUT_RING((y1<<16)|x1);
  224.       COMMIT_RING();
  225.  
  226. #endif
  227.         safe_sti(ifl);
  228.      };
  229.      return ERR_OK;
  230. };
  231.  
  232. #if 0
  233. int Blit(blit_t *blit)
  234. {
  235.   int x0, y0, x1, y1;
  236.  
  237.   x0 = blit->src_x;
  238.   y0 = blit->src_y;
  239.  
  240.   x1 = x0+blit->w-1;
  241.   y1 = y0+blit->h-1;
  242.  
  243.  
  244.   if( ! BlockClip(&clip, &x0, &y0, &x1, &y1))
  245.   {
  246.      u32 *ring, write;
  247.      int w, h;
  248.      u32 ifl;
  249.  
  250.      w = x1-x0+1;
  251.      h = y1-y0+1;
  252.  
  253.      ifl = safe_cli();
  254.  
  255. #if R300_PIO
  256.  
  257.  
  258. #else
  259.  
  260.      BEGIN_RING();
  261.        OUT_RING(CP_PACKET3(RADEON_CNTL_BITBLT, 5));
  262.  
  263.        OUT_RING(RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
  264.                 RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  265.                 RADEON_GMC_BRUSH_NONE             |
  266.                 RADEON_GMC_DST_32BPP              |
  267.                 RADEON_GMC_SRC_DATATYPE_COLOR     |
  268.                 RADEON_DP_SRC_SOURCE_MEMORY       |
  269.                 (1 << 28)+(1 << 30) | R5XX_ROP3_S);
  270.  
  271.        OUT_RING(rhd.dst_pitch_offset);
  272.        OUT_RING(rhd.dst_pitch_offset);
  273.  
  274.        OUT_RING((x0<<16)|y0);
  275.        OUT_RING((blit->dst_x<<16)|blit->dst_y);
  276.        OUT_RING((w<<16)|h);
  277.      COMMIT_RING();
  278.  
  279. #endif
  280.  
  281.      safe_sti(ifl);
  282.   } ;
  283.   return ERR_OK;
  284. }
  285.  
  286. #endif
  287.  
  288.  
  289. #if 0
  290.  
  291. int LockPixmap(userpixmap_t *io)
  292. {
  293.    pixmap_t *pixmap;
  294.    size_t    size;
  295.    void     *usermap;
  296.  
  297.    dbgprintf("Lock pixmap %x\n", io->pixmap);
  298.  
  299.    if(io->pixmap == (pixmap_t*)-1)
  300.      return ERR_PARAM;
  301.    else
  302.      pixmap = io->pixmap;
  303.  
  304.    if( (pixmap->flags & 1) == PX_LOCK )
  305.      return ERR_PARAM;
  306.  
  307.    size = (pixmap->pitch*pixmap->width+4095) & ~ 4095;
  308.    if (usermap = UserAlloc(size))
  309.    {
  310.      CommitPages(usermap, ((u32_t)pixmap->raw+rhd.PhisBase)|7|(1<<9), size);
  311.      pixmap->flags |= PX_LOCK;
  312.      pixmap->usermap = usermap;
  313.      io->usermap = usermap;
  314.      io->pitch   = pixmap->pitch;
  315.      dbgprintf("map at %x\n", io->usermap);
  316.  
  317.      return ERR_OK;
  318.    }
  319.    else
  320.      return ERR_PARAM;
  321. };
  322.  
  323. int UnlockPixmap(userpixmap_t *io)
  324. {
  325.   pixmap_t *pixmap;
  326.   size_t    size;
  327.  
  328.   dbgprintf("Unlock pixmap %x\n", io->pixmap);
  329.  
  330.   if(io->pixmap == (pixmap_t*)-1)
  331.     return ERR_PARAM;
  332.   else
  333.     pixmap = io->pixmap;
  334.  
  335.   if( (pixmap->flags & 1) != PX_LOCK )
  336.     return ERR_PARAM;
  337.  
  338. /*   Sanity checks  */
  339.  
  340.   if( (pixmap->usermap == 0)||
  341.       ((u32_t)pixmap->usermap >= 0x80000000) ||
  342.       ((u32_t)pixmap->usermap & 4095)
  343.     )
  344.     return ERR_PARAM;
  345.  
  346.   size = (pixmap->pitch*pixmap->width+4095) & ~ 4095;
  347.  
  348.   UnmapPages(pixmap->usermap, size);
  349.   UserFree(pixmap->usermap);
  350.   pixmap->usermap =  NULL;
  351.   pixmap->flags  &= ~PX_LOCK;
  352.   io->usermap     =  NULL;
  353.   io->pitch       =  0;
  354.  
  355.   return ERR_OK;
  356. };
  357.  
  358. #endif
  359.  
  360. int PixBlit(pixblit_t *blit)
  361. {
  362.      clip_t src_clip, dst_clip;
  363.  
  364.      local_pixmap_t *srcpixmap;
  365.      local_pixmap_t *dstpixmap;
  366.  
  367.      //dbgprintf("Pixblit src: %x dst: %x\n",blit->srcpix, blit->dstpix);
  368.  
  369.      dstpixmap = (blit->dstpix == (void*)-1) ? &scr_pixmap : blit->dstpix ;
  370.      srcpixmap = (blit->srcpix == (void*)-1) ? &scr_pixmap : blit->srcpix ;
  371.  
  372.      //dbgprintf("srcpixmap: %x dstpixmap: %x\n",srcpixmap, dstpixmap);
  373.  
  374.      //dbgprintf("dst.width: %d dst.height: %d\n", dstpixmap->width,dstpixmap->height);
  375.      //dbgprintf("src.width: %d src.height: %d\n", srcpixmap->width,srcpixmap->height);
  376.      //dbgprintf("srcpitch: %x dstpitch: %x\n",
  377.      //           srcpixmap->pitch_offset,dstpixmap->pitch_offset);
  378.  
  379.      src_clip.xmin = 0;
  380.      src_clip.ymin = 0;
  381.      src_clip.xmax = srcpixmap->width-1;
  382.      src_clip.ymax = srcpixmap->height-1;
  383.  
  384.      dst_clip.xmin = 0;
  385.      dst_clip.ymin = 0;
  386.      dst_clip.xmax = dstpixmap->width-1;
  387.      dst_clip.ymax = dstpixmap->height-1;
  388.  
  389.      if( !blit_clip(&dst_clip, &blit->dst_x, &blit->dst_y,
  390.                     &src_clip, &blit->src_x, &blit->src_y,
  391.                     &blit->w, &blit->h) )
  392.      {
  393.         u32_t *ring, write;
  394.  
  395.         u32_t ifl = safe_cli();
  396.  
  397. #if R300_PIO
  398.  
  399.         R5xxFIFOWait(7);
  400.  
  401.         OUTREG(R5XX_DP_GUI_MASTER_CNTL,
  402.                RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
  403.                RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  404.                RADEON_GMC_BRUSH_NONE             |
  405.                RADEON_GMC_DST_32BPP              |
  406.                RADEON_GMC_SRC_DATATYPE_COLOR     |
  407.                RADEON_DP_SRC_SOURCE_MEMORY       |
  408.                R5XX_GMC_CLR_CMP_CNTL_DIS         |
  409.                R5XX_GMC_WR_MSK_DIS               |
  410.                R5XX_ROP3_S
  411.               );
  412.  
  413.         OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
  414.  
  415.         OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
  416.         OUTREG(R5XX_SRC_PITCH_OFFSET, srcpixmap->pitch_offset);
  417.  
  418.         OUTREG(R5XX_SRC_Y_X,(blit->src_y<<16)|blit->src_x);
  419.         OUTREG(R5XX_DST_Y_X,(blit->dst_y<<16)|blit->dst_x);
  420.         OUTREG(R5XX_DST_HEIGHT_WIDTH,(blit->h<<16)|blit->w);
  421.  
  422. #else
  423.  
  424.         BEGIN_RING();
  425.           OUT_RING(CP_PACKET3(RADEON_CNTL_BITBLT, 5));
  426.  
  427.           OUT_RING(RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
  428.                    RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  429.                    RADEON_GMC_BRUSH_NONE             |
  430.                    RADEON_GMC_DST_32BPP              |
  431.                    RADEON_GMC_SRC_DATATYPE_COLOR     |
  432.                    RADEON_DP_SRC_SOURCE_MEMORY       |
  433.                    R5XX_GMC_CLR_CMP_CNTL_DIS         |
  434.                    R5XX_GMC_WR_MSK_DIS               |
  435.                    R5XX_ROP3_S
  436.                   );
  437.  
  438.           OUT_RING(srcpixmap->pitch_offset);
  439.           OUT_RING(dstpixmap->pitch_offset);
  440.  
  441.           OUT_RING((blit->src_x<<16)|blit->src_y);
  442.           OUT_RING((blit->dst_x<<16)|blit->dst_y);
  443.           OUT_RING((blit->w<<16)|blit->h);
  444.         COMMIT_RING();
  445.  
  446. #endif
  447.        safe_sti(ifl);
  448.      };
  449.      return ERR_OK;
  450. };
  451.  
  452.  
  453. int TransBlit(pixblit_t *blit)
  454. {
  455.      clip_t src_clip, dst_clip;
  456.  
  457.      local_pixmap_t *srcpixmap;
  458.      local_pixmap_t *dstpixmap;
  459.  
  460.     // dbgprintf("Transblit src: %x dst: %x\n",blit->srcpix, blit->dstpix);
  461.  
  462.      dstpixmap = (blit->dstpix == (void*)-1) ? &scr_pixmap : blit->dstpix ;
  463.      srcpixmap = (blit->srcpix == (void*)-1) ? &scr_pixmap : blit->srcpix ;
  464.  
  465.      //dbgprintf("srcpixmap: %x dstpixmap: %x\n",srcpixmap, dstpixmap);
  466.  
  467.      //dbgprintf("dst.width: %d dst.height: %d\n", dstpixmap->width,dstpixmap->height);
  468.      //dbgprintf("src.width: %d src.height: %d\n", srcpixmap->width,srcpixmap->height);
  469.      //dbgprintf("srcpitch: %x dstpitch: %x\n",
  470.      //           srcpixmap->pitch_offset,dstpixmap->pitch_offset);
  471.      src_clip.xmin = 0;
  472.      src_clip.ymin = 0;
  473.      src_clip.xmax = srcpixmap->width-1;
  474.      src_clip.ymax = srcpixmap->height-1;
  475.  
  476.      dst_clip.xmin = 0;
  477.      dst_clip.ymin = 0;
  478.      dst_clip.xmax = dstpixmap->width-1;
  479.      dst_clip.ymax = dstpixmap->height-1;
  480.  
  481.      if( !blit_clip(&dst_clip, &blit->dst_x, &blit->dst_y,
  482.                     &src_clip, &blit->src_x, &blit->src_y,
  483.                     &blit->w, &blit->h) )
  484.      {
  485.         u32_t *ring, write;
  486.  
  487.         u32_t ifl = safe_cli();
  488.  
  489. #if R300_PIO
  490.  
  491.         R5xxFIFOWait(10);
  492.  
  493.         OUTREG(R5XX_DP_GUI_MASTER_CNTL,
  494.                RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
  495.                RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  496.                RADEON_GMC_BRUSH_NONE             |
  497.                RADEON_GMC_DST_32BPP              |
  498.                RADEON_GMC_SRC_DATATYPE_COLOR     |
  499.                RADEON_DP_SRC_SOURCE_MEMORY       |
  500.                R5XX_GMC_WR_MSK_DIS               |
  501.                R5XX_ROP3_S
  502.               );
  503.  
  504.         OUTREG(R5XX_DP_CNTL, R5XX_DST_X_LEFT_TO_RIGHT | R5XX_DST_Y_TOP_TO_BOTTOM);
  505.  
  506.         OUTREG(R5XX_CLR_CMP_CLR_SRC, 0xFF000000);
  507.         OUTREG(R5XX_CLR_CMP_MASK, R5XX_CLR_CMP_MSK);
  508.         OUTREG(R5XX_CLR_CMP_CNTL, R5XX_SRC_CMP_EQ_COLOR | R5XX_CLR_CMP_SRC_SOURCE);
  509.  
  510.         OUTREG(R5XX_DST_PITCH_OFFSET, dstpixmap->pitch_offset);
  511.         OUTREG(R5XX_SRC_PITCH_OFFSET, srcpixmap->pitch_offset);
  512.  
  513.         OUTREG(R5XX_SRC_Y_X,(blit->src_y<<16)|blit->src_x);
  514.         OUTREG(R5XX_DST_Y_X,(blit->dst_y<<16)|blit->dst_x);
  515.         OUTREG(R5XX_DST_HEIGHT_WIDTH,(blit->h<<16)|blit->w);
  516.  
  517. #else
  518.  
  519.         BEGIN_RING();
  520.           OUT_RING(CP_PACKET3(RADEON_CNTL_TRANBLT, 8));
  521.  
  522.           OUT_RING(RADEON_GMC_SRC_PITCH_OFFSET_CNTL  |
  523.                    RADEON_GMC_DST_PITCH_OFFSET_CNTL  |
  524.                    RADEON_GMC_BRUSH_NONE             |
  525.                    RADEON_GMC_DST_32BPP              |
  526.                    RADEON_GMC_SRC_DATATYPE_COLOR     |
  527.                    RADEON_DP_SRC_SOURCE_MEMORY       |
  528.                    R5XX_GMC_WR_MSK_DIS               |
  529.                    R5XX_ROP3_S
  530.                   );
  531.  
  532.           OUT_RING(srcpixmap->pitch_offset);
  533.           OUT_RING(dstpixmap->pitch_offset);
  534.  
  535.           OUT_RING(R5XX_CLR_CMP_SRC_SOURCE | R5XX_SRC_CMP_EQ_COLOR);
  536.           OUT_RING(0xFF000000);
  537.           OUT_RING(0xFF000000);
  538.  
  539.           OUT_RING((blit->src_x<<16)|blit->src_y);
  540.           OUT_RING((blit->dst_x<<16)|blit->dst_y);
  541.           OUT_RING((blit->w<<16)|blit->h);
  542.  
  543.         COMMIT_RING();
  544.  
  545. #endif
  546.  
  547.        safe_sti(ifl);
  548.      };
  549.      return ERR_OK;
  550. }
  551.  
  552.