mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-11 10:24:10 +01:00
[d3d8] Various logging format adjustments
This commit is contained in:
parent
559398f6a4
commit
7eec8fb8dc
@ -81,7 +81,7 @@ namespace dxvk {
|
|||||||
if (unlikely(PresentationInterval != D3DPRESENT_INTERVAL_DEFAULT)) {
|
if (unlikely(PresentationInterval != D3DPRESENT_INTERVAL_DEFAULT)) {
|
||||||
// TODO: what does dx8 do if windowed app sets FullScreen_PresentationInterval?
|
// TODO: what does dx8 do if windowed app sets FullScreen_PresentationInterval?
|
||||||
Logger::warn(str::format(
|
Logger::warn(str::format(
|
||||||
"D3D8 Application is windowed yet requested FullScreen_PresentationInterval ", PresentationInterval,
|
"D3D8: Application is windowed yet requested FullScreen_PresentationInterval ", PresentationInterval,
|
||||||
" (should be D3DPRESENT_INTERVAL_DEFAULT). This will be ignored."));
|
" (should be D3DPRESENT_INTERVAL_DEFAULT). This will be ignored."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ namespace dxvk {
|
|||||||
POINT dstPt = { dstRect.left, dstRect.top };
|
POINT dstPt = { dstRect.left, dstRect.top };
|
||||||
|
|
||||||
auto unhandled = [&] {
|
auto unhandled = [&] {
|
||||||
Logger::warn(str::format("CopyRects: Hit unhandled case from src pool ", srcDesc.Pool, " to dst pool ", dstDesc.Pool));
|
Logger::warn(str::format("D3D8Device::CopyRects: Unhandled case from src pool ", srcDesc.Pool, " to dst pool ", dstDesc.Pool));
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -704,7 +704,7 @@ namespace dxvk {
|
|||||||
if (FAILED(res)) {
|
if (FAILED(res)) {
|
||||||
// Only a debug message because some games mess up CopyRects every frame in a way
|
// Only a debug message because some games mess up CopyRects every frame in a way
|
||||||
// that fails on native too but are perfectly fine with it.
|
// that fails on native too but are perfectly fine with it.
|
||||||
Logger::debug(str::format("CopyRects: FAILED to copy from src pool ", srcDesc.Pool, " to dst pool ", dstDesc.Pool));
|
Logger::debug(str::format("D3D8Device::CopyRects: Failed to copy from src pool ", srcDesc.Pool, " to dst pool ", dstDesc.Pool));
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
@ -1014,7 +1014,7 @@ namespace dxvk {
|
|||||||
bool isOnePixelTaller = pViewport->Y + pViewport->Height == rtDesc.Height + 1;
|
bool isOnePixelTaller = pViewport->Y + pViewport->Height == rtDesc.Height + 1;
|
||||||
|
|
||||||
if (m_presentParams.Windowed && (isOnePixelWider || isOnePixelTaller)) {
|
if (m_presentParams.Windowed && (isOnePixelWider || isOnePixelTaller)) {
|
||||||
Logger::debug("Viewport exceeds render target dimensions by one pixel");
|
Logger::debug("D3D8Device::SetViewport: Viewport exceeds render target dimensions by one pixel");
|
||||||
} else {
|
} else {
|
||||||
return D3DERR_INVALIDCALL;
|
return D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
@ -1097,8 +1097,8 @@ namespace dxvk {
|
|||||||
auto stateBlockIter = m_stateBlocks.find(Token);
|
auto stateBlockIter = m_stateBlocks.find(Token);
|
||||||
|
|
||||||
if (unlikely(stateBlockIter == m_stateBlocks.end())) {
|
if (unlikely(stateBlockIter == m_stateBlocks.end())) {
|
||||||
Logger::err("Invalid token passed to CaptureStateBlock");
|
Logger::warn(str::format("D3D8Device::CaptureStateBlock: Invalid token: ", std::hex, Token));
|
||||||
return D3DERR_INVALIDCALL;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return stateBlockIter->second.Capture();
|
return stateBlockIter->second.Capture();
|
||||||
@ -1112,8 +1112,8 @@ namespace dxvk {
|
|||||||
auto stateBlockIter = m_stateBlocks.find(Token);
|
auto stateBlockIter = m_stateBlocks.find(Token);
|
||||||
|
|
||||||
if (unlikely(stateBlockIter == m_stateBlocks.end())) {
|
if (unlikely(stateBlockIter == m_stateBlocks.end())) {
|
||||||
Logger::err("Invalid token passed to ApplyStateBlock");
|
Logger::warn(str::format("D3D8Device::ApplyStateBlock: Invalid token: ", std::hex, Token));
|
||||||
return D3DERR_INVALIDCALL;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return stateBlockIter->second.Apply();
|
return stateBlockIter->second.Apply();
|
||||||
@ -1129,8 +1129,8 @@ namespace dxvk {
|
|||||||
auto stateBlockIter = m_stateBlocks.find(Token);
|
auto stateBlockIter = m_stateBlocks.find(Token);
|
||||||
|
|
||||||
if (unlikely(stateBlockIter == m_stateBlocks.end())) {
|
if (unlikely(stateBlockIter == m_stateBlocks.end())) {
|
||||||
Logger::err("Invalid token passed to DeleteStateBlock");
|
Logger::warn(str::format("D3D8Device::DeleteStateBlock: Invalid token: ", std::hex, Token));
|
||||||
return D3DERR_INVALIDCALL;
|
return D3D_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_stateBlocks.erase(stateBlockIter);
|
m_stateBlocks.erase(stateBlockIter);
|
||||||
@ -1444,7 +1444,7 @@ namespace dxvk {
|
|||||||
return m_recorder->SetIndices(pIndexData, BaseVertexIndex);
|
return m_recorder->SetIndices(pIndexData, BaseVertexIndex);
|
||||||
|
|
||||||
if (unlikely(BaseVertexIndex > INT_MAX))
|
if (unlikely(BaseVertexIndex > INT_MAX))
|
||||||
Logger::warn("BaseVertexIndex exceeds INT_MAX and will be clamped on use.");
|
Logger::warn("D3D8Device::SetIndices: BaseVertexIndex exceeds INT_MAX");
|
||||||
|
|
||||||
// used by DrawIndexedPrimitive
|
// used by DrawIndexedPrimitive
|
||||||
m_baseVertexIndex = BaseVertexIndex;
|
m_baseVertexIndex = BaseVertexIndex;
|
||||||
@ -1672,14 +1672,14 @@ namespace dxvk {
|
|||||||
Handle = getShaderIndex(Handle);
|
Handle = getShaderIndex(Handle);
|
||||||
|
|
||||||
if (unlikely(Handle >= device->m_vertexShaders.size())) {
|
if (unlikely(Handle >= device->m_vertexShaders.size())) {
|
||||||
Logger::debug(str::format("getVertexShaderInfo: Invalid vertex shader index ", std::hex, Handle));
|
Logger::debug(str::format("D3D8: Invalid vertex shader index ", std::hex, Handle));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
D3D8VertexShaderInfo& info = device->m_vertexShaders[Handle];
|
D3D8VertexShaderInfo& info = device->m_vertexShaders[Handle];
|
||||||
|
|
||||||
if (unlikely(info.pVertexDecl == nullptr && info.pVertexShader == nullptr)) {
|
if (unlikely(info.pVertexDecl == nullptr && info.pVertexShader == nullptr)) {
|
||||||
Logger::debug(str::format("getVertexShaderInfo: Application provided deleted vertex shader ", std::hex, Handle));
|
Logger::debug(str::format("D3D8: Application provided deleted vertex shader ", std::hex, Handle));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1873,14 +1873,14 @@ namespace dxvk {
|
|||||||
Handle = getShaderIndex(Handle);
|
Handle = getShaderIndex(Handle);
|
||||||
|
|
||||||
if (unlikely(Handle >= device->m_pixelShaders.size())) {
|
if (unlikely(Handle >= device->m_pixelShaders.size())) {
|
||||||
Logger::debug(str::format("getPixelShaderPtr: Invalid pixel shader index ", std::hex, Handle));
|
Logger::debug(str::format("D3D8: Invalid pixel shader index ", std::hex, Handle));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
d3d9::IDirect3DPixelShader9* pPixelShader = device->m_pixelShaders[Handle].ptr();
|
d3d9::IDirect3DPixelShader9* pPixelShader = device->m_pixelShaders[Handle].ptr();
|
||||||
|
|
||||||
if (unlikely(pPixelShader == nullptr)) {
|
if (unlikely(pPixelShader == nullptr)) {
|
||||||
Logger::debug(str::format("getPixelShaderPtr: Application provided deleted pixel shader ", std::hex, Handle));
|
Logger::debug(str::format("D3D8: Application provided deleted pixel shader ", std::hex, Handle));
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,8 +52,6 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DLLEXPORT IDirect3D8* __stdcall Direct3DCreate8(UINT nSDKVersion) {
|
DLLEXPORT IDirect3D8* __stdcall Direct3DCreate8(UINT nSDKVersion) {
|
||||||
dxvk::Logger::trace("Direct3DCreate8 called");
|
|
||||||
|
|
||||||
IDirect3D8* pDirect3D = nullptr;
|
IDirect3D8* pDirect3D = nullptr;
|
||||||
dxvk::CreateD3D8(&pDirect3D);
|
dxvk::CreateD3D8(&pDirect3D);
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ namespace dxvk {
|
|||||||
DWORD token;
|
DWORD token;
|
||||||
|
|
||||||
std::stringstream dbg;
|
std::stringstream dbg;
|
||||||
dbg << "Vertex Declaration Tokens:\n\t";
|
dbg << "D3D8: Vertex Declaration Tokens:\n\t";
|
||||||
|
|
||||||
WORD currentStream = 0;
|
WORD currentStream = 0;
|
||||||
WORD currentOffset = 0;
|
WORD currentOffset = 0;
|
||||||
|
@ -75,7 +75,7 @@ namespace dxvk {
|
|||||||
if (likely(m_stateBlock == nullptr)) {
|
if (likely(m_stateBlock == nullptr)) {
|
||||||
m_stateBlock = std::move(pStateBlock);
|
m_stateBlock = std::move(pStateBlock);
|
||||||
} else {
|
} else {
|
||||||
Logger::err("D3D8StateBlock::SetD3D9 called when m_stateBlock has already been initialized");
|
Logger::err("D3D8StateBlock::SetD3D9: m_stateBlock has already been initialized");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user