EndPush, etc
This commit is contained in:
parent
c761bfd6b8
commit
d6613887db
|
@ -63,10 +63,10 @@ typedef signed long sint32;
|
||||||
//#define _DEBUG_ALLOC
|
//#define _DEBUG_ALLOC
|
||||||
|
|
||||||
// define this to trace intercepted function calls
|
// define this to trace intercepted function calls
|
||||||
//#define _DEBUG_TRACE
|
#define _DEBUG_TRACE
|
||||||
|
|
||||||
// define this to trace warnings
|
// define this to trace warnings
|
||||||
//#define _DEBUG_WARNINGS
|
#define _DEBUG_WARNINGS
|
||||||
|
|
||||||
// version information
|
// version information
|
||||||
#ifndef _DEBUG_TRACE
|
#ifndef _DEBUG_TRACE
|
||||||
|
|
|
@ -98,6 +98,11 @@ VOID WINAPI EmuIDirect3DDevice8_GetDeviceCaps
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
PDWORD WINAPI EmuIDirect3DDevice8_BeginPush(DWORD Count);
|
PDWORD WINAPI EmuIDirect3DDevice8_BeginPush(DWORD Count);
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * func: EmuIDirect3DDevice8_EndPush
|
||||||
|
// ******************************************************************
|
||||||
|
VOID WINAPI EmuIDirect3DDevice8_EndPush(DWORD *pPush);
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: EmuIDirect3DDevice8_BeginVisibilityTest
|
// * func: EmuIDirect3DDevice8_BeginVisibilityTest
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
|
@ -101,7 +101,8 @@ extern bool bXRefFirstPass;
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
enum XRefDataBaseOffset
|
enum XRefDataBaseOffset
|
||||||
{
|
{
|
||||||
XREF_DXSRSCULLMODE=0,
|
XREF_D3DDEVICE=0,
|
||||||
|
XREF_DXSRSCULLMODE,
|
||||||
XREF_D3DRS_ROPZCMPALWAYSREAD,
|
XREF_D3DRS_ROPZCMPALWAYSREAD,
|
||||||
XREF_D3DRS_ROPZREAD,
|
XREF_D3DRS_ROPZREAD,
|
||||||
XREF_D3DRS_DONOTCULLUNCOMPRESSED,
|
XREF_D3DRS_DONOTCULLUNCOMPRESSED,
|
||||||
|
|
|
@ -516,6 +516,7 @@ extern "C" CXBXKRNL_API void NTAPI EmuInit
|
||||||
patchOffset = 162*4 - 92*4;
|
patchOffset = 162*4 - 92*4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XRefDataBase[XREF_D3DDEVICE] = *(DWORD*)((DWORD)pFunc + 0x03);
|
||||||
XRefDataBase[XREF_D3DRS_STENCILCULLENABLE] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 0*4;
|
XRefDataBase[XREF_D3DRS_STENCILCULLENABLE] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 0*4;
|
||||||
XRefDataBase[XREF_D3DRS_ROPZCMPALWAYSREAD] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 1*4;
|
XRefDataBase[XREF_D3DRS_ROPZCMPALWAYSREAD] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 1*4;
|
||||||
XRefDataBase[XREF_D3DRS_ROPZREAD] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 2*4;
|
XRefDataBase[XREF_D3DRS_ROPZREAD] = (uint32)XTL::EmuD3DDeferredRenderState + patchOffset + 2*4;
|
||||||
|
|
|
@ -1123,13 +1123,34 @@ PDWORD WINAPI XTL::EmuIDirect3DDevice8_BeginPush(DWORD Count)
|
||||||
|
|
||||||
DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginPush(%d);\n", GetCurrentThreadId(), Count);
|
DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_BeginPush(%d);\n", GetCurrentThreadId(), Count);
|
||||||
|
|
||||||
EmuCleanup("_BeginPush(...) is not yet implemented\n");
|
DWORD *pRet = new DWORD[Count];
|
||||||
|
|
||||||
EmuSwapFS(); // XBox FS
|
EmuSwapFS(); // XBox FS
|
||||||
|
|
||||||
return NULL;
|
return pRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * func: EmuIDirect3DDevice8_EndPush
|
||||||
|
// ******************************************************************
|
||||||
|
VOID WINAPI XTL::EmuIDirect3DDevice8_EndPush(DWORD *pPush)
|
||||||
|
{
|
||||||
|
EmuSwapFS(); // Win2k/XP FS
|
||||||
|
|
||||||
|
DbgPrintf("EmuD3D8 (0x%X): EmuIDirect3DDevice8_EndPush(0x%.08X);\n", GetCurrentThreadId(), pPush);
|
||||||
|
|
||||||
|
// TODO: Delete push buffer??
|
||||||
|
|
||||||
|
EmuSwapFS(); // XBox FS
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * func: EmuIDirect3DDevice8_EndPush
|
||||||
|
// ******************************************************************
|
||||||
|
VOID WINAPI EmuIDirect3DDevice8_EndPush(DWORD *pPush);
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * func: EmuIDirect3DDevice8_BeginVisibilityTest
|
// * func: EmuIDirect3DDevice8_BeginVisibilityTest
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
|
|
@ -258,6 +258,7 @@ extern uint32 HLEDataBaseSize = sizeof(HLEDataBase);
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
extern uint32 XRefDataBase[] =
|
extern uint32 XRefDataBase[] =
|
||||||
{
|
{
|
||||||
|
-1, // XREF_D3DDEVICE
|
||||||
-1, // XREF_DXSRSCULLMODE
|
-1, // XREF_DXSRSCULLMODE
|
||||||
-1, // XREF_D3DRS_ROPZCMPALWAYSREAD
|
-1, // XREF_D3DRS_ROPZCMPALWAYSREAD
|
||||||
-1, // XREF_D3DRS_ROPZREAD
|
-1, // XREF_D3DRS_ROPZREAD
|
||||||
|
|
|
@ -91,6 +91,34 @@ SOOVPA<10> IDirect3DDevice8_BeginPush_1_0_5558 =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ******************************************************************
|
||||||
|
// * IDirect3DDevice8_EndPush
|
||||||
|
// ******************************************************************
|
||||||
|
SOOVPA<12> IDirect3DDevice8_EndPush_1_0_5558 =
|
||||||
|
{
|
||||||
|
0, // Large == 0
|
||||||
|
12, // Count == 10
|
||||||
|
|
||||||
|
-1, // Xref Not Saved
|
||||||
|
1, // Xref Is Used
|
||||||
|
|
||||||
|
{
|
||||||
|
{ 0x06, XREF_D3DDEVICE }, // 1
|
||||||
|
|
||||||
|
{ 0x00, 0x8B }, // 2
|
||||||
|
{ 0x01, 0x44 }, // 3
|
||||||
|
{ 0x02, 0x24 }, // 4
|
||||||
|
{ 0x03, 0x04 }, // 5
|
||||||
|
{ 0x04, 0x8B }, // 6
|
||||||
|
{ 0x05, 0x0D }, // 7
|
||||||
|
{ 0x0A, 0x89 }, // 8
|
||||||
|
{ 0x0B, 0x01 }, // 9
|
||||||
|
{ 0x0C, 0xC2 }, // 10
|
||||||
|
{ 0x0D, 0x04 }, // 11
|
||||||
|
{ 0x0E, 0x00 }, // 12
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// * IDirect3DDevice8_LoadVertexShader
|
// * IDirect3DDevice8_LoadVertexShader
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
|
@ -748,6 +776,16 @@ OOVPATable D3D8_1_0_5558[] =
|
||||||
"EmuIDirect3DDevice8_BeginPush"
|
"EmuIDirect3DDevice8_BeginPush"
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
|
// IDirect3DDevice8::EndPush
|
||||||
|
{
|
||||||
|
(OOVPA*)&IDirect3DDevice8_EndPush_1_0_5558,
|
||||||
|
|
||||||
|
XTL::EmuIDirect3DDevice8_EndPush,
|
||||||
|
|
||||||
|
#ifdef _DEBUG_TRACE
|
||||||
|
"EmuIDirect3DDevice8_EndPush"
|
||||||
|
#endif
|
||||||
|
},
|
||||||
// D3DDevice_RunVertexStateShader (* unchanged since 4627 *)
|
// D3DDevice_RunVertexStateShader (* unchanged since 4627 *)
|
||||||
{
|
{
|
||||||
(OOVPA*)&X_D3DDevice_RunVertexStateShader_1_0_4627,
|
(OOVPA*)&X_D3DDevice_RunVertexStateShader_1_0_4627,
|
||||||
|
|
Loading…
Reference in New Issue