Commit 1f0a143c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10: Add a short description to skip_dword_unknown().

parent 9d553881
...@@ -252,7 +252,7 @@ static inline void write_dword(char **ptr, DWORD d) ...@@ -252,7 +252,7 @@ static inline void write_dword(char **ptr, DWORD d)
*ptr += sizeof(d); *ptr += sizeof(d);
} }
void skip_dword_unknown(const char **ptr, unsigned int count) DECLSPEC_HIDDEN; void skip_dword_unknown(const char *location, const char **ptr, unsigned int count) DECLSPEC_HIDDEN;
void write_dword_unknown(char **ptr, DWORD d) DECLSPEC_HIDDEN; void write_dword_unknown(char **ptr, DWORD d) DECLSPEC_HIDDEN;
#endif /* __WINE_D3D10_PRIVATE_H */ #endif /* __WINE_D3D10_PRIVATE_H */
...@@ -144,7 +144,7 @@ static HRESULT shader_parse_signature(const char *data, DWORD data_size, struct ...@@ -144,7 +144,7 @@ static HRESULT shader_parse_signature(const char *data, DWORD data_size, struct
read_dword(&ptr, &count); read_dword(&ptr, &count);
TRACE("%u elements\n", count); TRACE("%u elements\n", count);
skip_dword_unknown(&ptr, 1); skip_dword_unknown("shader signature", &ptr, 1);
e = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*e)); e = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*e));
if (!e) if (!e)
...@@ -825,7 +825,7 @@ static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char ...@@ -825,7 +825,7 @@ static HRESULT parse_fx10_annotation(struct d3d10_effect_variable *a, const char
hr = parse_fx10_variable_head(a, ptr, data); hr = parse_fx10_variable_head(a, ptr, data);
if (FAILED(hr)) return hr; if (FAILED(hr)) return hr;
skip_dword_unknown(ptr, 1); skip_dword_unknown("annotation", ptr, 1);
/* mark the variable as annotation */ /* mark the variable as annotation */
a->flag = D3D10_EFFECT_VARIABLE_ANNOTATION; a->flag = D3D10_EFFECT_VARIABLE_ANNOTATION;
...@@ -1160,7 +1160,7 @@ static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char * ...@@ -1160,7 +1160,7 @@ static HRESULT parse_fx10_variable(struct d3d10_effect_variable *v, const char *
read_dword(ptr, &v->buffer_offset); read_dword(ptr, &v->buffer_offset);
TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset); TRACE("Variable offset in buffer: %#x.\n", v->buffer_offset);
skip_dword_unknown(ptr, 1); skip_dword_unknown("variable", ptr, 1);
read_dword(ptr, &v->flag); read_dword(ptr, &v->flag);
TRACE("Variable flag: %#x.\n", v->flag); TRACE("Variable flag: %#x.\n", v->flag);
...@@ -1208,7 +1208,7 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const ...@@ -1208,7 +1208,7 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const
} }
TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic)); TRACE("Variable semantic: %s.\n", debugstr_a(v->semantic));
skip_dword_unknown(ptr, 1); skip_dword_unknown("local variable", ptr, 1);
switch (v->type->basetype) switch (v->type->basetype)
{ {
...@@ -1266,7 +1266,7 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const ...@@ -1266,7 +1266,7 @@ static HRESULT parse_fx10_local_variable(struct d3d10_effect_variable *v, const
for (j = 0; j < object_count; ++j) for (j = 0; j < object_count; ++j)
{ {
skip_dword_unknown(ptr, 4); skip_dword_unknown("state object attribute", ptr, 4);
} }
} }
break; break;
...@@ -1363,7 +1363,7 @@ static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const ch ...@@ -1363,7 +1363,7 @@ static HRESULT parse_fx10_local_buffer(struct d3d10_effect_variable *l, const ch
read_dword(ptr, &l->type->member_count); read_dword(ptr, &l->type->member_count);
TRACE("Local buffer member count: %#x.\n", l->type->member_count); TRACE("Local buffer member count: %#x.\n", l->type->member_count);
skip_dword_unknown(ptr, 1); skip_dword_unknown("local buffer", ptr, 1);
read_dword(ptr, &l->annotation_count); read_dword(ptr, &l->annotation_count);
TRACE("Local buffer has %u annotations.\n", l->annotation_count); TRACE("Local buffer has %u annotations.\n", l->annotation_count);
......
...@@ -146,12 +146,12 @@ void d3d10_rb_free(void *ptr) ...@@ -146,12 +146,12 @@ void d3d10_rb_free(void *ptr)
HeapFree(GetProcessHeap(), 0, ptr); HeapFree(GetProcessHeap(), 0, ptr);
} }
void skip_dword_unknown(const char **ptr, unsigned int count) void skip_dword_unknown(const char *location, const char **ptr, unsigned int count)
{ {
unsigned int i; unsigned int i;
DWORD d; DWORD d;
FIXME("Skipping %u unknown DWORDs:\n", count); FIXME("Skipping %u unknown DWORDs (%s):\n", count, location);
for (i = 0; i < count; ++i) for (i = 0; i < count; ++i)
{ {
read_dword(ptr, &d); read_dword(ptr, &d);
...@@ -191,9 +191,9 @@ HRESULT parse_dxbc(const char *data, SIZE_T data_size, ...@@ -191,9 +191,9 @@ HRESULT parse_dxbc(const char *data, SIZE_T data_size,
} }
/* checksum? */ /* checksum? */
skip_dword_unknown(&ptr, 4); skip_dword_unknown("DXBC header", &ptr, 4);
skip_dword_unknown(&ptr, 1); skip_dword_unknown("DXBC header", &ptr, 1);
read_dword(&ptr, &total_size); read_dword(&ptr, &total_size);
TRACE("total size: %#x\n", total_size); TRACE("total size: %#x\n", total_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment