https://bugs.winehq.org/show_bug.cgi?id=36820
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Component|-unknown |directx-d3dx9 Resolution|--- |DUPLICATE Summary|RIFT crashes on startup |RIFT crashes on startup | |(ID3DXBaseEffect::GetPassDe | |sc returns NULL ptr for | |vertex and pixel shader | |function)
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
ok, I managed to attach a debugger at right place and can see where that NULL pointer comes from.
The engine calls 'ID3DXBaseEffect::GetPassDesc' method before and passes the address of D3DXPASS_DESC* (out parameter)
--- snip --- 00689CB9 8B0B MOV ECX,DWORD PTR DS:[EBX] 00689CBB 8D5424 5C LEA EDX,DWORD PTR SS:[ESP+5C] ; D3DXPASS_DESC* 00689CBF 52 PUSH EDX 00689CC0 50 PUSH EAX 00689CC1 8B41 18 MOV EAX,DWORD PTR DS:[ECX+18] 00689CC4 53 PUSH EBX 00689CC5 FFD0 CALL EAX ; ID3DXBaseEffect::GetPassDesc 00689CC7 8B5424 64 MOV EDX,DWORD PTR SS:[ESP+64] ; pVertexShaderFunction 00689CCB 8D4C24 1C LEA ECX,DWORD PTR SS:[ESP+1C] 00689CCF 51 PUSH ECX 00689CD0 68 00000200 PUSH 20000 00689CD5 52 PUSH EDX 00689CD6 E8 5D0A1601 CALL 017EA738 ; D3DXGetShaderConstantTableEx --- snip ---
MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/bb205381%28v=vs.85%2...
--- quote --- typedef struct D3DXPASS_DESC { LPCSTR Name; UINT Annotations; const DWORD *pVertexShaderFunction; const DWORD *pPixelShaderFunction; } D3DXPASS_DESC, *LPD3DXPASS_DESC; --- quote ---
The C code would be something like this (for illustration):
--- snip --- D3DXPASS_DESC passDesc; ID3DXConstantTable* pConstantTable;
D3DXHANDLE hPass = pD3DEffect->GetPass(hTechnique, 0); pD3DEffect->GetPassDesc(hPass, &passDesc);
D3DXGetShaderConstantTableEx(passDesc.pVertexShaderFunction, D3DXCONSTTABLE_LARGEADDRESSAWARE, &pConstantTable); ... --- snip ---
That would make this one a dupe of bug 34551
Regards
*** This bug has been marked as a duplicate of bug 34551 ***