wined3d: Use debug_d3dusage() for both usage and usage query flags.

Avoid spurious FIXME messages in wined3d_check_device_format().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-12-25 10:41:19 -06:00 committed by Alexandre Julliard
parent c6491bca46
commit 9cbe273558
3 changed files with 10 additions and 24 deletions

View File

@ -1692,10 +1692,10 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d,
DWORD format_flags = 0;
DWORD allowed_usage;
TRACE("wined3d %p, adapter %p, device_type %s, adapter_format %s, usage %s, %s, "
TRACE("wined3d %p, adapter %p, device_type %s, adapter_format %s, usage %s, "
"bind_flags %s, resource_type %s, check_format %s.\n",
wined3d, adapter, debug_d3ddevicetype(device_type), debug_d3dformat(adapter_format_id),
debug_d3dusage(usage), debug_d3dusagequery(usage), wined3d_debug_bind_flags(bind_flags),
debug_d3dusage(usage), wined3d_debug_bind_flags(bind_flags),
debug_d3dresourcetype(resource_type), debug_d3dformat(check_format_id));
adapter_format = wined3d_get_format(adapter, adapter_format_id, WINED3D_BIND_RENDER_TARGET);

View File

@ -4710,6 +4710,14 @@ const char *debug_d3dusage(DWORD usage)
WINED3DUSAGE_TO_STR(WINED3DUSAGE_OWNDC);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_STATICDECL);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_OVERLAY);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_FILTER);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_GENMIPMAP);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_LEGACYBUMPMAP);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_SRGBREAD);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_SRGBWRITE);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_VERTEXTEXTURE);
WINED3DUSAGE_TO_STR(WINED3DUSAGE_QUERY_WRAPANDMIP);
#undef WINED3DUSAGE_TO_STR
if (usage)
FIXME("Unrecognized usage flag(s) %#x.\n", usage);
@ -4717,27 +4725,6 @@ const char *debug_d3dusage(DWORD usage)
return wine_dbg_sprintf("%s", buffer.str);
}
const char *debug_d3dusagequery(DWORD usage)
{
struct debug_buffer buffer;
init_debug_buffer(&buffer, "0");
#define WINED3DUSAGEQUERY_TO_STR(x) if (usage & x) { debug_append(&buffer, #x, " | "); usage &= ~x; }
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_FILTER);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_GENMIPMAP);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_LEGACYBUMPMAP);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_SRGBREAD);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_SRGBWRITE);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_VERTEXTEXTURE);
WINED3DUSAGEQUERY_TO_STR(WINED3DUSAGE_QUERY_WRAPANDMIP);
#undef WINED3DUSAGEQUERY_TO_STR
if (usage)
FIXME("Unrecognized usage query flag(s) %#x.\n", usage);
return wine_dbg_sprintf("%s", buffer.str);
}
const char *debug_d3ddeclmethod(enum wined3d_decl_method method)
{
switch (method)

View File

@ -5273,7 +5273,6 @@ const char *debug_d3dformat(enum wined3d_format_id format_id) DECLSPEC_HIDDEN;
const char *debug_d3ddevicetype(enum wined3d_device_type device_type) DECLSPEC_HIDDEN;
const char *debug_d3dresourcetype(enum wined3d_resource_type resource_type) DECLSPEC_HIDDEN;
const char *debug_d3dusage(DWORD usage) DECLSPEC_HIDDEN;
const char *debug_d3dusagequery(DWORD usagequery) DECLSPEC_HIDDEN;
const char *debug_d3ddeclmethod(enum wined3d_decl_method method) DECLSPEC_HIDDEN;
const char *debug_d3ddeclusage(enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;
const char *debug_d3dinput_classification(enum wined3d_input_classification classification) DECLSPEC_HIDDEN;