Removes Direct3D9 functionality.

This commit is contained in:
Areloch 2017-05-28 16:51:31 -05:00
parent 5e288e79d2
commit 7e5e3b5105
86 changed files with 382 additions and 10445 deletions

View file

@ -47,27 +47,12 @@ void GFXD3D11CardProfiler::init()
mCardDescription = adapter.description;
mChipSet = adapter.chipSet;
mVersionString = _getFeatureLevelStr();
mVersionString = adapter.driverVersion;
mVideoMemory = adapter.vram;
}
Parent::init();
}
String GFXD3D11CardProfiler::_getFeatureLevelStr()
{
switch (D3D11->getFeatureLevel())
{
case D3D_FEATURE_LEVEL_11_0:
return String("Feature level 11.0");
case D3D_FEATURE_LEVEL_10_1:
return String("Feature level 10.1");
case D3D_FEATURE_LEVEL_10_0:
return String("Feature level 10.0");
default:
return String("Unknown feature level");
}
}
void GFXD3D11CardProfiler::setupCardCapabilities()
{
setCapability("maxTextureWidth", D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION);

View file

@ -41,7 +41,6 @@ protected:
void setupCardCapabilities();
bool _queryCardCap(const String &query, U32 &foundResult);
bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips);
String _getFeatureLevelStr();
};
#endif

View file

@ -37,7 +37,6 @@
#include "windowManager/platformWindow.h"
#include "gfx/D3D11/screenshotD3D11.h"
#include "materials/shaderData.h"
#include <d3d9.h> //ok now stressing out folks, this is just for debug events(D3DPER) :)
#ifdef TORQUE_DEBUG
#include "d3d11sdklayers.h"
@ -89,6 +88,7 @@ GFXD3D11Device::GFXD3D11Device(U32 index)
mAdapterIndex = index;
mD3DDevice = NULL;
mUserAnnotation = NULL;
mVolatileVB = NULL;
mCurrentPB = NULL;
@ -161,6 +161,7 @@ GFXD3D11Device::~GFXD3D11Device()
SAFE_RELEASE(mDeviceBackBufferView);
SAFE_RELEASE(mDeviceDepthStencil);
SAFE_RELEASE(mDeviceBackbuffer);
SAFE_RELEASE(mUserAnnotation);
SAFE_RELEASE(mD3DDeviceContext);
SAFE_DELETE(mCardProfiler);
@ -1685,30 +1686,32 @@ GFXCubemap * GFXD3D11Device::createCubemap()
return cube;
}
// Debug events
//------------------------------------------------------------------------------
void GFXD3D11Device::enterDebugEvent(ColorI color, const char *name)
{
// BJGFIX
WCHAR eventName[260];
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
D3DPERF_BeginEvent(D3DCOLOR_ARGB(color.alpha, color.red, color.green, color.blue),
(LPCWSTR)&eventName);
if (mUserAnnotation)
{
WCHAR eventName[260];
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
mUserAnnotation->BeginEvent(eventName);
}
}
//------------------------------------------------------------------------------
void GFXD3D11Device::leaveDebugEvent()
{
D3DPERF_EndEvent();
if (mUserAnnotation)
mUserAnnotation->EndEvent();
}
//------------------------------------------------------------------------------
void GFXD3D11Device::setDebugMarker(ColorI color, const char *name)
{
// BJGFIX
WCHAR eventName[260];
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
D3DPERF_SetMarker(D3DCOLOR_ARGB(color.alpha, color.red, color.green, color.blue),
(LPCWSTR)&eventName);
if (mUserAnnotation)
{
WCHAR eventName[260];
MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
mUserAnnotation->SetMarker(eventName);
}
}

View file

@ -23,7 +23,7 @@
#ifndef _GFXD3D11DEVICE_H_
#define _GFXD3D11DEVICE_H_
#include <d3d11.h>
#include <d3d11_1.h>
#include "platform/tmm_off.h"
#include "platformWin32/platformWin32.h"
@ -126,6 +126,7 @@ protected:
IDXGISwapChain *mSwapChain;
ID3D11Device* mD3DDevice;
ID3D11DeviceContext* mD3DDeviceContext;
ID3DUserDefinedAnnotation* mUserAnnotation;
GFXShader* mCurrentShader;
GFXShaderRef mGenericShader[GS_COUNT];

View file

@ -166,7 +166,7 @@ void GFXD3D11OcclusionQuery::resurrect()
HRESULT hRes = D3D11DEVICE->CreateQuery(&queryDesc, &mQuery);
AssertISV( hRes != E_OUTOFMEMORY, "GFXD3D9QueryFence::resurrect - Out of memory" );
AssertISV( hRes != E_OUTOFMEMORY, "GFXD3D11QueryFence::resurrect - Out of memory" );
}
}