pushbufferz
This commit is contained in:
parent
d848ad3d04
commit
4f1ca111aa
|
@ -1644,6 +1644,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetRenderTarget
|
|||
|
||||
*ppRenderTarget = g_pCachedRenderTarget;
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuD3D8 (0x%X): RenderTarget := 0x%.08X\n", pSurface8);
|
||||
#endif
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return D3D_OK;
|
||||
|
@ -1668,6 +1672,10 @@ XTL::X_D3DSurface * WINAPI XTL::EmuIDirect3DDevice8_GetRenderTarget2()
|
|||
|
||||
pSurface8->AddRef();
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuD3D8 (0x%X): RenderTarget := 0x%.08X\n", pSurface8);
|
||||
#endif
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return g_pCachedRenderTarget;
|
||||
|
@ -1701,6 +1709,10 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_GetDepthStencilSurface
|
|||
|
||||
*ppZStencilSurface = g_pCachedZStencilSurface;
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuD3D8 (0x%X): DepthStencilSurface := 0x%.08X\n", pSurface8);
|
||||
#endif
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return D3D_OK;
|
||||
|
@ -1726,6 +1738,10 @@ XTL::X_D3DSurface * WINAPI XTL::EmuIDirect3DDevice8_GetDepthStencilSurface2()
|
|||
if(pSurface8 != 0)
|
||||
pSurface8->AddRef();
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuD3D8 (0x%X): DepthStencilSurface := 0x%.08X\n", pSurface8);
|
||||
#endif
|
||||
|
||||
EmuSwapFS(); // Xbox FS
|
||||
|
||||
return g_pCachedZStencilSurface;
|
||||
|
@ -2194,7 +2210,7 @@ HRESULT WINAPI XTL::EmuIDirect3DDevice8_CreateTexture
|
|||
EmuWarning("CreateTexture Failed!");
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuD3D8 (0x%X): Created Texture : 0x%.08X\n", GetCurrentThreadId(), *ppTexture);
|
||||
printf("EmuD3D8 (0x%X): Created Texture : 0x%.08X (0x%.08X)\n", GetCurrentThreadId(), *ppTexture, (*ppTexture)->EmuTexture8);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -3132,7 +3148,6 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_RunPushBuffer
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
_asm int 3
|
||||
|
||||
DWORD *pdwPushData = (DWORD*)pPushBuffer->Data;
|
||||
|
@ -3141,6 +3156,27 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_RunPushBuffer
|
|||
|
||||
D3DPRIMITIVETYPE PCPrimitiveType;
|
||||
|
||||
// retrieve the current stream source for debugging purposes
|
||||
{
|
||||
IDirect3DVertexBuffer8 *pVertexBuffer8=0;
|
||||
|
||||
UINT dwStride=0;
|
||||
|
||||
HRESULT hRet = g_pD3DDevice8->GetStreamSource(0, &pVertexBuffer8, &dwStride);
|
||||
|
||||
if(FAILED(hRet))
|
||||
EmuCleanup("Unable to retrieve current stream source!");
|
||||
|
||||
D3DVERTEXBUFFER_DESC Desc;
|
||||
|
||||
hRet = pVertexBuffer8->GetDesc(&Desc);
|
||||
|
||||
BYTE *pbData=0;
|
||||
hRet = pVertexBuffer8->Lock(0, 0, &pbData, NULL);
|
||||
|
||||
pVertexBuffer8->Unlock();
|
||||
}
|
||||
|
||||
while(*pdwPushData != 0)
|
||||
{
|
||||
switch(*pdwPushData++)
|
||||
|
@ -3197,7 +3233,7 @@ VOID WINAPI XTL::EmuIDirect3DDevice8_RunPushBuffer
|
|||
}
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
EmuWarning("PushBuffers not supported!");
|
||||
|
||||
|
@ -3608,6 +3644,13 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
|
|||
if(dwCommonType == X_D3DCOMMON_TYPE_SURFACE)
|
||||
{
|
||||
hRet = g_pD3DDevice8->CreateImageSurface(dwWidth, dwHeight, Format, &pResource->EmuSurface8);
|
||||
|
||||
if(FAILED(hRet))
|
||||
EmuCleanup("CreateImageSurface Failed!");
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created ImageSurface (0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource, pResource->EmuSurface8);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3644,6 +3687,10 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
|
|||
|
||||
if(FAILED(hRet))
|
||||
EmuCleanup("CreateCubeTexture Failed!");
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created CubeTexture (0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource, pResource->EmuCubeTexture8);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3660,6 +3707,10 @@ HRESULT WINAPI XTL::EmuIDirect3DResource8_Register
|
|||
|
||||
if(FAILED(hRet))
|
||||
EmuCleanup("CreateTexture Failed!");
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
printf("EmuIDirect3DResource8_Register (0x%X) : Successfully Created Texture (0x%.08X, 0x%.08X)\n", GetCurrentThreadId(), pResource, pResource->EmuTexture8);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4331,6 +4382,13 @@ HRESULT WINAPI XTL::EmuIDirect3DTexture8_GetSurfaceLevel
|
|||
*ppSurfaceLevel = new X_D3DSurface();
|
||||
|
||||
hRet = pTexture8->GetSurfaceLevel(Level, &((*ppSurfaceLevel)->EmuSurface8));
|
||||
|
||||
#ifdef _DEBUG_TRACE
|
||||
if(!FAILED(hRet))
|
||||
{
|
||||
printf("EmuD3D8 (0x%X): EmuIDirect3DTexture8_GetSurfaceLevel := 0x%.08X\n", GetCurrentThreadId(), (*ppSurfaceLevel)->EmuSurface8);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
EmuSwapFS(); // XBox FS
|
||||
|
|
|
@ -126,6 +126,7 @@ PVOID WINAPI XTL::EmuRtlAllocateHeap
|
|||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
/* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlAllocateHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
|
@ -133,6 +134,7 @@ PVOID WINAPI XTL::EmuRtlAllocateHeap
|
|||
" dwBytes : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, dwBytes);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -160,6 +162,7 @@ BOOL WINAPI XTL::EmuRtlFreeHeap
|
|||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
/* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlFreeHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
|
@ -167,6 +170,7 @@ BOOL WINAPI XTL::EmuRtlFreeHeap
|
|||
" lpMem : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -194,6 +198,7 @@ SIZE_T WINAPI XTL::EmuRtlSizeHeap
|
|||
// ******************************************************************
|
||||
#ifdef _DEBUG_TRACE
|
||||
{
|
||||
/* too much debug output
|
||||
printf("EmuXapi (0x%X): EmuRtlSizeHeap\n"
|
||||
"(\n"
|
||||
" hHeap : 0x%.08X\n"
|
||||
|
@ -201,6 +206,7 @@ SIZE_T WINAPI XTL::EmuRtlSizeHeap
|
|||
" lpMem : 0x%.08X\n"
|
||||
");\n",
|
||||
GetCurrentThreadId(), hHeap, dwFlags, lpMem);
|
||||
//*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue