vhwa.c revision cf5f6bf2704d4fff443139e10bccc6a0a7fa4b85
/* $Id$ */
/** @file
* VBoxGuest -- VirtualBox Win 2000/XP guest display driver
*
* Video HW Acceleration support functions.
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#include "driver.h"
#include "dd.h"
#include <winerror.h>
#define MEMTAG 'AWHV'
{
}
{
}
};
};
};
};
};
};
//static const uint32_t g_SupportedOverList[][2] = {
// VBOX_DD_VHWA_PAIR(OVER_DDFX),
// VBOX_DD_VHWA_PAIR(OVER_HIDE),
// VBOX_DD_VHWA_PAIR(OVER_KEYDEST),
// VBOX_DD_VHWA_PAIR(OVER_KEYDESTOVERRIDE),
// VBOX_DD_VHWA_PAIR(OVER_KEYSRC),
// VBOX_DD_VHWA_PAIR(OVER_KEYSRCOVERRIDE),
// VBOX_DD_VHWA_PAIR(OVER_SHOW)
//};
//
//static const uint32_t g_SupportedCKeyList[][2] = {
// VBOX_DD_VHWA_PAIR(CKEY_COLORSPACE),
// VBOX_DD_VHWA_PAIR(CKEY_DESTBLT),
// VBOX_DD_VHWA_PAIR(CKEY_DESTOVERLAY),
// VBOX_DD_VHWA_PAIR(CKEY_SRCBLTE),
// VBOX_DD_VHWA_PAIR(CKEY_SRCOVERLAY)
//};
static uint32_t g_SupportedVHWACaps;
static uint32_t g_SupportedVHWASCaps;
static uint32_t g_SupportedVHWAPFs;
static uint32_t g_SupportedVHWASDs;
static uint32_t g_SupportedDDCaps;
static uint32_t g_SupportedDDSCaps;
static uint32_t g_SupportedDDPFs;
static uint32_t g_SupportedDDSDs;
static uint32_t g_SupportedVHWACKeyCaps;
static uint32_t g_SupportedDDCKeyCaps;
static uint32_t g_SupportedOVERs;
static uint32_t g_SupportedCKEYs;
void vboxVHWAInit()
{
int i;
g_SupportedVHWACaps = 0;
g_SupportedVHWASCaps = 0;
g_SupportedVHWAPFs = 0;
g_SupportedVHWASDs = 0;
g_SupportedDDCaps = 0;
g_SupportedDDSCaps = 0;
g_SupportedDDPFs = 0;
g_SupportedDDSDs = 0;
for(i = 0; i < sizeof(g_SupportedCapList)/sizeof(g_SupportedCapList[0]); i++)
{
g_SupportedDDCaps |= g_SupportedCapList[i][0];
}
for(i = 0; i < sizeof(g_SupportedSCapList)/sizeof(g_SupportedSCapList[0]); i++)
{
g_SupportedDDSCaps |= g_SupportedSCapList[i][0];
}
for(i = 0; i < sizeof(g_SupportedPFList)/sizeof(g_SupportedPFList[0]); i++)
{
g_SupportedDDPFs |= g_SupportedPFList[i][0];
}
for(i = 0; i < sizeof(gSupportedSDList)/sizeof(gSupportedSDList[0]); i++)
{
g_SupportedDDSDs |= gSupportedSDList[i][0];
}
for(i = 0; i < sizeof(g_SupportedCKeyCapList)/sizeof(g_SupportedCKeyCapList[0]); i++)
{
g_SupportedDDCKeyCaps |= g_SupportedCKeyCapList[i][0];
}
}
void vboxVHWATerm()
{
}
{
return caps & (~g_SupportedDDCaps);
}
{
return caps & (~g_SupportedDDSCaps);
}
{
return caps & (~g_SupportedDDPFs);
}
{
return caps & (~g_SupportedDDSDs);
}
{
return caps & (~g_SupportedDDCKeyCaps);
}
{
return caps & (g_SupportedDDCKeyCaps);
}
{
return caps & (g_SupportedDDCaps);
}
{
return caps & (g_SupportedDDSCaps);
}
{
return caps & (g_SupportedDDPFs);
}
{
return caps & (g_SupportedDDSDs);
}
{
return caps & (g_SupportedOVERs);
}
{
return caps & (~g_SupportedOVERs);
}
{
return caps & (g_SupportedCKEYs);
}
{
return caps & (~g_SupportedCKEYs);
}
{
//TODO: fxFlags
}
{
int i;
for(i = 0; i < sizeof(g_SupportedCapList)/sizeof(g_SupportedCapList[0]); i++)
{
if(caps & g_SupportedCapList[i][0])
{
}
}
return vhwaCaps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedCapList)/sizeof(g_SupportedCapList[0]); i++)
{
{
vhwaCaps |= g_SupportedCapList[i][0];
}
}
return vhwaCaps;
}
{
return caps;
}
{
return caps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedSCapList)/sizeof(g_SupportedSCapList[0]); i++)
{
if(caps & g_SupportedSCapList[i][0])
{
}
}
return vhwaCaps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedSCapList)/sizeof(g_SupportedSCapList[0]); i++)
{
{
vhwaCaps |= g_SupportedSCapList[i][0];
}
}
return vhwaCaps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedPFList)/sizeof(g_SupportedPFList[0]); i++)
{
if(caps & g_SupportedPFList[i][0])
{
}
}
return vhwaCaps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedPFList)/sizeof(g_SupportedPFList[0]); i++)
{
{
vhwaCaps |= g_SupportedPFList[i][0];
}
}
return vhwaCaps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedCKeyCapList)/sizeof(g_SupportedCKeyCapList[0]); i++)
{
if(caps & g_SupportedCKeyCapList[i][0])
{
}
}
return vhwaCaps;
}
{
int i;
for(i = 0; i < sizeof(g_SupportedCKeyCapList)/sizeof(g_SupportedCKeyCapList[0]); i++)
{
{
vhwaCaps |= g_SupportedCKeyCapList[i][0];
}
}
return vhwaCaps;
}
{
return caps;
}
{
return caps;
}
{
// pVHWABlt->flags;
// uint32_t rop;
// uint32_t rotationOp;
// uint32_t rotation;
}
{
if(unsup)
return VERR_GENERAL_FAILURE;
return VINF_SUCCESS;
}
{
}
{
if(unsupds)
return VERR_GENERAL_FAILURE;
{
}
{
if(unsup)
return VERR_GENERAL_FAILURE;
}
{
}
{
}
{
}
{
}
{
}
{
}
{
}
{
if(RT_FAILURE(rc))
return rc;
}
return VINF_SUCCESS;
}
{
// Assert(pSrc->left <= pSrc->right);
// Assert(pSrc->top <= pSrc->bottom);
}
{
}
{
}
{
}
{
}
{
return false;
}
{
return false;
}
{
return true;
}
{
if(vboxVHWARectIsEmpty(pRect))
{
}
else
{
}
}
{
if(vboxVHWARectIsEmpty(pRect))
{
return;
}
{
}
else
{
}
}
{
}
{
}
{
}
{
return;
{
if(t < b)
{
}
else
{
}
}
{
if(l < r)
{
}
else
{
}
}
}