Changeset 30161 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Display
- Timestamp:
- Jun 11, 2010 1:59:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Display/wddm/VBoxDispD3D.cpp
r30152 r30161 35 35 #endif 36 36 37 /*#define VBOXWDDMDISP_WITH_TMPWORKAROUND 1*/ 38 37 39 static FORMATOP gVBoxFormatOps3D[] = { 38 40 {D3DDDIFMT_A8R8G8B8, … … 995 997 } 996 998 997 D3DTEXTURESTAGESTATETYPE vboxDDI2D3DTestureStageStateType(D3DDDITEXTURESTAGESTATETYPE enmType) 998 { 999 /* @todo: @fixme: not entirely correct, need to check */ 1000 return (D3DTEXTURESTAGESTATETYPE)enmType; 999 VBOXWDDMDISP_TSS_LOOKUP vboxDDI2D3DTestureStageStateType(D3DDDITEXTURESTAGESTATETYPE enmType) 1000 { 1001 static const VBOXWDDMDISP_TSS_LOOKUP lookup[] = 1002 { 1003 {FALSE, D3DTSS_FORCE_DWORD}, /* 0, D3DDDITSS_TEXTUREMAP */ 1004 {FALSE, D3DTSS_COLOROP}, /* 1, D3DDDITSS_COLOROP */ 1005 {FALSE, D3DTSS_COLORARG1}, /* 2, D3DDDITSS_COLORARG1 */ 1006 {FALSE, D3DTSS_COLORARG2}, /* 3, D3DDDITSS_COLORARG2 */ 1007 {FALSE, D3DTSS_ALPHAOP}, /* 4, D3DDDITSS_ALPHAOP */ 1008 {FALSE, D3DTSS_ALPHAARG1}, /* 5, D3DDDITSS_ALPHAARG1 */ 1009 {FALSE, D3DTSS_ALPHAARG2}, /* 6, D3DDDITSS_ALPHAARG2 */ 1010 {FALSE, D3DTSS_BUMPENVMAT00}, /* 7, D3DDDITSS_BUMPENVMAT00 */ 1011 {FALSE, D3DTSS_BUMPENVMAT01}, /* 8, D3DDDITSS_BUMPENVMAT01 */ 1012 {FALSE, D3DTSS_BUMPENVMAT10}, /* 9, D3DDDITSS_BUMPENVMAT10 */ 1013 {FALSE, D3DTSS_BUMPENVMAT11}, /* 10, D3DDDITSS_BUMPENVMAT11 */ 1014 {FALSE, D3DTSS_TEXCOORDINDEX}, /* 11, D3DDDITSS_TEXCOORDINDEX */ 1015 {FALSE, D3DTSS_FORCE_DWORD}, /* 12, unused */ 1016 {TRUE, D3DSAMP_ADDRESSU}, /* 13, D3DDDITSS_ADDRESSU */ 1017 {TRUE, D3DSAMP_ADDRESSV}, /* 14, D3DDDITSS_ADDRESSV */ 1018 {TRUE, D3DSAMP_BORDERCOLOR}, /* 15, D3DDDITSS_BORDERCOLOR */ 1019 {TRUE, D3DSAMP_MAGFILTER}, /* 16, D3DDDITSS_MAGFILTER */ 1020 {TRUE, D3DSAMP_MINFILTER}, /* 17, D3DDDITSS_MINFILTER */ 1021 {TRUE, D3DSAMP_MIPFILTER}, /* 18, D3DDDITSS_MIPFILTER */ 1022 {TRUE, D3DSAMP_MIPMAPLODBIAS}, /* 19, D3DDDITSS_MIPMAPLODBIAS */ 1023 {TRUE, D3DSAMP_MAXMIPLEVEL}, /* 20, D3DDDITSS_MAXMIPLEVEL */ 1024 {TRUE, D3DSAMP_MAXANISOTROPY}, /* 21, D3DDDITSS_MAXANISOTROPY */ 1025 {FALSE, D3DTSS_BUMPENVLSCALE}, /* 22, D3DDDITSS_BUMPENVLSCALE */ 1026 {FALSE, D3DTSS_BUMPENVLOFFSET}, /* 23, D3DDDITSS_BUMPENVLOFFSET */ 1027 {FALSE, D3DTSS_TEXTURETRANSFORMFLAGS}, /* 24, D3DDDITSS_TEXTURETRANSFORMFLAGS */ 1028 {TRUE, D3DSAMP_ADDRESSW}, /* 25, D3DDDITSS_ADDRESSW */ 1029 {FALSE, D3DTSS_COLORARG0}, /* 26, D3DDDITSS_COLORARG0 */ 1030 {FALSE, D3DTSS_ALPHAARG0}, /* 27, D3DDDITSS_ALPHAARG0 */ 1031 {FALSE, D3DTSS_RESULTARG}, /* 28, D3DDDITSS_RESULTARG */ 1032 {FALSE, D3DTSS_FORCE_DWORD}, /* 29, D3DDDITSS_SRGBTEXTURE */ 1033 {FALSE, D3DTSS_FORCE_DWORD}, /* 30, D3DDDITSS_ELEMENTINDEX */ 1034 {FALSE, D3DTSS_FORCE_DWORD}, /* 31, D3DDDITSS_DMAPOFFSET */ 1035 {FALSE, D3DTSS_CONSTANT}, /* 32, D3DDDITSS_CONSTANT */ 1036 {FALSE, D3DTSS_FORCE_DWORD}, /* 33, D3DDDITSS_DISABLETEXTURECOLORKEY */ 1037 {FALSE, D3DTSS_FORCE_DWORD}, /* 34, D3DDDITSS_TEXTURECOLORKEYVAL */ 1038 }; 1039 1040 return lookup[enmType]; 1001 1041 } 1002 1042 … … 1429 1469 Assert(pDevice); 1430 1470 Assert(pDevice->pDevice9If); 1431 HRESULT hr = pDevice->pDevice9If->SetTextureStageState(pData->Stage, vboxDDI2D3DTestureStageStateType(pData->State), pData->Value); 1471 1472 VBOXWDDMDISP_TSS_LOOKUP lookup = vboxDDI2D3DTestureStageStateType(pData->State); 1473 HRESULT hr; 1474 1475 if (!lookup.bSamplerState) 1476 { 1477 hr = pDevice->pDevice9If->SetTextureStageState(pData->Stage, D3DTEXTURESTAGESTATETYPE(lookup.dType), pData->Value); 1478 } 1479 else 1480 { 1481 hr = pDevice->pDevice9If->SetSamplerState(pData->Stage, D3DSAMPLERSTATETYPE(lookup.dType), pData->Value); 1482 } 1483 1432 1484 Assert(hr == S_OK); 1433 1485 vboxVDbgPrintF(("<== "__FUNCTION__", hDevice(0x%p), hr(0x%x)\n", hDevice, hr));
Note:
See TracChangeset
for help on using the changeset viewer.