Commit c0a84454 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Introduce a separate debug channel for performance warnings.

parent 42208d08
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "wined3d_private.h" #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
/* Define the default light parameters as specified by MSDN. */ /* Define the default light parameters as specified by MSDN. */
const struct wined3d_light WINED3D_default_light = const struct wined3d_light WINED3D_default_light =
...@@ -221,7 +222,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s ...@@ -221,7 +222,7 @@ static void device_stream_info_from_declaration(struct wined3d_device *device, s
* drawStridedSlow() is needed, including a vertex buffer path. */ * drawStridedSlow() is needed, including a vertex buffer path. */
if (state->load_base_vertex_index < 0) 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.buffer_object = 0;
data.addr = buffer_get_sysmem(buffer, &device->adapter->gl_info); data.addr = buffer_get_sysmem(buffer, &device->adapter->gl_info);
if ((UINT_PTR)data.addr < -state->load_base_vertex_index * stride) if ((UINT_PTR)data.addr < -state->load_base_vertex_index * stride)
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "winternl.h" #include "winternl.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d); WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
#define WINE_DEFAULT_VIDMEM (64 * 1024 * 1024) #define WINE_DEFAULT_VIDMEM (64 * 1024 * 1024)
...@@ -553,7 +554,7 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info) ...@@ -553,7 +554,7 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
if (memcmp(check, pattern, sizeof(check))) 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"); "Disabling PBOs. This may result in slower performance.\n");
gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] = FALSE; gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] = FALSE;
} }
...@@ -2424,7 +2425,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) ...@@ -2424,7 +2425,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
} }
else 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]) if (gl_info->supported[NV_REGISTER_COMBINERS])
{ {
...@@ -2853,7 +2854,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) ...@@ -2853,7 +2854,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
} }
else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) 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; wined3d_settings.offscreen_rendering_mode = ORM_BACKBUFFER;
} }
if (gl_info->supported[EXT_FRAMEBUFFER_BLIT]) if (gl_info->supported[EXT_FRAMEBUFFER_BLIT])
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "wined3d_private.h" #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw); WINE_DEFAULT_DEBUG_CHANNEL(d3d_draw);
WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
...@@ -102,7 +103,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi ...@@ -102,7 +103,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
UINT num_untracked_materials; UINT num_untracked_materials;
DWORD tex_mask = 0; DWORD tex_mask = 0;
TRACE("Using slow vertex array code\n"); TRACE_(d3d_perf)("Using slow vertex array code\n");
/* Variable Initialization */ /* Variable Initialization */
if (idxSize) if (idxSize)
...@@ -702,7 +703,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co ...@@ -702,7 +703,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (!warned++) if (!warned++)
FIXME("Using software emulation because not all material properties could be tracked.\n"); FIXME("Using software emulation because not all material properties could be tracked.\n");
else 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; emulation = TRUE;
} }
else if (context->fog_coord && state->render_states[WINED3D_RS_FOGENABLE]) 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 ...@@ -715,7 +716,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (!warned++) if (!warned++)
FIXME("Using software emulation because manual fog coordinates are provided.\n"); FIXME("Using software emulation because manual fog coordinates are provided.\n");
else 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; emulation = TRUE;
} }
...@@ -737,7 +738,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co ...@@ -737,7 +738,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
if (!warned++) if (!warned++)
FIXME("Using immediate mode with vertex shaders for half float emulation.\n"); FIXME("Using immediate mode with vertex shaders for half float emulation.\n");
else 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, drawStridedSlowVs(gl_info, state, stream_info, index_count,
state->gl_primitive_type, idx_data, idx_size, start_idx); state->gl_primitive_type, idx_data, idx_size, start_idx);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "wined3d_private.h" #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(gl_compat); WINE_DEFAULT_DEBUG_CHANNEL(gl_compat);
WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
/* Start GL_ARB_multitexture emulation */ /* Start GL_ARB_multitexture emulation */
static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) { static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) {
...@@ -176,7 +177,7 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) { ...@@ -176,7 +177,7 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) {
if(param == GL_FRAGMENT_DEPTH_EXT) { if(param == GL_FRAGMENT_DEPTH_EXT) {
if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
} else { } 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); old_fogcoord_glDisable(GL_FOG);
} }
} else { } else {
...@@ -197,7 +198,7 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) { ...@@ -197,7 +198,7 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) {
if(*param == GL_FRAGMENT_DEPTH_EXT) { if(*param == GL_FRAGMENT_DEPTH_EXT) {
if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
} else { } 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); old_fogcoord_glDisable(GL_FOG);
} }
} else { } else {
...@@ -218,7 +219,7 @@ static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) { ...@@ -218,7 +219,7 @@ static void WINE_GLAPI wine_glFogf(GLenum pname, GLfloat param) {
if(param == GL_FRAGMENT_DEPTH_EXT) { if(param == GL_FRAGMENT_DEPTH_EXT) {
if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
} else { } 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); old_fogcoord_glDisable(GL_FOG);
} }
} else { } else {
...@@ -239,7 +240,7 @@ static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) { ...@@ -239,7 +240,7 @@ static void WINE_GLAPI wine_glFogfv(GLenum pname, const GLfloat *param) {
if(*param == GL_FRAGMENT_DEPTH_EXT) { if(*param == GL_FRAGMENT_DEPTH_EXT) {
if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG); if(ctx->fog_enabled) old_fogcoord_glEnable(GL_FOG);
} else { } 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); old_fogcoord_glDisable(GL_FOG);
} }
} else { } else {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "wined3d_private.h" #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
WINE_DECLARE_DEBUG_CHANNEL(d3d_perf);
WINE_DECLARE_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(d3d);
static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, 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 ...@@ -1551,13 +1552,13 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
* locking them. */ * locking them. */
if (dst_surface->flags & SFLAG_CONVERTED) 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); return surface_cpu_blt(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter);
} }
if (flags & ~simple_blit) 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; goto fallback;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment