Bug 1173107: Add hexa() around various hr logging. r=jrmuizel a=KWierso

This commit is contained in:
David Major 2015-06-09 16:48:59 -04:00
parent ed54538c7f
commit eb73e64e7c
3 changed files with 8 additions and 6 deletions

View File

@ -1964,7 +1964,7 @@ DrawTargetD2D::CreateRTForTexture(ID3D10Texture2D *aTexture, SurfaceFormat aForm
hr = aTexture->QueryInterface((IDXGISurface**)byRef(surface));
if (FAILED(hr)) {
gfxCriticalError() << "Failed to QI texture to surface. Code: " << hr;
gfxCriticalError() << "Failed to QI texture to surface. Code: " << hexa(hr);
return nullptr;
}
@ -1982,7 +1982,8 @@ DrawTargetD2D::CreateRTForTexture(ID3D10Texture2D *aTexture, SurfaceFormat aForm
hr = factory()->CreateDxgiSurfaceRenderTarget(surface, props, byRef(rt));
if (FAILED(hr)) {
gfxCriticalError() << "Failed to create D2D render target for texture. Code:" << hr << " " << mSize << " Format: " << uint32_t(aFormat);
gfxCriticalError() << "Failed to create D2D render target for texture. Code: "
<< hexa(hr) << " " << mSize << " Format: " << uint32_t(aFormat);
return nullptr;
}

View File

@ -413,7 +413,8 @@ CompositorD3D11::GetTextureFactoryIdentifier()
if (mAttachments->mSyncTexture) {
HRESULT hr = mAttachments->mSyncTexture->GetSharedHandle(&ident.mSyncHandle);
if (FAILED(hr) || !ident.mSyncHandle) {
gfxCriticalError() << "Failed to get SharedHandle for sync texture. Result: " << hr;
gfxCriticalError() << "Failed to get SharedHandle for sync texture. Result: "
<< hexa(hr);
MOZ_CRASH();
}
}
@ -1342,7 +1343,7 @@ CompositorD3D11::UpdateConstantBuffers()
hr = mContext->Map(mAttachments->mVSConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &resource);
if (Failed(hr) || !resource.pData) {
gfxCriticalError() << "Failed to map VSConstantBuffer. Result: " << hr;
gfxCriticalError() << "Failed to map VSConstantBuffer. Result: " << hexa(hr);
return false;
}
*(VertexShaderConstants*)resource.pData = mVSConstants;
@ -1351,7 +1352,7 @@ CompositorD3D11::UpdateConstantBuffers()
hr = mContext->Map(mAttachments->mPSConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &resource);
if (Failed(hr) || !resource.pData) {
gfxCriticalError() << "Failed to map PSConstantBuffer. Result: " << hr;
gfxCriticalError() << "Failed to map PSConstantBuffer. Result: " << hexa(hr);
return false;
}
*(PixelShaderConstants*)resource.pData = mPSConstants;

View File

@ -1980,7 +1980,7 @@ gfxWindowsPlatform::InitD3D11Devices()
if (FAILED(hr)) {
// This should always succeed... in theory.
gfxCriticalError() << "Failed to initialize WARP D3D11 device!" << hr;
gfxCriticalError() << "Failed to initialize WARP D3D11 device! " << hexa(hr);
return;
}