Remove unneeded HostDeclarationSize
This commit is contained in:
parent
270462d22c
commit
56af31aede
|
@ -4122,14 +4122,12 @@ HRESULT WINAPI XTL::EMUPATCH(D3DDevice_CreateVertexShader)
|
|||
|
||||
// Now, we can create the host vertex shader
|
||||
DWORD XboxDeclarationCount = 0;
|
||||
DWORD HostDeclarationSize = 0;
|
||||
CxbxVertexShader* pCxbxVertexShader = (CxbxVertexShader*)calloc(1, sizeof(CxbxVertexShader));
|
||||
D3DVERTEXELEMENT *pRecompiledDeclaration = nullptr;
|
||||
|
||||
pRecompiledDeclaration = EmuRecompileVshDeclaration((DWORD*)pDeclaration,
|
||||
/*bIsFixedFunction=*/pFunction == xbnullptr,
|
||||
&XboxDeclarationCount,
|
||||
&HostDeclarationSize,
|
||||
&pCxbxVertexShader->VertexShaderInfo);
|
||||
|
||||
// Create the vertex declaration
|
||||
|
|
|
@ -620,7 +620,6 @@ protected:
|
|||
public:
|
||||
// Output
|
||||
DWORD XboxDeclarationCount;
|
||||
DWORD HostDeclarationSize;
|
||||
|
||||
private:
|
||||
#define D3DDECLUSAGE_UNSUPPORTED ((D3DDECLUSAGE)-1)
|
||||
|
@ -1425,7 +1424,7 @@ public:
|
|||
// Calculate size of declaration
|
||||
XboxDeclarationCount = VshGetDeclarationCount(pXboxVertexDeclarationCopy);
|
||||
// For Direct3D9, we need to reserve at least twice the number of elements, as one token can generate two registers (in and out) :
|
||||
HostDeclarationSize = XboxDeclarationCount * sizeof(D3DVERTEXELEMENT) * 2;
|
||||
unsigned HostDeclarationSize = XboxDeclarationCount * sizeof(D3DVERTEXELEMENT) * 2;
|
||||
|
||||
D3DVERTEXELEMENT *Result = (D3DVERTEXELEMENT *)calloc(1, HostDeclarationSize);
|
||||
pRecompiled = Result;
|
||||
|
@ -1470,7 +1469,6 @@ D3DVERTEXELEMENT *EmuRecompileVshDeclaration
|
|||
DWORD *pXboxDeclaration,
|
||||
bool bIsFixedFunction,
|
||||
DWORD *pXboxDeclarationCount,
|
||||
DWORD *pHostDeclarationSize,
|
||||
CxbxVertexShaderInfo *pCxbxVertexShaderInfo
|
||||
)
|
||||
{
|
||||
|
@ -1479,7 +1477,6 @@ D3DVERTEXELEMENT *EmuRecompileVshDeclaration
|
|||
D3DVERTEXELEMENT* pHostVertexElements = Converter.Convert(pXboxDeclaration, bIsFixedFunction, pCxbxVertexShaderInfo);
|
||||
|
||||
*pXboxDeclarationCount = Converter.XboxDeclarationCount;
|
||||
*pHostDeclarationSize = Converter.HostDeclarationSize;
|
||||
|
||||
return pHostVertexElements;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,6 @@ extern D3DVERTEXELEMENT *EmuRecompileVshDeclaration
|
|||
DWORD *pXboxDeclaration,
|
||||
bool bIsFixedFunction,
|
||||
DWORD *pXboxDeclarationCount,
|
||||
DWORD *pHostDeclarationSize,
|
||||
CxbxVertexShaderInfo *pCxbxVertexShaderInfo
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue