Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/wined3d/buffer.c | 7 +++++-- dlls/wined3d/utils.c | 21 +++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index e20d66cc88..e7b05157cc 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1445,8 +1445,11 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, const struct struct wined3d_buffer *object; HRESULT hr;
- TRACE("device %p, desc %p, data %p, parent %p, parent_ops %p, buffer %p.\n", - device, desc, data, parent, parent_ops, buffer); + TRACE("device %p, desc byte_width %u, usage %s, bind_flags %s, access %s, data %p, parent %p, " + "parent_ops %p, buffer %p.\n", + device, desc->byte_width, debug_d3dusage(desc->usage), + wined3d_debug_bind_flags(desc->bind_flags), wined3d_debug_resource_access(desc->access), + data, parent, parent_ops, buffer);
if (!(object = heap_alloc_zero(sizeof(*object)))) return E_OUTOFMEMORY; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index e3df24ade4..d62578bf9f 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4447,6 +4447,27 @@ const char *wined3d_debug_resource_access(DWORD access) return wine_dbg_sprintf("%s", buffer.str); }
+const char *wined3d_debug_bind_flags(DWORD bind_flags) +{ + struct debug_buffer buffer; + + init_debug_buffer(&buffer, "0"); +#define BIND_FLAG_TO_STR(x) if (bind_flags & x) { debug_append(&buffer, #x, " | "); bind_flags &= ~x; } + BIND_FLAG_TO_STR(WINED3D_BIND_VERTEX_BUFFER); + BIND_FLAG_TO_STR(WINED3D_BIND_INDEX_BUFFER); + BIND_FLAG_TO_STR(WINED3D_BIND_CONSTANT_BUFFER); + BIND_FLAG_TO_STR(WINED3D_BIND_SHADER_RESOURCE); + BIND_FLAG_TO_STR(WINED3D_BIND_STREAM_OUTPUT); + BIND_FLAG_TO_STR(WINED3D_BIND_RENDER_TARGET); + BIND_FLAG_TO_STR(WINED3D_BIND_DEPTH_STENCIL); + BIND_FLAG_TO_STR(WINED3D_BIND_UNORDERED_ACCESS); +#undef BIND_FLAG_TO_STR + if (bind_flags) + FIXME("Unrecognised bind flag(s) %#x.\n", bind_flags); + + return wine_dbg_sprintf("%s", buffer.str); +} + const char *debug_d3dusage(DWORD usage) { struct debug_buffer buffer; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 19945cf30e..dbab1aaf76 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3064,6 +3064,7 @@ static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD sta }
const char *wined3d_debug_resource_access(DWORD access) DECLSPEC_HIDDEN; +const char *wined3d_debug_bind_flags(DWORD bind_flags) DECLSPEC_HIDDEN;
static inline BOOL wined3d_resource_access_is_managed(unsigned int access) {