Additional Accelerated Sample Drivers

Like the S3Virge display driver, other display drivers provided in the Platform Builder demonstrate how to invoke hardware accelerations and how to make use of the emulation library.

The S3Trio64 driver is in the Platform\CEPC\Drivers\Display\S3Trio64 directory. The S3Trio64 driver demonstrates support for hardware accelerations and use of the emulation library. The driver also supports blit handling for both 8-bpp and 16-bpp destination surfaces. For example, in the case of a mask PATCOPY text blit with a 1-bpp mask, the driver uses the emulation library’s BltText16 function to handle the blit. With a 4-bpp mask, the driver uses the emulation library’s BltalphaText16 function.

if (pBltParms->pBlt == EmulatedBlt) {
#ifdef FB16BPP
    switch (pBltParms->rop4)
    {
        case 0xAAF0: 
// Special PATCOPY ROP for text output--fill where mask is set.
            // If the brush is not a pattern brush
            if( (pBltParms->solidColor != -1) &&
                (pBltParms->pDst->Format() == gpe16Bpp) )
            {
                WaitForNotBusy();
                if (pBltParms->pMask->Format() == gpe1Bpp)
                {
                    pBltParms->pBlt = 
FUNCNAME(BltText16);
                    return S_OK;
                }
                else   // Antialiased text
                {
                    pBltParms->pBlt = 
FUNCNAME(BltAlphaText16);
                    return S_OK;
                }
            }
            break;
        default:  // Other ROP4s
            ;
    }

For hardware accelerations and use of the emulation library, see the Citizen driver under Platform\ODO\Drivers\Display\Citizen.