Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/context.c | 8 ++++---- dlls/wined3d/texture.c | 4 ++-- dlls/wined3d/utils.c | 12 ++++++++++++ dlls/wined3d/wined3d_private.h | 2 ++ 4 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 8199afa1d0e..37abf19d73e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3670,7 +3670,7 @@ static void context_update_stream_info(struct wined3d_context *context, const st if (buffer->fence) context->buffer_fences[context->buffer_fence_count++] = buffer->fence;
- TRACE("Load array %u {%#x:%p}.\n", i, element->data.buffer_object, element->data.addr); + TRACE("Load array %u %s.\n", i, debug_bo_address(&element->data)); }
if (prev_all_vbo != stream_info->all_vbo) @@ -5068,8 +5068,8 @@ void context_load_tex_coords(const struct wined3d_context *context, const struct { const struct wined3d_stream_info_element *e = &si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx];
- TRACE("Setting up texture %u, idx %d, coord_idx %u, data {%#x:%p}.\n", - texture_idx, mapped_stage, coord_idx, e->data.buffer_object, e->data.addr); + TRACE("Setting up texture %u, idx %u, coord_idx %u, data %s.\n", + texture_idx, mapped_stage, coord_idx, debug_bo_address(&e->data));
if (*current_bo != e->data.buffer_object) { @@ -5386,7 +5386,7 @@ static void context_load_numbered_arrays(struct wined3d_context *context, continue; }
- TRACE("Loading array %u [VBO=%u].\n", i, element->data.buffer_object); + TRACE("Loading array %u %s.\n", i, debug_bo_address(&element->data));
if (element->stride) { diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index ecbe94b2459..a3d834e8f53 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1927,10 +1927,10 @@ void wined3d_texture_upload_data(struct wined3d_texture *texture, unsigned int s BOOL decompress; GLenum target;
- TRACE("texture %p, sub_resource_idx %u, context %p, format %s, src_box %s, data {%#x:%p}, " + TRACE("texture %p, sub_resource_idx %u, context %p, format %s, src_box %s, data %s, " "src_row_pitch %#x, src_slice_pitch %#x, dst_x %u, dst_y %u, dst_z %u, srgb %#x.\n", texture, sub_resource_idx, context, debug_d3dformat(format->id), debug_box(src_box), - data->buffer_object, data->addr, src_row_pitch, src_slice_pitch, dst_x, dst_y, dst_z, srgb); + debug_const_bo_address(data), src_row_pitch, src_slice_pitch, dst_x, dst_y, dst_z, srgb);
if (texture->sub_resources[sub_resource_idx].map_count) { diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 9ddfd5c2059..127c7b34a0c 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4208,6 +4208,18 @@ const char *debug_vec4(const struct wined3d_vec4 *v) v->x, v->y, v->z, v->w); }
+const char *debug_const_bo_address(const struct wined3d_const_bo_address *address) +{ + if (!address) + return "(null)"; + return wine_dbg_sprintf("{%#x:%p}", address->buffer_object, address->addr); +} + +const char *debug_bo_address(const struct wined3d_bo_address *address) +{ + return debug_const_bo_address((const struct wined3d_const_bo_address *)address); +} + const char *debug_d3dformat(enum wined3d_format_id format_id) { switch (format_id) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d5bf61271e9..8e31e41e798 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3915,8 +3915,10 @@ void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain, */
/* Trace routines */ +const char *debug_bo_address(const struct wined3d_bo_address *address) DECLSPEC_HIDDEN; const char *debug_box(const struct wined3d_box *box) DECLSPEC_HIDDEN; const char *debug_color(const struct wined3d_color *color) DECLSPEC_HIDDEN; +const char *debug_const_bo_address(const struct wined3d_const_bo_address *address) DECLSPEC_HIDDEN; const char *debug_d3dshaderinstructionhandler(enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx) DECLSPEC_HIDDEN; const char *debug_d3dformat(enum wined3d_format_id format_id) DECLSPEC_HIDDEN; const char *debug_d3ddevicetype(enum wined3d_device_type device_type) DECLSPEC_HIDDEN;