From 18839d868b045b72c056b6086f16cc5a234bee40 Mon Sep 17 00:00:00 2001 From: Luke Usher Date: Thu, 8 Mar 2018 08:56:10 +0000 Subject: [PATCH] Attempt to fix PushBuffer non-FVF issue --- src/CxbxKrnl/EmuD3D8/PixelShader.cpp | 1 - src/CxbxKrnl/EmuD3D8/PushBuffer.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/CxbxKrnl/EmuD3D8/PixelShader.cpp b/src/CxbxKrnl/EmuD3D8/PixelShader.cpp index b8368f72c..0b58e3bb0 100644 --- a/src/CxbxKrnl/EmuD3D8/PixelShader.cpp +++ b/src/CxbxKrnl/EmuD3D8/PixelShader.cpp @@ -3982,7 +3982,6 @@ static const EmuWarning("Could not create pixel shader"); EmuWarning(std::string((char*)pErrors->GetBufferPointer(), pErrors->GetBufferSize()).c_str()); - // We use printf instead of EmuWarning here, because EmuWarning has an upper limit which some shaders overflow... printf(ConvertedPixelShaderStr.c_str()); hRet = D3DXAssembleShader( diff --git a/src/CxbxKrnl/EmuD3D8/PushBuffer.cpp b/src/CxbxKrnl/EmuD3D8/PushBuffer.cpp index 49e8a85db..98dc020ee 100644 --- a/src/CxbxKrnl/EmuD3D8/PushBuffer.cpp +++ b/src/CxbxKrnl/EmuD3D8/PushBuffer.cpp @@ -181,10 +181,10 @@ extern void XTL::EmuExecutePushBufferRaw pdwPushData += dwCount; // retrieve vertex shader - g_pD3DDevice8->GetVertexShader(&dwVertexShader); + DWORD dwVertexShader = g_CurrentVertexShader; - if(dwVertexShader > 0xFFFF) - { + if (VshHandleIsVertexShader(dwVertexShader)) + { CxbxKrnlCleanup("Non-FVF Vertex Shaders not yet supported for PushBuffer emulation!"); dwVertexShader = 0; }