On Mon, Oct 4, 2021 at 1:49 PM Nikolay Sivov nsivov@codeweavers.com wrote:
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
dlls/d3d10/effect.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index de236ca2513..38bde6ef83c 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -968,9 +968,8 @@ static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(DWORD t, BOOL is_object, D
static HRESULT parse_fx10_type(const char *data, size_t data_size, DWORD offset, struct d3d10_effect_type *t) {
- DWORD typeinfo, type_flags;
- DWORD typeinfo, type_flags, type_kind; const char *ptr;
DWORD unknown0; unsigned int i;
if (offset >= data_size || !require_space(offset, 6, sizeof(DWORD), data_size))
@@ -990,8 +989,8 @@ static HRESULT parse_fx10_type(const char *data, size_t data_size, DWORD offset, } TRACE("Type name: %s.\n", debugstr_a(t->name));
- read_dword(&ptr, &unknown0);
- TRACE("Unknown 0: %u.\n", unknown0);
read_dword(&ptr, &type_kind);
TRACE("Kind: %u.\n", type_kind);
read_dword(&ptr, &t->element_count); TRACE("Element count: %u.\n", t->element_count);
@@ -1005,9 +1004,11 @@ static HRESULT parse_fx10_type(const char *data, size_t data_size, DWORD offset, read_dword(&ptr, &t->size_packed); TRACE("Packed size %#x.\n", t->size_packed);
- switch (unknown0)
- switch (type_kind) { case 1:
TRACE("Type is numeric.\n");
if (!require_space(ptr - data, 1, sizeof(typeinfo), data_size)) { WARN("Invalid offset %#x (data size %#lx).\n", offset, (long)data_size);
If you feel fancy you could introduce an enum. Not required by any means.