d3d10: Improve parse_fx10.

This commit is contained in:
Rico Schüller 2009-05-29 23:35:07 +02:00 committed by Alexandre Julliard
parent 55b51f3b1e
commit 99a4287f5d
2 changed files with 33 additions and 15 deletions

View File

@ -90,9 +90,15 @@ struct d3d10_effect
LONG refcount; LONG refcount;
ID3D10Device *device; ID3D10Device *device;
DWORD version;
DWORD localbuffers_count;
DWORD localobjects_count;
DWORD technique_count; DWORD technique_count;
DWORD index_offset; DWORD index_offset;
DWORD dephstencilstate_count;
DWORD blendstate_count; DWORD blendstate_count;
DWORD rasterizerstate_count;
DWORD samplerstate_count;
struct d3d10_effect_technique *techniques; struct d3d10_effect_technique *techniques;
}; };

View File

@ -448,19 +448,26 @@ static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_s
const char *ptr = data; const char *ptr = data;
DWORD unknown; DWORD unknown;
/* version info? */ /* Compiled target version (e.g. fx_4_0=0xfeff1001, fx_4_1=0xfeff1011). */
skip_dword_unknown(&ptr, 2); read_dword(&ptr, &e->version);
TRACE("Target: %#x\n", e->version);
read_dword(&ptr, &e->localbuffers_count);
TRACE("Localbuffers count: %u\n", e->localbuffers_count);
/* Number of variables in local buffers? */
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 0: %u\n", unknown); FIXME("Unknown 0: %u\n", unknown);
read_dword(&ptr, &e->localobjects_count);
TRACE("Localobjects count: %u\n", e->localobjects_count);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 1: %u\n", unknown); FIXME("Unknown 1: %u\n", unknown);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 2: %u\n", unknown); FIXME("Unknown 2: %u\n", unknown);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 3: %u\n", unknown); FIXME("Unknown 3: %u\n", unknown);
read_dword(&ptr, &unknown);
FIXME("Unknown 4: %u\n", unknown);
read_dword(&ptr, &e->technique_count); read_dword(&ptr, &e->technique_count);
TRACE("Technique count: %u\n", e->technique_count); TRACE("Technique count: %u\n", e->technique_count);
@ -468,28 +475,33 @@ static HRESULT parse_fx10(struct d3d10_effect *e, const char *data, DWORD data_s
read_dword(&ptr, &e->index_offset); read_dword(&ptr, &e->index_offset);
TRACE("Index offset: %#x\n", e->index_offset); TRACE("Index offset: %#x\n", e->index_offset);
read_dword(&ptr, &unknown);
FIXME("Unknown 4: %u\n", unknown);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 5: %u\n", unknown); FIXME("Unknown 5: %u\n", unknown);
read_dword(&ptr, &e->dephstencilstate_count);
TRACE("Depthstencilstate count: %u\n", e->dephstencilstate_count);
read_dword(&ptr, &e->blendstate_count);
TRACE("Blendstate count: %u\n", e->blendstate_count);
read_dword(&ptr, &e->rasterizerstate_count);
TRACE("Rasterizerstate count: %u\n", e->rasterizerstate_count);
read_dword(&ptr, &e->samplerstate_count);
TRACE("Samplerstate count: %u\n", e->samplerstate_count);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 6: %u\n", unknown); FIXME("Unknown 6: %u\n", unknown);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 7: %u\n", unknown); FIXME("Unknown 7: %u\n", unknown);
read_dword(&ptr, &e->blendstate_count); /* Number of function calls in all passes? */
TRACE("Blendstate count: %u\n", e->blendstate_count);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 8: %u\n", unknown); FIXME("Unknown 8: %u\n", unknown);
read_dword(&ptr, &unknown); read_dword(&ptr, &unknown);
FIXME("Unknown 9: %u\n", unknown); FIXME("Unknown 9: %u\n", unknown);
read_dword(&ptr, &unknown);
FIXME("Unknown 10: %u\n", unknown);
read_dword(&ptr, &unknown);
FIXME("Unknown 11: %u\n", unknown);
read_dword(&ptr, &unknown);
FIXME("Unknown 12: %u\n", unknown);
read_dword(&ptr, &unknown);
FIXME("Unknown 13: %u\n", unknown);
return parse_fx10_body(e, ptr, data_size - (ptr - data)); return parse_fx10_body(e, ptr, data_size - (ptr - data));
} }