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 @@
#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)
......
......@@ -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])
......
......@@ -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);
......
......@@ -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 {
......
......@@ -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;
}
......
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