Module: wine Branch: master Commit: c0a84454c4c5dee39914e480773882d3f90b98cf URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0a84454c4c5dee39914e48077...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Apr 17 08:47:59 2013 +0200
wined3d: Introduce a separate debug channel for performance warnings.
---
dlls/wined3d/device.c | 3 ++- dlls/wined3d/directx.c | 7 ++++--- dlls/wined3d/drawprim.c | 9 +++++---- dlls/wined3d/gl_compat.c | 9 +++++---- dlls/wined3d/surface.c | 5 +++-- 5 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3ae5eae..17c122d 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -35,6 +35,7 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
/* Define the default light parameters as specified by MSDN. */ const struct wined3d_light WINED3D_default_light = @@ -221,7 +222,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s * drawStridedSlow() is needed, including a vertex buffer path. */ if (state->load_base_vertex_index < 0) { - WARN("load_base_vertex_index is < 0 (%d), not using VBOs.\n", state->load_base_vertex_index); + WARN_(d3d_perf)("load_base_vertex_index is < 0 (%d), not using VBOs.\n", state->load_base_vertex_index); data.buffer_object = 0; data.addr = buffer_get_sysmem(buffer, &device->adapter->gl_info); if ((UINT_PTR)data.addr < -state->load_base_vertex_index * stride) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index d4b993b..3a97ae2 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -30,6 +30,7 @@ #include "winternl.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
#define WINE_DEFAULT_VIDMEM (64 * 1024 * 1024)
@@ -553,7 +554,7 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
if (memcmp(check, pattern, sizeof(check))) { - WARN("PBO test failed, read back data doesn't match original.\n" + WARN_(d3d_perf)("PBO test failed, read back data doesn't match original.\n" "Disabling PBOs. This may result in slower performance.\n"); gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] = FALSE; } @@ -2424,7 +2425,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) } else { - WARN("Driver doesn't guarantee a minimum buffer map alignment.\n"); + WARN_(d3d_perf)("Driver doesn't guarantee a minimum buffer map alignment.\n"); } if (gl_info->supported[NV_REGISTER_COMBINERS]) { @@ -2853,7 +2854,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { - WARN("Framebuffer objects not supported, falling back to backbuffer offscreen rendering mode.\n"); + WARN_(d3d_perf)("Framebuffer objects not supported, falling back to backbuffer offscreen rendering mode.\n"); wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER; } if (gl_info->supported[EXT_FRAMEBUFFER_BLIT]) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 14cb18f..2e158dd 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -30,6 +30,7 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
#include <stdio.h> #include <math.h> @@ -102,7 +103,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi UINT num_untracked_materials; DWORD tex_mask = 0;
- TRACE("Using slow vertex array code\n"); + TRACE_(d3d_perf)("Using slow vertex array code\n");
/* Variable Initialization */ if (idxSize) @@ -702,7 +703,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!warned++) FIXME("Using software emulation because not all material properties could be tracked.\n"); else - WARN("Using software emulation because not all material properties could be tracked.\n"); + WARN_(d3d_perf)("Using software emulation because not all material properties could be tracked.\n"); emulation = TRUE; } else if (context->fog_coord && state->render_states[WINED3D_RS_FOGENABLE]) @@ -715,7 +716,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!warned++) FIXME("Using software emulation because manual fog coordinates are provided.\n"); else - WARN("Using software emulation because manual fog coordinates are provided.\n"); + WARN_(d3d_perf)("Using software emulation because manual fog coordinates are provided.\n"); emulation = TRUE; }
@@ -737,7 +738,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!warned++) FIXME("Using immediate mode with vertex shaders for half float emulation.\n"); else - WARN("Using immediate mode with vertex shaders for half float emulation.\n"); + WARN_(d3d_perf)("Using immediate mode with vertex shaders for half float emulation.\n");
drawStridedSlowVs(gl_info, state, stream_info, index_count, state->gl_primitive_type, idx_data, idx_size, start_idx); diff --git a/dlls/wined3d/gl_compat.c b/dlls/wined3d/gl_compat.c index cd22097..4dd9062 100644 --- a/dlls/wined3d/gl_compat.c +++ b/dlls/wined3d/gl_compat.c @@ -29,6 +29,7 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(gl_compat); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
/* Start GL_ARB_multitexture emulation */ static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) { @@ -176,7 +177,7 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) { if(param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { @@ -197,7 +198,7 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) { if(*param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { @@ -218,7 +219,7 @@ static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) { if(param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { @@ -239,7 +240,7 @@ static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) { if(*param == GL_FRAGMENT_DEPTH_EXT) { if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); } else { - WARN("Fog coords activated, but not supported. Using slow emulation\n"); + WARN_(d3d_perf)("Fog coords activated, but not supported. Using slow emulation\n"); old_fogcoord_glDisable(GL_FOG); } } else { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a3589b1..f7e99ab 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -31,6 +31,7 @@ #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); +WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); WINE_DECLARE_DEBUG_CHANNEL(d3d);
static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, @@ -1551,13 +1552,13 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC * locking them. */ if (dst_surface->flags & SFLAG_CONVERTED) { - WARN("Converted surface, using CPU blit.\n"); + WARN_(d3d_perf)("Converted surface, using CPU blit.\n"); return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter); }
if (flags & ~simple_blit) { - WARN("Using fallback for complex blit (%#x).\n", flags); + WARN_(d3d_perf)("Using fallback for complex blit (%#x).\n", flags); goto fallback; }