Remove everything related to no-longer-set HostFVF variable

This commit is contained in:
patrickvl 2020-04-29 15:14:27 +02:00
parent a2b5d2c466
commit c1b58dafb9
2 changed files with 4 additions and 16 deletions

View File

@ -999,19 +999,9 @@ void SetCxbxVertexShader(CxbxVertexShader* pCxbxVertexShader) {
hRet = g_pD3DDevice->SetVertexShader(pHostShader);
DEBUG_D3DRESULT(hRet, "g_pD3DDevice->SetVertexShader");
// Set either FVF or the vertex declaration
if (pCxbxVertexShader->Declaration.HostFVF)
{
// Set the FVF
hRet = g_pD3DDevice->SetFVF(pCxbxVertexShader->Declaration.HostFVF);
DEBUG_D3DRESULT(hRet, "g_pD3DDevice->SetFVF");
}
else
{
// Set vertex declaration
hRet = g_pD3DDevice->SetVertexDeclaration(pCxbxVertexShader->Declaration.pHostVertexDeclaration);
DEBUG_D3DRESULT(hRet, "g_pD3DDevice->SetVertexDeclaration");
}
// Set vertex declaration
hRet = g_pD3DDevice->SetVertexDeclaration(pCxbxVertexShader->Declaration.pHostVertexDeclaration);
DEBUG_D3DRESULT(hRet, "g_pD3DDevice->SetVertexDeclaration");
// Set vertex shader constants if necessary
if (pHostShader) {
@ -4248,7 +4238,6 @@ HRESULT WINAPI XTL::EMUPATCH(D3DDevice_CreateVertexShader)
pCxbxVertexShader->pXboxFunctionCopy = nullptr;
pCxbxVertexShader->XboxVertexShaderType = X_VST_NORMAL; // TODO : This can vary
pCxbxVertexShader->XboxNrAddressSlots = (XboxFunctionSize - sizeof(X_VSH_SHADER_HEADER)) / X_VSH_INSTRUCTION_SIZE_BYTES;
pCxbxVertexShader->Declaration.HostFVF = 0;
pCxbxVertexShader->VertexShaderKey = vertexShaderKey;
pCxbxVertexShader->Declaration.XboxDeclarationCount = XboxDeclarationCount;
// Save the status, to remove things later

View File

@ -74,7 +74,6 @@ typedef struct _CxbxVertexDeclaration
IDirect3DVertexDeclaration* pHostVertexDeclaration;
DWORD* pXboxDeclarationCopy;
DWORD XboxDeclarationCount; // Xbox's number of DWORD-sized X_D3DVSD* tokens
DWORD HostFVF; // Flexible Vertex Format (used when there's no host vertex shader)
UINT NumberOfVertexStreams; // The number of streams the vertex shader uses
bool vRegisterInDeclaration[X_VSH_MAX_ATTRIBUTES];
}
@ -92,7 +91,7 @@ typedef struct _CxbxVertexShader
// DWORD XboxStatus; // Used by VshHandleIsValidShader()
// The resulting host variables
uint64_t VertexShaderKey; // if nullptr, use SetFVF(HostFVF);
uint64_t VertexShaderKey;
// Needed for dynamic stream patching
CxbxVertexDeclaration Declaration;