From a791f3f85476f9da40aa3177c94facfab89fa24d Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Tue, 24 Oct 2023 23:20:49 -0700 Subject: [PATCH] Clarifying D3D Enumeration API. D3D is enumerating displays, not render devices. --- .../FeatureLib/pfDXPipeline/plDXEnumerate.cpp | 76 ++++----- .../FeatureLib/pfDXPipeline/plDXEnumerate.h | 46 +++--- .../FeatureLib/pfDXPipeline/plDXPipeline.cpp | 156 +++++++++--------- .../FeatureLib/pfDXPipeline/plDXPipeline.h | 12 +- .../plPipeline/hsG3DDeviceSelector.cpp | 4 +- .../plPipeline/hsG3DDeviceSelector.h | 14 +- 6 files changed, 154 insertions(+), 154 deletions(-) diff --git a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.cpp b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.cpp index 13babbef9f..23b9525667 100644 --- a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.cpp +++ b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.cpp @@ -63,16 +63,16 @@ const D3DFORMAT hsGDirect3DTnLEnumerate::kDisplayFormats[] = bool hsGDirect3DTnLEnumerate::SelectFromDevMode(const hsG3DDeviceRecord* devRec, const hsG3DDeviceMode* devMode) { - for (size_t i = 0; i < GetNumDrivers(); i++) + for (size_t i = 0; i < GetNumDisplays(); i++) { - if (devRec->GetDriverDesc().compare_i(GetDriver(i)->fAdapterInfo.Description) == 0) + if (devRec->GetDriverDesc().compare_i(GetDisplay(i)->fAdapterInfo.Description) == 0) { - for (D3DEnum_DeviceInfo& device : GetDriver(i)->fDevices) + for (D3DEnum_RendererInfo& device : GetDisplay(i)->fRenderers) { if (devRec->GetDeviceDesc().compare_i(device.fStrName) == 0) { - SetCurrentDriver(GetDriver(i)); - SetCurrentDevice(&device); + SetCurrentDisplay(GetDisplay(i)); + SetCurrentRenderer(&device); D3DEnum_SelectDefaultMode( devMode->GetWidth(), devMode->GetHeight(), @@ -98,17 +98,17 @@ bool hsGDirect3DTnLEnumerate::SelectFromDevMode(const hsG3DDeviceRecord* devRec, enumFlags |= D3DENUM_CANWINDOW; enumFlags |= D3DENUM_TNLHAL; - D3DEnum_SelectDefaultDriver(enumFlags); + D3DEnum_SelectDefaultDisplay(enumFlags); // If we didn't get what we want, try for anything. - if( !GetCurrentDriver() || !GetCurrentDevice() ) + if( !GetCurrentDisplay() || !GetCurrentRenderer() ) { enumFlags = colorDepth ? 0 : D3DENUM_CANWINDOW; - D3DEnum_SelectDefaultDriver(enumFlags); + D3DEnum_SelectDefaultDisplay(enumFlags); } - if( !GetCurrentDriver() || !GetCurrentDevice() ) - D3DEnum_SelectDefaultDriver(0); - if( !GetCurrentDriver() || !GetCurrentDevice() ) + if( !GetCurrentDisplay() || !GetCurrentRenderer() ) + D3DEnum_SelectDefaultDisplay(0); + if( !GetCurrentDisplay() || !GetCurrentRenderer() ) { if( !*GetEnumeErrorStr() ) SetEnumeErrorStr("Error finding device"); @@ -127,7 +127,7 @@ bool hsGDirect3DTnLEnumerate::SelectFromDevMode(const hsG3DDeviceRecord* devRec, HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultMode(int width, int height, int depth) { - hsAssert(GetCurrentDriver() && GetCurrentDevice(), "Must have selected device already"); + hsAssert(GetCurrentDisplay() && GetCurrentRenderer(), "Must have selected device already"); BOOL windowed = false; if (depth == 0) @@ -137,7 +137,7 @@ HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultMode(int width, int height depth = 32; } - D3DEnum_DeviceInfo* device = GetCurrentDevice(); + D3DEnum_RendererInfo* device = GetCurrentRenderer(); for (D3DEnum_ModeInfo& mode : device->fModes) { if (mode.fWindowed != windowed) @@ -155,7 +155,7 @@ HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultMode(int width, int height if( GetCurrentMode() ) { - D3DEnum_ModeInfo* curMode = GetCurrentDriver()->fCurrentMode; + D3DEnum_ModeInfo* curMode = GetCurrentDisplay()->fCurrentMode; if( depth ) { if (curMode->fDDmode.Width > mode.fDDmode.Width) @@ -177,14 +177,14 @@ HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultMode(int width, int height // Name: D3DEnum_SelectDefaultDriver() // Desc: Picks a default driver according to the passed in flags. //----------------------------------------------------------------------------- -HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultDriver( DWORD dwFlags ) +HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultDisplay( DWORD dwFlags ) { // If a specific driver was requested, perform that search here if( dwFlags & D3DENUM_MASK ) { - for (D3DEnum_DriverInfo& driver : fDrivers) + for (D3DEnum_DisplayInfo& driver : fDisplays) { - for (D3DEnum_DeviceInfo& device : driver.fDevices) + for (D3DEnum_RendererInfo& device : driver.fRenderers) { BOOL bFound = FALSE; @@ -203,7 +203,7 @@ HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultDriver( DWORD dwFlags ) { if( dwFlags & D3DENUM_CANWINDOW ) { - if ((&driver == &fDrivers[0])) + if ((&driver == &fDisplays[0])) { if ((device.fDDCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) ^ !(dwFlags & D3DENUM_TNLHAL) ) @@ -213,21 +213,21 @@ HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultDriver( DWORD dwFlags ) else if( dwFlags & D3DENUM_PRIMARYHAL ) { - if (&driver == &fDrivers[0]) + if (&driver == &fDisplays[0]) bFound = TRUE; } else if( dwFlags & D3DENUM_SECONDARYHAL ) { - if (&driver != &fDrivers[0]) + if (&driver != &fDisplays[0]) bFound = TRUE; } } if( bFound ) { - SetCurrentDriver(&driver); - SetCurrentDevice(&device); + SetCurrentDisplay(&driver); + SetCurrentRenderer(&device); return S_OK; } } @@ -235,15 +235,15 @@ HRESULT hsGDirect3DTnLEnumerate::D3DEnum_SelectDefaultDriver( DWORD dwFlags ) return D3DENUMERR_NOTFOUND; } - for (D3DEnum_DriverInfo& driver : fDrivers) + for (D3DEnum_DisplayInfo& driver : fDisplays) { - for (D3DEnum_DeviceInfo& device : driver.fDevices) + for (D3DEnum_RendererInfo& device : driver.fRenderers) { if (!device.fIsHardware) continue; - SetCurrentDriver(&driver); - SetCurrentDevice(&device); + SetCurrentDisplay(&driver); + SetCurrentRenderer(&device); return S_OK; } @@ -262,8 +262,8 @@ hsGDirect3DTnLEnumerate::hsGDirect3DTnLEnumerate() { memset( &fEnumeErrorStr[0], 0x00, sizeof(fEnumeErrorStr) ); - fCurrentDriver = nullptr; // The selected DD driver - fDrivers.clear(); // List of DD drivers + fCurrentDisplay = nullptr; // The selected DD driver + fDisplays.clear(); // List of DD drivers // Create a D3D object to use IDirect3D9* pD3D = hsGDirect3D::GetDirect3D(); @@ -277,7 +277,7 @@ hsGDirect3DTnLEnumerate::hsGDirect3DTnLEnumerate() UINT iAdapter; for( iAdapter = 0; iAdapter < pD3D->GetAdapterCount(); iAdapter++ ) { - D3DEnum_DriverInfo& newDriver = fDrivers.emplace_back(); + D3DEnum_DisplayInfo& newDriver = fDisplays.emplace_back(); // Copy data to a device info structure D3DADAPTER_IDENTIFIER9 adapterInfo; @@ -301,7 +301,7 @@ hsGDirect3DTnLEnumerate::hsGDirect3DTnLEnumerate() // two faked modes for HAL and REF, attaches the modes to each "device" that // can support them. -void hsGDirect3DTnLEnumerate::IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAdapter, D3DEnum_DriverInfo *drivInfo ) +void hsGDirect3DTnLEnumerate::IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAdapter, D3DEnum_DisplayInfo *drivInfo ) { // A bit backwards from DX8... First we have to go through our list of formats and check for validity. // Then we can enum through the modes for each format. @@ -315,7 +315,7 @@ void hsGDirect3DTnLEnumerate::IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAd UINT iDevice; for (iDevice = 0; iDevice < numDeviceTypes; iDevice++) { - D3DEnum_DeviceInfo& deviceInfo = drivInfo->fDevices.emplace_back(); + D3DEnum_RendererInfo& deviceInfo = drivInfo->fRenderers.emplace_back(); pD3D->GetDeviceCaps(iAdapter, deviceTypes[iDevice], &deviceInfo.fDDCaps); strncpy(deviceInfo.fStrName, strDeviceDescs[iDevice], 39); @@ -604,8 +604,8 @@ bool hsG3DDeviceSelector::IGetD3DCardInfo( hsG3DDeviceRecord &record, uint32_t *vendorID, uint32_t *deviceID, // Out char **driverString, char **descString ) { - D3DEnum_DriverInfo *driverD3DInfo = (D3DEnum_DriverInfo *)driverInfo; - D3DEnum_DeviceInfo *deviceD3DInfo = (D3DEnum_DeviceInfo *)deviceInfo; + D3DEnum_DisplayInfo *driverD3DInfo = (D3DEnum_DisplayInfo *)driverInfo; + D3DEnum_RendererInfo *deviceD3DInfo = (D3DEnum_RendererInfo *)deviceInfo; D3DADAPTER_IDENTIFIER9 *adapterInfo; @@ -625,9 +625,9 @@ void hsG3DDeviceSelector::ITryDirect3DTnL(hsWinRef winRef) { hsGDirect3DTnLEnumerate& d3dEnum = hsGDirect3D::EnumerateTnL(); - for (size_t i = 0; i < d3dEnum.GetNumDrivers(); i++) + for (size_t i = 0; i < d3dEnum.GetNumDisplays(); i++) { - ITryDirect3DTnLDriver(d3dEnum.GetDriver(i)); + ITryDirect3DTnLDriver(d3dEnum.GetDisplay(i)); } } @@ -635,7 +635,7 @@ void hsG3DDeviceSelector::ITryDirect3DTnL(hsWinRef winRef) // // New DirectX Way -void hsG3DDeviceSelector::ITryDirect3DTnLDriver(D3DEnum_DriverInfo* drivInfo) +void hsG3DDeviceSelector::ITryDirect3DTnLDriver(D3DEnum_DisplayInfo* drivInfo) { hsG3DDeviceRecord devRec; devRec.Clear(); @@ -656,7 +656,7 @@ void hsG3DDeviceSelector::ITryDirect3DTnLDriver(D3DEnum_DriverInfo* drivInfo) devRec.SetMemoryBytes(drivInfo->fMemory); - for (D3DEnum_DeviceInfo& device : drivInfo->fDevices) + for (D3DEnum_RendererInfo& device : drivInfo->fRenderers) { /// 9.6.2000 mcn - Changed here so we can do fudging here, rather /// than passing all the messy driver data to the function @@ -675,7 +675,7 @@ void hsG3DDeviceSelector::ITryDirect3DTnLDriver(D3DEnum_DriverInfo* drivInfo) // // New DirectX Way -void hsG3DDeviceSelector::ITryDirect3DTnLDevice(D3DEnum_DeviceInfo* devInfo, hsG3DDeviceRecord& devRec) +void hsG3DDeviceSelector::ITryDirect3DTnLDevice(D3DEnum_RendererInfo* devInfo, hsG3DDeviceRecord& devRec) { devRec.SetDeviceDesc(devInfo->fStrName); diff --git a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.h b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.h index 7f22a838fb..136acfe642 100644 --- a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.h +++ b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXEnumerate.h @@ -79,7 +79,7 @@ struct D3DEnum_ModeInfo // primary information recorded here is the D3DDEVICEDESC and a ptr to a // list of valid display modes. //----------------------------------------------------------------------------- -struct D3DEnum_DeviceInfo +struct D3DEnum_RendererInfo { D3DDEVTYPE fDDType; CHAR fStrName[40]; @@ -90,7 +90,7 @@ struct D3DEnum_DeviceInfo std::vector fModes; - D3DEnum_DeviceInfo() + D3DEnum_RendererInfo() : fDDType(), fStrName(), fDDCaps(), fCanWindow(), fCompatibleWithDesktop(), fIsHardware() { } }; @@ -100,13 +100,13 @@ struct D3DEnum_DeviceInfo //----------------------------------------------------------------------------- // Name: D3DEnum_DriverInfo -// Desc: Linked-list structure to hold information about a DirectX driver. The -// info stored is the capability bits for the driver plus a list -// of valid Direct3D devices for the driver. Note: most systems will only -// have one driver. The exception are multi-monitor systems, and systems +// Desc: Linked-list structure to hold information about a DirectX display. The +// info stored is the capability bits for the display plus a list +// of valid Direct3D renderers for the display. Note: most systems will only +// have one display. The exception are multi-monitor systems, and systems // with non-GDI 3D video cards. //----------------------------------------------------------------------------- -struct D3DEnum_DriverInfo +struct D3DEnum_DisplayInfo { GUID fGuid; @@ -121,12 +121,12 @@ struct D3DEnum_DriverInfo std::vector fModes; D3DEnum_ModeInfo* fCurrentMode; - std::vector fDevices; - D3DEnum_DeviceInfo* fCurrentDevice; + std::vector fRenderers; + D3DEnum_RendererInfo* fCurrentRenderer; - D3DEnum_DriverInfo() + D3DEnum_DisplayInfo() : fGuid(), fStrDesc(), fStrName(), fMemory(), fAdapterInfo(), - fDesktopMode(), fCurrentMode(), fCurrentDevice() { } + fDesktopMode(), fCurrentMode(), fCurrentRenderer() { } }; @@ -138,14 +138,14 @@ class hsGDirect3DTnLEnumerate protected: char fEnumeErrorStr[128]; // Driver & device enumeration error message buffer - std::vector fDrivers; + std::vector fDisplays; - D3DEnum_DriverInfo* fCurrentDriver; // The selected DD driver + D3DEnum_DisplayInfo* fCurrentDisplay; // The selected DD driver static short IGetDXBitDepth( D3DFORMAT format ); /// DirectX Helper Functions - void IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAdapter, D3DEnum_DriverInfo *drivInfo ); + void IEnumAdapterDevices( IDirect3D9 *pD3D, UINT iAdapter, D3DEnum_DisplayInfo *drivInfo ); bool IFindDepthFormats( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); bool IFindFSAATypes( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); bool ICheckCubicRenderTargets( IDirect3D9 *pD3D, UINT iAdapter, D3DDEVTYPE deviceType, D3DEnum_ModeInfo *modeInfo ); @@ -164,18 +164,18 @@ class hsGDirect3DTnLEnumerate bool SelectFromDevMode(const hsG3DDeviceRecord* devRec, const hsG3DDeviceMode* devMode); HRESULT D3DEnum_SelectDefaultMode(int width, int height, int depth); - HRESULT D3DEnum_SelectDefaultDriver( DWORD dwFlags ); + HRESULT D3DEnum_SelectDefaultDisplay( DWORD dwFlags ); - size_t GetNumDrivers() { return fDrivers.size(); } - D3DEnum_DriverInfo* GetDriver(size_t i) { return &fDrivers[i]; } + size_t GetNumDisplays() { return fDisplays.size(); } + D3DEnum_DisplayInfo* GetDisplay(size_t i) { return &fDisplays[i]; } - D3DEnum_DriverInfo* GetCurrentDriver() { return fCurrentDriver; } - D3DEnum_DeviceInfo* GetCurrentDevice() { return GetCurrentDriver() ? GetCurrentDriver()->fCurrentDevice : nullptr; } - D3DEnum_ModeInfo* GetCurrentMode() { return GetCurrentDevice() ? GetCurrentDriver()->fCurrentMode : nullptr; } + D3DEnum_DisplayInfo* GetCurrentDisplay() { return fCurrentDisplay; } + D3DEnum_RendererInfo* GetCurrentRenderer() { return GetCurrentDisplay() ? GetCurrentDisplay()->fCurrentRenderer : nullptr; } + D3DEnum_ModeInfo* GetCurrentMode() { return GetCurrentRenderer() ? GetCurrentDisplay()->fCurrentMode : nullptr; } - void SetCurrentDriver(D3DEnum_DriverInfo* d) { fCurrentDriver = d; } - void SetCurrentDevice(D3DEnum_DeviceInfo* d) { hsAssert(GetCurrentDriver(), "Set Driver first"); GetCurrentDriver()->fCurrentDevice = d; } - void SetCurrentMode(D3DEnum_ModeInfo* m) { hsAssert(GetCurrentDriver(), "Set Driver first"); GetCurrentDriver()->fCurrentMode = m; } + void SetCurrentDisplay(D3DEnum_DisplayInfo* d) { fCurrentDisplay = d; } + void SetCurrentRenderer(D3DEnum_RendererInfo* d) { hsAssert(GetCurrentDisplay(), "Set Display first"); GetCurrentDisplay()->fCurrentRenderer = d; } + void SetCurrentMode(D3DEnum_ModeInfo* m) { hsAssert(GetCurrentDisplay(), "Set Display first"); GetCurrentDisplay()->fCurrentMode = m; } char* GetEnumeErrorStr() { return fEnumeErrorStr; } void SetEnumeErrorStr(const char* s); diff --git a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.cpp b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.cpp index a9ed50f25f..787b82f9d8 100644 --- a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.cpp +++ b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.cpp @@ -563,8 +563,8 @@ plDXPipeline::plDXPipeline( hsWinRef hWnd, const hsG3DDeviceModeRecord *devModeR } // Record the requested mode/setup. - ISetCurrentDriver( d3dEnum.GetCurrentDriver() ); - ISetCurrentDevice( d3dEnum.GetCurrentDevice() ); + ISetCurrentDisplay( d3dEnum.GetCurrentDisplay() ); + ISetCurrentRenderer( d3dEnum.GetCurrentRenderer() ); D3DEnum_ModeInfo *pModeInfo = d3dEnum.GetCurrentMode(); pModeInfo->fWindowed = fInitialPipeParams.Windowed; // set windowed mode from ini file ISetCurrentMode( d3dEnum.GetCurrentMode() ); @@ -580,8 +580,8 @@ plDXPipeline::plDXPipeline( hsWinRef hWnd, const hsG3DDeviceModeRecord *devModeR IRestrictCaps( *devRec ); fSettings.fMaxAnisotropicSamples = fInitialPipeParams.AnisotropicLevel; - if(fSettings.fMaxAnisotropicSamples > fCurrentDevice->fDDCaps.MaxAnisotropy) - fSettings.fMaxAnisotropicSamples = (uint8_t)fCurrentDevice->fDDCaps.MaxAnisotropy; + if(fSettings.fMaxAnisotropicSamples > fCurrentRenderer->fDDCaps.MaxAnisotropy) + fSettings.fMaxAnisotropicSamples = (uint8_t)fCurrentRenderer->fDDCaps.MaxAnisotropy; plConst(uint32_t) kDefaultDynVtxSize(32000 * 44); plConst(uint32_t) kDefaultDynIdxSize(0 * plGBufferGroup::kMaxNumIndicesPerBuffer * 2); @@ -609,8 +609,8 @@ plDXPipeline::~plDXPipeline() // plScene/plOccluder.cpp and plScene/plOccluderProxy.cpp for more info if( fView.HasCullProxy() ) fView.GetCullProxy()->GetKey()->UnRefObject(); - delete fCurrentDriver; - delete fCurrentDevice; + delete fCurrentDisplay; + delete fCurrentRenderer; delete fCurrentMode; IReleaseDeviceObjects(); @@ -671,8 +671,8 @@ void plDXPipeline::IClearMembers() fSharedDepthFormat[1] = D3DFMT_UNKNOWN; fCurrentMode = nullptr; - fCurrentDriver = nullptr; - fCurrentDevice = nullptr; + fCurrentDisplay = nullptr; + fCurrentRenderer = nullptr; for( i = 0; i < 8; i++ ) { @@ -842,33 +842,33 @@ void plDXPipeline::ISetCaps() fSettings.fD3DCaps = kCapsNone; // Set relevant caps (ones we can do something about). - if (fCurrentDevice->fDDCaps.RasterCaps & D3DPRASTERCAPS_DEPTHBIAS) + if (fCurrentRenderer->fDDCaps.RasterCaps & D3DPRASTERCAPS_DEPTHBIAS) fSettings.fD3DCaps |= kCapsZBias; - if (fCurrentDevice->fDDCaps.RasterCaps & D3DPRASTERCAPS_FOGRANGE) + if (fCurrentRenderer->fDDCaps.RasterCaps & D3DPRASTERCAPS_FOGRANGE) fSettings.fD3DCaps |= kCapsRangeFog; - if (fCurrentDevice->fDDCaps.RasterCaps & D3DPRASTERCAPS_FOGTABLE) + if (fCurrentRenderer->fDDCaps.RasterCaps & D3DPRASTERCAPS_FOGTABLE) fSettings.fD3DCaps |= kCapsLinearFog | kCapsExpFog | kCapsExp2Fog | kCapsPixelFog; else fSettings.fD3DCaps |= kCapsLinearFog; - if (fCurrentDevice->fDDCaps.TextureFilterCaps & D3DPTFILTERCAPS_MIPFLINEAR) + if (fCurrentRenderer->fDDCaps.TextureFilterCaps & D3DPTFILTERCAPS_MIPFLINEAR) fSettings.fD3DCaps |= kCapsMipmap; - if (fCurrentDevice->fDDCaps.TextureCaps & D3DPTEXTURECAPS_MIPCUBEMAP) + if (fCurrentRenderer->fDDCaps.TextureCaps & D3DPTEXTURECAPS_MIPCUBEMAP) fSettings.fD3DCaps |= kCapsCubicMipmap; if (fSettings.fNumAASamples > 0) fSettings.fD3DCaps |= kCapsFSAntiAlias; - if (fCurrentDevice->fDDCaps.RasterCaps & D3DPRASTERCAPS_WFOG) + if (fCurrentRenderer->fDDCaps.RasterCaps & D3DPRASTERCAPS_WFOG) fSettings.fD3DCaps |= kCapsDoesWFog; - if (fCurrentDevice->fDDCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP) + if (fCurrentRenderer->fDDCaps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP) fSettings.fD3DCaps |= kCapsCubicTextures; // Unconditional Non-Power of Two Textures // To make life easy for us, we can have non POT textures or we can't - if (!(fCurrentDevice->fDDCaps.TextureCaps & D3DPTEXTURECAPS_POW2 && - fCurrentDevice->fDDCaps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL)) + if (!(fCurrentRenderer->fDDCaps.TextureCaps & D3DPTEXTURECAPS_POW2 && + fCurrentRenderer->fDDCaps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL)) fSettings.fD3DCaps |= kCapsNpotTextures; /// New 1.5.2000 - cull out mixed vertex processing - if (fCurrentDevice->fDDCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT && + if (fCurrentRenderer->fDDCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT && fCurrentMode->fDDBehavior == D3DCREATE_HARDWARE_VERTEXPROCESSING) fSettings.fD3DCaps |= kCapsHWTransform; @@ -887,7 +887,7 @@ void plDXPipeline::ISetCaps() fSettings.fD3DCaps |= kCapsLuminanceTextures; /// Max # of hardware lights - fMaxNumLights = fCurrentDevice->fDDCaps.MaxActiveLights; + fMaxNumLights = fCurrentRenderer->fDDCaps.MaxActiveLights; if ( fMaxNumLights > kD3DMaxTotalLights ) fMaxNumLights = kD3DMaxTotalLights; @@ -905,8 +905,8 @@ void plDXPipeline::ISetCaps() } /// Max # of textures at once - fMaxLayersAtOnce = fCurrentDevice->fDDCaps.MaxSimultaneousTextures; - if ( fCurrentDevice->fDDCaps.DevCaps & D3DDEVCAPS_SEPARATETEXTUREMEMORIES ) + fMaxLayersAtOnce = fCurrentRenderer->fDDCaps.MaxSimultaneousTextures; + if ( fCurrentRenderer->fDDCaps.DevCaps & D3DDEVCAPS_SEPARATETEXTUREMEMORIES ) fMaxLayersAtOnce = 1; // Alloc half our simultaneous textures to piggybacks. // Won't hurt us unless we try to many things at once. @@ -916,14 +916,14 @@ void plDXPipeline::ISetCaps() if (fMaxLayersAtOnce < 4) SetDebugFlag(plPipeDbg::kFlagBumpUV, true); - fSettings.fMaxAnisotropicSamples = (uint8_t)(fCurrentDevice->fDDCaps.MaxAnisotropy); + fSettings.fMaxAnisotropicSamples = (uint8_t)(fCurrentRenderer->fDDCaps.MaxAnisotropy); - fSettings.fNoGammaCorrect = !(fCurrentDevice->fDDCaps.Caps2 & D3DCAPS2_FULLSCREENGAMMA); + fSettings.fNoGammaCorrect = !(fCurrentRenderer->fDDCaps.Caps2 & D3DCAPS2_FULLSCREENGAMMA); - if (!(fCurrentDevice->fDDCaps.TextureCaps & D3DPTEXTURECAPS_PROJECTED)) + if (!(fCurrentRenderer->fDDCaps.TextureCaps & D3DPTEXTURECAPS_PROJECTED)) plDynamicCamMap::SetCapable(false); - ISetGraphicsCapability(fCurrentDevice->fDDCaps.PixelShaderVersion); + ISetGraphicsCapability(fCurrentRenderer->fDDCaps.PixelShaderVersion); } // ISetGraphicsCapability /////////////////////////////////////////////////////// @@ -1141,24 +1141,24 @@ bool plDXPipeline::ICreateDeviceObjects() return false; } -//// ISetCurrentDriver //////////////////////////////////////////////////////// +//// ISetCurrentDisplay //////////////////////////////////////////////////////// // Copy over the driver info. -void plDXPipeline::ISetCurrentDriver( D3DEnum_DriverInfo *driv ) +void plDXPipeline::ISetCurrentDisplay( D3DEnum_DisplayInfo *driv ) { - if (fCurrentDriver != nullptr) - delete fCurrentDriver; + if (fCurrentDisplay != nullptr) + delete fCurrentDisplay; - fCurrentDriver = new D3DEnum_DriverInfo; + fCurrentDisplay = new D3DEnum_DisplayInfo; - fCurrentDriver->fGuid = driv->fGuid; - hsStrncpy( fCurrentDriver->fStrDesc, driv->fStrDesc, 40 ); - hsStrncpy( fCurrentDriver->fStrName, driv->fStrName, 40 ); + fCurrentDisplay->fGuid = driv->fGuid; + hsStrncpy( fCurrentDisplay->fStrDesc, driv->fStrDesc, 40 ); + hsStrncpy( fCurrentDisplay->fStrName, driv->fStrName, 40 ); - fCurrentDriver->fDesktopMode = driv->fDesktopMode; - fCurrentDriver->fAdapterInfo = driv->fAdapterInfo; + fCurrentDisplay->fDesktopMode = driv->fDesktopMode; + fCurrentDisplay->fAdapterInfo = driv->fAdapterInfo; - fCurrentDriver->fCurrentMode = nullptr; - fCurrentDriver->fCurrentDevice = nullptr; + fCurrentDisplay->fCurrentMode = nullptr; + fCurrentDisplay->fCurrentRenderer = nullptr; /// Go looking for an adapter to match this one IDirect3D9* d3d = hsGDirect3D::GetDirect3D(); @@ -1169,7 +1169,7 @@ void plDXPipeline::ISetCurrentDriver( D3DEnum_DriverInfo *driv ) D3DADAPTER_IDENTIFIER9 adapterInfo; d3d->GetAdapterIdentifier( iAdapter, 0, &adapterInfo ); - if( adapterInfo.DeviceIdentifier == fCurrentDriver->fAdapterInfo.DeviceIdentifier ) + if( adapterInfo.DeviceIdentifier == fCurrentDisplay->fAdapterInfo.DeviceIdentifier ) { fCurrentAdapter = iAdapter; break; @@ -1177,22 +1177,22 @@ void plDXPipeline::ISetCurrentDriver( D3DEnum_DriverInfo *driv ) } } -//// ISetCurrentDevice //////////////////////////////////////////////////////// -// Copy over the device info. -void plDXPipeline::ISetCurrentDevice( D3DEnum_DeviceInfo *dev ) +//// ISetCurrentRenderer //////////////////////////////////////////////////////// +// Copy over the renderer info. +void plDXPipeline::ISetCurrentRenderer( D3DEnum_RendererInfo *dev ) { - if (fCurrentDevice != nullptr) - delete fCurrentDevice; - fCurrentDevice = new D3DEnum_DeviceInfo; + if (fCurrentRenderer != nullptr) + delete fCurrentRenderer; + fCurrentRenderer = new D3DEnum_RendererInfo; - hsStrncpy( fCurrentDevice->fStrName, dev->fStrName, 40 ); + hsStrncpy( fCurrentRenderer->fStrName, dev->fStrName, 40 ); - fCurrentDevice->fDDCaps = dev->fDDCaps; - fCurrentDevice->fDDType = dev->fDDType; - fCurrentDevice->fIsHardware = dev->fIsHardware; - fCurrentDevice->fCanWindow = dev->fCanWindow; + fCurrentRenderer->fDDCaps = dev->fDDCaps; + fCurrentRenderer->fDDType = dev->fDDType; + fCurrentRenderer->fIsHardware = dev->fIsHardware; + fCurrentRenderer->fCanWindow = dev->fCanWindow; // fCurrentDevice->fCanAntialias = dev->fCanAntialias; - fCurrentDevice->fCompatibleWithDesktop = dev->fCompatibleWithDesktop; + fCurrentRenderer->fCompatibleWithDesktop = dev->fCompatibleWithDesktop; // copy over supported device modes D3DEnum_ModeInfo currMode; @@ -1212,7 +1212,7 @@ void plDXPipeline::ISetCurrentDevice( D3DEnum_DeviceInfo *dev ) strcpy(currMode.fStrDesc, mode.fStrDesc); currMode.fWindowed = mode.fWindowed; - fCurrentDevice->fModes.emplace_back(currMode); + fCurrentRenderer->fModes.emplace_back(currMode); } } @@ -1244,7 +1244,7 @@ bool plDXPipeline::IFindCompressedFormats() for( i = 0; toCheckFor[ i ] != D3DFMT_UNKNOWN; i++ ) { - if( FAILED( hsGDirect3D::GetDirect3D()->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, + if( FAILED( hsGDirect3D::GetDirect3D()->CheckDeviceFormat( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, 0, D3DRTYPE_TEXTURE, toCheckFor[ i ] ) ) ) return false; @@ -1266,7 +1266,7 @@ bool plDXPipeline::IFindLuminanceFormats() for( i = 0; toCheckFor[ i ] != D3DFMT_UNKNOWN; i++ ) { - if (FAILED(hsGDirect3D::GetDirect3D()->CheckDeviceFormat(fCurrentAdapter, fCurrentDevice->fDDType, + if (FAILED(hsGDirect3D::GetDirect3D()->CheckDeviceFormat(fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, 0, D3DRTYPE_TEXTURE, toCheckFor[ i ] ) ) ) return false; @@ -1283,7 +1283,7 @@ bool plDXPipeline::IFindLuminanceFormats() bool plDXPipeline::ITextureFormatAllowed( D3DFORMAT format ) { - if (FAILED( hsGDirect3D::GetDirect3D()->CheckDeviceFormat(fCurrentAdapter, fCurrentDevice->fDDType, + if (FAILED( hsGDirect3D::GetDirect3D()->CheckDeviceFormat(fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, 0, D3DRTYPE_TEXTURE, format ) ) ) return false; @@ -1419,14 +1419,14 @@ bool plDXPipeline::ICreateDevice(bool windowed) // it as part of the handshake to let NVPerfHUD know we give // it permission to analyze us. fCurrentAdapter = adapter; - fCurrentDevice->fDDType= D3DDEVTYPE_REF; + fCurrentRenderer->fDDType= D3DDEVTYPE_REF; SetDebugFlag(plPipeDbg::kFlagNVPerfHUD, true); break; } } #endif // PLASMA_EXTERNAL_RELEASE - INIT_ERROR_CHECK( d3d->CreateDevice( fCurrentAdapter, fCurrentDevice->fDDType, + INIT_ERROR_CHECK( d3d->CreateDevice( fCurrentAdapter, fCurrentRenderer->fDDType, fDevice.fHWnd, fCurrentMode->fDDBehavior, ¶ms, &fD3DDevice ), "Cannot create primary display surface via CreateDevice()" ); @@ -1456,7 +1456,7 @@ bool plDXPipeline::IFindDepthFormat(D3DPRESENT_PARAMETERS& params) ||(fmt == D3DFMT_D16) ) { HRESULT hr = d3d->CheckDeviceMultiSampleType(fCurrentAdapter, - fCurrentDevice->fDDType, + fCurrentRenderer->fDDType, fmt, fCurrentMode->fWindowed ? TRUE : FALSE, params.MultiSampleType, nullptr); @@ -1476,7 +1476,7 @@ bool plDXPipeline::IFindDepthFormat(D3DPRESENT_PARAMETERS& params) if( fmt == D3DFMT_D15S1 || fmt == D3DFMT_D24X4S4 || fmt == D3DFMT_D24S8 ) { HRESULT hr = d3d->CheckDeviceMultiSampleType(fCurrentAdapter, - fCurrentDevice->fDDType, + fCurrentRenderer->fDDType, fmt, fCurrentMode->fWindowed ? TRUE : FALSE, params.MultiSampleType, nullptr); @@ -1896,7 +1896,7 @@ void plDXPipeline::IResetToDefaults(D3DPRESENT_PARAMETERS *params) params->BackBufferFormat = D3DFMT_X8R8G8B8; fColorDepth = fDefaultPipeParams.ColorDepth; - for (D3DEnum_ModeInfo& mode : fCurrentDevice->fModes) + for (D3DEnum_ModeInfo& mode : fCurrentRenderer->fModes) { if (mode.fDDmode.Width == params->BackBufferWidth && mode.fDDmode.Height == params->BackBufferHeight && @@ -2033,7 +2033,7 @@ void plDXPipeline::ResetDisplayDevice(int Width, int Height, int ColorDepth, boo fVSync = VSync; size_t iMode = 0; - std::vector& modes = fCurrentDevice->fModes; + std::vector& modes = fCurrentRenderer->fModes; // check for supported resolution if we're not going to windowed mode if(!Windowed) { @@ -2112,7 +2112,7 @@ void plDXPipeline::ResetDisplayDevice(int Width, int Height, int ColorDepth, boo void plDXPipeline::GetSupportedColorDepths(std::vector &ColorDepths) { // iterate through display modes - for (const D3DEnum_ModeInfo& modeInfo : fCurrentDevice->fModes) + for (const D3DEnum_ModeInfo& modeInfo : fCurrentRenderer->fModes) { // Check to see if color depth has been added already auto iter = std::find_if(ColorDepths.cbegin(), ColorDepths.cend(), @@ -2131,7 +2131,7 @@ void plDXPipeline::GetSupportedDisplayModes(std::vector *res, int { std::vector supported; // loop through display modes - for (const D3DEnum_ModeInfo& modeInfo : fCurrentDevice->fModes) + for (const D3DEnum_ModeInfo& modeInfo : fCurrentRenderer->fModes) { if (modeInfo.fBitDepth == ColorDepth) { @@ -2162,7 +2162,7 @@ int plDXPipeline::GetMaxAntiAlias(int Width, int Height, int ColorDepth) { int max = 0; D3DEnum_ModeInfo *pCurrMode = nullptr; - for (D3DEnum_ModeInfo& mode : fCurrentDevice->fModes) + for (D3DEnum_ModeInfo& mode : fCurrentRenderer->fModes) { if (mode.fDDmode.Width == Width && mode.fDDmode.Height == Height && @@ -2184,7 +2184,7 @@ int plDXPipeline::GetMaxAntiAlias(int Width, int Height, int ColorDepth) int plDXPipeline::GetMaxAnisotropicSamples() { - return fCurrentDevice ? fCurrentDevice->fDDCaps.MaxAnisotropy : 0; + return fCurrentRenderer ? fCurrentRenderer->fDDCaps.MaxAnisotropy : 0; } //// Resize /////////////////////////////////////////////////////////////////// @@ -3964,7 +3964,7 @@ bool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &sur } /// Check the device format - if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, + if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, D3DUSAGE_RENDERTARGET, resType, surfFormat ) ) ) { if( bitDepth == 16 ) @@ -3977,7 +3977,7 @@ bool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &sur bitDepth = 16; surfFormat = D3DFMT_A4R4G4B4; } - if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, + if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, D3DUSAGE_RENDERTARGET, resType, surfFormat ) ) ) { IGetD3DError(); @@ -3987,7 +3987,7 @@ bool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &sur if( zDepth ) { - while( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, + while( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, depthFormat ) ) ) { if( stencilIndex < sizeof( depthFormats ) / sizeof( depthFormats[ 0 ] ) - 1 ) @@ -4002,7 +4002,7 @@ bool plDXPipeline::IPrepRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &sur } } - if( FAILED( fSettings.fDXError = d3d->CheckDepthStencilMatch( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, + if( FAILED( fSettings.fDXError = d3d->CheckDepthStencilMatch( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, surfFormat, depthFormat ) ) ) { IGetD3DError(); @@ -4051,7 +4051,7 @@ bool plDXPipeline::IFindRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &sur } /// Check the device format - if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, + if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, D3DUSAGE_RENDERTARGET, resType, surfFormat ) ) ) { if( bitDepth == 16 ) @@ -4064,7 +4064,7 @@ bool plDXPipeline::IFindRenderTargetInfo( plRenderTarget *owner, D3DFORMAT &sur bitDepth = 16; surfFormat = D3DFMT_A4R4G4B4; } - if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentDevice->fDDType, fCurrentMode->fDDmode.Format, + if( FAILED( fSettings.fDXError = d3d->CheckDeviceFormat( fCurrentAdapter, fCurrentRenderer->fDDType, fCurrentMode->fDDmode.Format, D3DUSAGE_RENDERTARGET, resType, surfFormat ) ) ) { IGetD3DError(); @@ -4664,22 +4664,22 @@ bool plDXPipeline::StencilGetCaps( plStencilCaps *caps ) /// Get supported ops caps->fSupportedOps = 0; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_DECR ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_DECR ) caps->fSupportedOps |= plStencilCaps::kOpDecWrap; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_DECRSAT ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_DECRSAT ) caps->fSupportedOps |= plStencilCaps::kOpDecClamp; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_INCR ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_INCR ) caps->fSupportedOps |= plStencilCaps::kOpIncWrap; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_INCRSAT ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_INCRSAT ) caps->fSupportedOps |= plStencilCaps::kOpIncClamp; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_INVERT ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_INVERT ) caps->fSupportedOps |= plStencilCaps::kOpInvert; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_KEEP ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_KEEP ) caps->fSupportedOps |= plStencilCaps::kOpKeep; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_REPLACE ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_REPLACE ) caps->fSupportedOps |= plStencilCaps::kOpReplace; - if( fCurrentDevice->fDDCaps.StencilCaps & D3DSTENCILCAPS_ZERO ) + if( fCurrentRenderer->fDDCaps.StencilCaps & D3DSTENCILCAPS_ZERO ) caps->fSupportedOps |= plStencilCaps::kOpSetToZero; return true; diff --git a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.h b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.h index cb0c1361e1..bb0b86f839 100644 --- a/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.h +++ b/Sources/Plasma/FeatureLib/pfDXPipeline/plDXPipeline.h @@ -161,8 +161,8 @@ class plDXPlateManager : public plPlateManager //// Class Definition ///////////////////////////////////////////////////////// class plDebugTextManager; -struct D3DEnum_DriverInfo; -struct D3DEnum_DeviceInfo; +struct D3DEnum_DisplayInfo; +struct D3DEnum_RendererInfo; struct D3DEnum_ModeInfo; class plGeometrySpan; class plDrawableSpans; @@ -236,8 +236,8 @@ class plDXPipeline : public pl3DPipeline bool fCurrD3DLiteState; UINT fCurrentAdapter; - D3DEnum_DriverInfo* fCurrentDriver; - D3DEnum_DeviceInfo* fCurrentDevice; + D3DEnum_DisplayInfo* fCurrentDisplay; + D3DEnum_RendererInfo* fCurrentRenderer; D3DEnum_ModeInfo* fCurrentMode; hsGMatState fLayerState[ 8 ]; // base stage (0) state is held in base class @@ -436,8 +436,8 @@ class plDXPipeline : public pl3DPipeline bool IFindLuminanceFormats(); bool ITextureFormatAllowed( D3DFORMAT format ); - void ISetCurrentDriver( D3DEnum_DriverInfo *driv ); - void ISetCurrentDevice( D3DEnum_DeviceInfo *dev ); + void ISetCurrentDisplay( D3DEnum_DisplayInfo *driv ); + void ISetCurrentRenderer( D3DEnum_RendererInfo *dev ); void ISetCurrentMode( D3DEnum_ModeInfo *mode ); bool ICreateDevice(bool windowed); diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index 75d78c0baf..2a8550e850 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp @@ -550,8 +550,8 @@ namespace #ifdef PLASMA_PIPELINE_DX void hsG3DDeviceSelector::IFudgeDirectXDevice( hsG3DDeviceRecord &record, - D3DEnum_DriverInfo *driverInfo, - D3DEnum_DeviceInfo *deviceInfo ) + D3DEnum_DisplayInfo *driverInfo, + D3DEnum_RendererInfo *deviceInfo ) { uint32_t vendorID, deviceID; char *szDriver, *szDesc; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h index ccd6ee77c8..3c837b21e6 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.h @@ -73,10 +73,10 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com class hsStream; -struct D3DEnum_DeviceInfo; -struct D3DEnum_DriverInfo; -struct D3DEnum_DeviceInfo; -struct D3DEnum_DriverInfo; +struct D3DEnum_RendererInfo; +struct D3DEnum_DisplayInfo; +struct D3DEnum_RendererInfo; +struct D3DEnum_DisplayInfo; class hsG3DDeviceMode { @@ -330,12 +330,12 @@ class hsG3DDeviceSelector : public hsRefCnt void IClear(); void IRemoveDiscarded(); - void ITryDirect3DTnLDevice(D3DEnum_DeviceInfo* devInfo, hsG3DDeviceRecord& srcDevRec); - void ITryDirect3DTnLDriver(D3DEnum_DriverInfo* drivInfo); + void ITryDirect3DTnLDevice(D3DEnum_RendererInfo* devInfo, hsG3DDeviceRecord& srcDevRec); + void ITryDirect3DTnLDriver(D3DEnum_DisplayInfo* drivInfo); void ITryDirect3DTnL(hsWinRef winRef); void IFudgeDirectXDevice( hsG3DDeviceRecord &record, - D3DEnum_DriverInfo *driverInfo, D3DEnum_DeviceInfo *deviceInfo ); + D3DEnum_DisplayInfo *driverInfo, D3DEnum_RendererInfo *deviceInfo ); uint32_t IAdjustDirectXMemory( uint32_t cardMem ); bool IGetD3DCardInfo( hsG3DDeviceRecord &record, void *driverInfo, void *deviceInfo,