Merge pull request #1216 from PatrickvL/FixPushbufferResources

D3D : Fix pushbuffer based drawing
This commit is contained in:
PatrickvL 2018-05-29 19:37:05 +02:00 committed by GitHub
commit 2d81b79587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 7 deletions

View File

@ -7468,7 +7468,7 @@ void EmuUpdateActiveTextureStages()
}
}
void CxbxUpdateNativeD3DResources()
void XTL::CxbxUpdateNativeD3DResources()
{
EmuUpdateActiveTextureStages();

View File

@ -205,9 +205,7 @@ extern void XTL::EmuExecutePushBufferRaw
X_D3DPRIMITIVETYPE XboxPrimitiveType = X_D3DPT_INVALID;
// TODO: This technically should be enabled
XTL::EmuUpdateDeferredStates();
EmuUpdateActiveTextureStages();
CxbxUpdateNativeD3DResources();
#ifdef _DEBUG_TRACK_PB
bool bShowPB = false;

View File

@ -53,4 +53,6 @@ extern DWORD *EmuD3DDeferredTextureState;
extern void EmuUpdateDeferredStates();
extern void CxbxUpdateNativeD3DResources();
#endif

View File

@ -820,8 +820,7 @@ void XTL::CxbxVertexBufferConverter::Apply(CxbxDrawContext *pDrawContext)
VOID XTL::EmuFlushIVB()
{
XTL::EmuUpdateDeferredStates();
EmuUpdateActiveTextureStages();
CxbxUpdateNativeD3DResources();
// Parse IVB table with current FVF shader if possible.
bool bFVF = VshHandleIsFVF(g_CurrentXboxVertexShaderHandle);

View File

@ -2404,7 +2404,7 @@ extern HRESULT XTL::EmuRecompileVshFunction
// Build an array of registers that are declared
// This is used to remove instructions that haven't been declared
// as they cause CreateVertexShader to fail
bool declaredRegisters[13];
bool declaredRegisters[13] = { false };
DWORD* pDeclToken = pRecompiledDeclaration;
do {
DWORD regNum = *pDeclToken & X_D3DVSD_VERTEXREGMASK;