diff --git a/src/d3d8/d3d8_d3d9_util.h b/src/d3d8/d3d8_d3d9_util.h index 9c9a8c66..2d795b70 100644 --- a/src/d3d8/d3d8_d3d9_util.h +++ b/src/d3d8/d3d8_d3d9_util.h @@ -81,7 +81,7 @@ namespace dxvk { if (unlikely(PresentationInterval != D3DPRESENT_INTERVAL_DEFAULT)) { // TODO: what does dx8 do if windowed app sets FullScreen_PresentationInterval? 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.")); } diff --git a/src/d3d8/d3d8_device.cpp b/src/d3d8/d3d8_device.cpp index 26bbf8c6..71ada1e7 100644 --- a/src/d3d8/d3d8_device.cpp +++ b/src/d3d8/d3d8_device.cpp @@ -696,7 +696,7 @@ namespace dxvk { POINT dstPt = { dstRect.left, dstRect.top }; 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; }; @@ -704,7 +704,7 @@ namespace dxvk { if (FAILED(res)) { // 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. - 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; }; @@ -1014,7 +1014,7 @@ namespace dxvk { bool isOnePixelTaller = pViewport->Y + pViewport->Height == rtDesc.Height + 1; 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 { return D3DERR_INVALIDCALL; } @@ -1097,8 +1097,8 @@ namespace dxvk { auto stateBlockIter = m_stateBlocks.find(Token); if (unlikely(stateBlockIter == m_stateBlocks.end())) { - Logger::err("Invalid token passed to CaptureStateBlock"); - return D3DERR_INVALIDCALL; + Logger::warn(str::format("D3D8Device::CaptureStateBlock: Invalid token: ", std::hex, Token)); + return D3D_OK; } return stateBlockIter->second.Capture(); @@ -1112,8 +1112,8 @@ namespace dxvk { auto stateBlockIter = m_stateBlocks.find(Token); if (unlikely(stateBlockIter == m_stateBlocks.end())) { - Logger::err("Invalid token passed to ApplyStateBlock"); - return D3DERR_INVALIDCALL; + Logger::warn(str::format("D3D8Device::ApplyStateBlock: Invalid token: ", std::hex, Token)); + return D3D_OK; } return stateBlockIter->second.Apply(); @@ -1129,8 +1129,8 @@ namespace dxvk { auto stateBlockIter = m_stateBlocks.find(Token); if (unlikely(stateBlockIter == m_stateBlocks.end())) { - Logger::err("Invalid token passed to DeleteStateBlock"); - return D3DERR_INVALIDCALL; + Logger::warn(str::format("D3D8Device::DeleteStateBlock: Invalid token: ", std::hex, Token)); + return D3D_OK; } m_stateBlocks.erase(stateBlockIter); @@ -1444,7 +1444,7 @@ namespace dxvk { return m_recorder->SetIndices(pIndexData, BaseVertexIndex); 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 m_baseVertexIndex = BaseVertexIndex; @@ -1672,14 +1672,14 @@ namespace dxvk { Handle = getShaderIndex(Handle); 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; } D3D8VertexShaderInfo& info = device->m_vertexShaders[Handle]; 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; } @@ -1873,14 +1873,14 @@ namespace dxvk { Handle = getShaderIndex(Handle); 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; } d3d9::IDirect3DPixelShader9* pPixelShader = device->m_pixelShaders[Handle].ptr(); 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; } diff --git a/src/d3d8/d3d8_main.cpp b/src/d3d8/d3d8_main.cpp index ce8512b3..301d5cfb 100644 --- a/src/d3d8/d3d8_main.cpp +++ b/src/d3d8/d3d8_main.cpp @@ -52,8 +52,6 @@ extern "C" { } DLLEXPORT IDirect3D8* __stdcall Direct3DCreate8(UINT nSDKVersion) { - dxvk::Logger::trace("Direct3DCreate8 called"); - IDirect3D8* pDirect3D = nullptr; dxvk::CreateD3D8(&pDirect3D); diff --git a/src/d3d8/d3d8_shader.cpp b/src/d3d8/d3d8_shader.cpp index 7b44ba5e..2957a4a3 100644 --- a/src/d3d8/d3d8_shader.cpp +++ b/src/d3d8/d3d8_shader.cpp @@ -138,7 +138,7 @@ namespace dxvk { DWORD token; std::stringstream dbg; - dbg << "Vertex Declaration Tokens:\n\t"; + dbg << "D3D8: Vertex Declaration Tokens:\n\t"; WORD currentStream = 0; WORD currentOffset = 0; diff --git a/src/d3d8/d3d8_state_block.h b/src/d3d8/d3d8_state_block.h index 1976e79c..46a35c5a 100644 --- a/src/d3d8/d3d8_state_block.h +++ b/src/d3d8/d3d8_state_block.h @@ -75,7 +75,7 @@ namespace dxvk { if (likely(m_stateBlock == nullptr)) { m_stateBlock = std::move(pStateBlock); } else { - Logger::err("D3D8StateBlock::SetD3D9 called when m_stateBlock has already been initialized"); + Logger::err("D3D8StateBlock::SetD3D9: m_stateBlock has already been initialized"); } }