Silence unimplemented asserts and implement retrieving adapter information.

TRAC #22072 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1496 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 9549bead
...@@ -158,6 +158,10 @@ EGLint Renderer11::initialize() ...@@ -158,6 +158,10 @@ EGLint Renderer11::initialize()
dxgiDevice->Release(); dxgiDevice->Release();
mDxgiAdapter->GetDesc(&mAdapterDescription);
memset(mDescription, 0, sizeof(mDescription));
wcstombs(mDescription, mAdapterDescription.Description, sizeof(mDescription) - 1);
result = mDxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&mDxgiFactory); result = mDxgiAdapter->GetParent(__uuidof(IDXGIFactory), (void**)&mDxgiFactory);
if (!mDxgiFactory || FAILED(result)) if (!mDxgiFactory || FAILED(result))
...@@ -569,58 +573,54 @@ bool Renderer11::resetDevice() ...@@ -569,58 +573,54 @@ bool Renderer11::resetDevice()
DWORD Renderer11::getAdapterVendor() const DWORD Renderer11::getAdapterVendor() const
{ {
// TODO return mAdapterDescription.VendorId;
UNIMPLEMENTED();
return 0;
} }
const char *Renderer11::getAdapterDescription() const const char *Renderer11::getAdapterDescription() const
{ {
// TODO return mDescription;
UNIMPLEMENTED();
return "UNIMPLEMENTED";
} }
GUID Renderer11::getAdapterIdentifier() const GUID Renderer11::getAdapterIdentifier() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
GUID foo = {}; GUID foo = {0};
return foo; return foo;
} }
bool Renderer11::getDXT1TextureSupport() bool Renderer11::getDXT1TextureSupport()
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getDXT3TextureSupport() bool Renderer11::getDXT3TextureSupport()
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getDXT5TextureSupport() bool Renderer11::getDXT5TextureSupport()
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getDepthTextureSupport() const bool Renderer11::getDepthTextureSupport() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getFloat32TextureSupport(bool *filtering, bool *renderable) bool Renderer11::getFloat32TextureSupport(bool *filtering, bool *renderable)
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
*filtering = false; *filtering = false;
*renderable = false; *renderable = false;
...@@ -630,7 +630,7 @@ bool Renderer11::getFloat32TextureSupport(bool *filtering, bool *renderable) ...@@ -630,7 +630,7 @@ bool Renderer11::getFloat32TextureSupport(bool *filtering, bool *renderable)
bool Renderer11::getFloat16TextureSupport(bool *filtering, bool *renderable) bool Renderer11::getFloat16TextureSupport(bool *filtering, bool *renderable)
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
*filtering = false; *filtering = false;
*renderable = false; *renderable = false;
...@@ -640,70 +640,70 @@ bool Renderer11::getFloat16TextureSupport(bool *filtering, bool *renderable) ...@@ -640,70 +640,70 @@ bool Renderer11::getFloat16TextureSupport(bool *filtering, bool *renderable)
bool Renderer11::getLuminanceTextureSupport() bool Renderer11::getLuminanceTextureSupport()
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getLuminanceAlphaTextureSupport() bool Renderer11::getLuminanceAlphaTextureSupport()
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getTextureFilterAnisotropySupport() const bool Renderer11::getTextureFilterAnisotropySupport() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
float Renderer11::getTextureMaxAnisotropy() const float Renderer11::getTextureMaxAnisotropy() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return 1.0f; return 1.0f;
} }
bool Renderer11::getEventQuerySupport() bool Renderer11::getEventQuerySupport()
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getVertexTextureSupport() const bool Renderer11::getVertexTextureSupport() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getNonPower2TextureSupport() const bool Renderer11::getNonPower2TextureSupport() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getOcclusionQuerySupport() const bool Renderer11::getOcclusionQuerySupport() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getInstancingSupport() const bool Renderer11::getInstancingSupport() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return false; return false;
} }
bool Renderer11::getShareHandleSupport() const bool Renderer11::getShareHandleSupport() const
{ {
// TODO // TODO
//UNIMPLEMENTED(); // UNIMPLEMENTED();
// PIX doesn't seem to support using share handles, so disable them. // PIX doesn't seem to support using share handles, so disable them.
return false && !gl::perfActive(); return false && !gl::perfActive();
...@@ -723,7 +723,7 @@ int Renderer11::getMajorShaderModel() const ...@@ -723,7 +723,7 @@ int Renderer11::getMajorShaderModel() const
float Renderer11::getMaxPointSize() const float Renderer11::getMaxPointSize() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return 1.0f; return 1.0f;
} }
...@@ -773,7 +773,7 @@ int Renderer11::getMaxSwapInterval() const ...@@ -773,7 +773,7 @@ int Renderer11::getMaxSwapInterval() const
int Renderer11::getMaxSupportedSamples() const int Renderer11::getMaxSupportedSamples() const
{ {
// TODO // TODO
UNIMPLEMENTED(); // UNIMPLEMENTED();
return 1; return 1;
} }
......
...@@ -179,6 +179,8 @@ class Renderer11 : public Renderer ...@@ -179,6 +179,8 @@ class Renderer11 : public Renderer
D3D_FEATURE_LEVEL mFeatureLevel; D3D_FEATURE_LEVEL mFeatureLevel;
ID3D11DeviceContext *mDeviceContext; ID3D11DeviceContext *mDeviceContext;
IDXGIAdapter *mDxgiAdapter; IDXGIAdapter *mDxgiAdapter;
DXGI_ADAPTER_DESC mAdapterDescription;
char mDescription[128];
IDXGIFactory *mDxgiFactory; IDXGIFactory *mDxgiFactory;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment