src/video/SDL_blit_A.c
changeset 2074 9e6dc39f48b6
parent 2038 eb5aedc79992
child 2086 fffea8d6bf92
equal deleted inserted replaced
2073:790726541708 2074:9e6dc39f48b6
  1630     int srcskip = info->s_skip >> 2;
  1630     int srcskip = info->s_skip >> 2;
  1631     Uint32 *dstp = (Uint32 *) info->d_pixels;
  1631     Uint32 *dstp = (Uint32 *) info->d_pixels;
  1632     int dstskip = info->d_skip >> 2;
  1632     int dstskip = info->d_skip >> 2;
  1633     SDL_PixelFormat *sf = info->src;
  1633     SDL_PixelFormat *sf = info->src;
  1634     Uint32 amask = sf->Amask;
  1634     Uint32 amask = sf->Amask;
       
  1635     Uint32 ashift = sf->Ashift;
  1635 
  1636 
  1636     __asm__(
  1637     __asm__(
  1637                /* make mm6 all zeros. */
  1638                /* make mm6 all zeros. */
  1638                "pxor       %%mm6, %%mm6\n"
  1639                "pxor       %%mm6, %%mm6\n"
  1639                /* Make a mask to preserve the alpha. */
  1640                /* Make a mask to preserve the alpha. */
  1647                "packsswb  %%mm6, %%mm4\n\t"     /* 00000FFF -> mm4 (channel mask) */
  1648                "packsswb  %%mm6, %%mm4\n\t"     /* 00000FFF -> mm4 (channel mask) */
  1648                "packsswb  %%mm6, %%mm3\n\t"     /* 0000FFFF -> mm3 */
  1649                "packsswb  %%mm6, %%mm3\n\t"     /* 0000FFFF -> mm3 */
  1649                "pxor      %%mm4, %%mm3\n\t"     /* 0000F000 -> mm3 (~channel mask) */
  1650                "pxor      %%mm4, %%mm3\n\t"     /* 0000F000 -> mm3 (~channel mask) */
  1650                /* get alpha channel shift */
  1651                /* get alpha channel shift */
  1651                "movd      %1, %%mm5\n\t"        /* Ashift -> mm5 */
  1652                "movd      %1, %%mm5\n\t"        /* Ashift -> mm5 */
  1652   : /* nothing */ :            "m"(sf->Amask), "m"(sf->Ashift));
  1653   : /* nothing */ :            "m"(amask), "m"(ashift));
  1653 
  1654 
  1654     while (height--) {
  1655     while (height--) {
  1655 
  1656 
  1656 	    /* *INDENT-OFF* */
  1657 	    /* *INDENT-OFF* */
  1657 	    DUFFS_LOOP4({
  1658 	    DUFFS_LOOP4({