diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h index 4828ab692b5..3074bdb4497 100644 --- a/dlls/d3d10core/d3d10core_private.h +++ b/dlls/d3d10core/d3d10core_private.h @@ -63,13 +63,6 @@ static inline void read_dword(const char **ptr, DWORD *d) void skip_dword_unknown(const char **ptr, unsigned int count); -static inline void read_tag(const char **ptr, DWORD *t, char t_str[5]) -{ - read_dword(ptr, t); - memcpy(t_str, t, 4); - t_str[4] = '\0'; -} - HRESULT parse_dxbc(const char *data, SIZE_T data_size, HRESULT (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx); diff --git a/dlls/d3d10core/inputlayout.c b/dlls/d3d10core/inputlayout.c index f6f50bc26a9..69d2173c01a 100644 --- a/dlls/d3d10core/inputlayout.c +++ b/dlls/d3d10core/inputlayout.c @@ -27,7 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10core); static HRESULT isgn_handler(const char *data, DWORD data_size, DWORD tag, void *ctx) { struct wined3d_shader_signature *is = ctx; - char tag_str[5]; switch(tag) { @@ -35,9 +34,7 @@ static HRESULT isgn_handler(const char *data, DWORD data_size, DWORD tag, void * return shader_parse_signature(data, data_size, is); default: - memcpy(tag_str, &tag, 4); - tag_str[4] = '\0'; - FIXME("Unhandled chunk %s\n", tag_str); + FIXME("Unhandled chunk %s.\n", debugstr_an((const char *)&tag, 4)); return S_OK; } } diff --git a/dlls/d3d10core/shader.c b/dlls/d3d10core/shader.c index 582d2a88010..11e080df833 100644 --- a/dlls/d3d10core/shader.c +++ b/dlls/d3d10core/shader.c @@ -27,7 +27,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10core); static HRESULT shdr_handler(const char *data, DWORD data_size, DWORD tag, void *ctx) { struct d3d10_shader_info *shader_info = ctx; - char tag_str[5]; HRESULT hr; switch(tag) @@ -42,9 +41,7 @@ static HRESULT shdr_handler(const char *data, DWORD data_size, DWORD tag, void * break; default: - memcpy(tag_str, &tag, 4); - tag_str[4] = '\0'; - FIXME("Unhandled chunk %s\n", tag_str); + FIXME("Unhandled chunk %s\n", debugstr_an((const char *)&tag, 4)); break; } @@ -118,8 +115,8 @@ HRESULT shader_parse_signature(const char *data, DWORD data_size, struct wined3d TRACE("semantic: %s, semantic idx: %u, sysval_semantic %#x, " "type %u, register idx: %u, use_mask %#x, input_mask %#x\n", - e[i].semantic_name, e[i].semantic_idx, e[i].sysval_semantic, e[i].component_type, - e[i].register_idx, (e[i].mask >> 8) & 0xff, e[i].mask & 0xff); + debugstr_a(e[i].semantic_name), e[i].semantic_idx, e[i].sysval_semantic, + e[i].component_type, e[i].register_idx, (e[i].mask >> 8) & 0xff, e[i].mask & 0xff); } s->elements = e; diff --git a/dlls/d3d10core/utils.c b/dlls/d3d10core/utils.c index 29f1e7a7fb0..206efdfa7b8 100644 --- a/dlls/d3d10core/utils.c +++ b/dlls/d3d10core/utils.c @@ -365,12 +365,11 @@ HRESULT parse_dxbc(const char *data, SIZE_T data_size, HRESULT hr = S_OK; DWORD chunk_count; DWORD total_size; - char tag_str[5]; unsigned int i; DWORD tag; - read_tag(&ptr, &tag, tag_str); - TRACE("tag: %s\n", tag_str); + read_dword(&ptr, &tag); + TRACE("tag: %s.\n", debugstr_an((const char *)&tag, 4)); if (tag != TAG_DXBC) {