d3dx9: Fix RegisterCount calculation.
This commit is contained in:
parent
4d59b503de
commit
053e5b59ec
|
@ -1616,8 +1616,6 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
WORD size_element = 0;
|
|
||||||
|
|
||||||
constant->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*constant->constants) * count);
|
constant->constants = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*constant->constants) * count);
|
||||||
if (!constant->constants)
|
if (!constant->constants)
|
||||||
{
|
{
|
||||||
|
@ -1634,8 +1632,7 @@ static HRESULT parse_ctab_constant_type(const char *ctab, DWORD typeoffset, stru
|
||||||
if (hr != D3D_OK)
|
if (hr != D3D_OK)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (i == 0) size_element = constant->constants[i].desc.RegisterCount;
|
size += constant->constants[i].desc.RegisterCount;
|
||||||
size += size_element;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue