Module: wine Branch: master Commit: 229d4aa7bc23beab02a7b1f7f20187069dcdeed0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=229d4aa7bc23beab02a7b1f7f2...
Author: Józef Kucia jkucia@codeweavers.com Date: Fri May 26 10:48:04 2017 +0200
wined3d: Trace color fixup checks in apply_format_fixups().
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/arb_program_shader.c | 15 +-------------- dlls/wined3d/ati_fragment_shader.c | 17 ++--------------- dlls/wined3d/glsl_shader.c | 15 +-------------- dlls/wined3d/nvidia_texture_shader.c | 15 +-------------- dlls/wined3d/state.c | 15 +-------------- dlls/wined3d/utils.c | 9 +++++++++ 6 files changed, 15 insertions(+), 71 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index c9e5880..612a51b 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -4977,21 +4977,8 @@ static void shader_arb_get_caps(const struct wined3d_gl_info *gl_info, struct sh
static BOOL shader_arb_color_fixup_supported(struct color_fixup_desc fixup) { - if (TRACE_ON(d3d_shader) && TRACE_ON(d3d)) - { - TRACE("Checking support for color_fixup:\n"); - dump_color_fixup_desc(fixup); - } - /* We support everything except complex conversions. */ - if (!is_complex_fixup(fixup)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; + return !is_complex_fixup(fixup); }
static void shader_arb_add_instruction_modifiers(const struct wined3d_shader_instruction *ins) { diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index c9af8e7..0fca3e6 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1352,22 +1352,9 @@ static void atifs_free(struct wined3d_device *device)
static BOOL atifs_color_fixup_supported(struct color_fixup_desc fixup) { - if (TRACE_ON(d3d_shader) && TRACE_ON(d3d)) - { - TRACE("Checking support for fixup:\n"); - dump_color_fixup_desc(fixup); - } - /* We only support sign fixup of the first two channels. */ - if (is_identity_fixup(fixup) || is_same_fixup(fixup, color_fixup_rg) - || is_same_fixup(fixup, color_fixup_rgl) || is_same_fixup(fixup, color_fixup_rgba)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; + return is_identity_fixup(fixup) || is_same_fixup(fixup, color_fixup_rg) + || is_same_fixup(fixup, color_fixup_rgl) || is_same_fixup(fixup, color_fixup_rgba); }
static BOOL atifs_alloc_context_data(struct wined3d_context *context) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 6a405ba..5f3af03 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -10589,21 +10589,8 @@ static void shader_glsl_get_caps(const struct wined3d_gl_info *gl_info, struct s
static BOOL shader_glsl_color_fixup_supported(struct color_fixup_desc fixup) { - if (TRACE_ON(d3d_shader) && TRACE_ON(d3d)) - { - TRACE("Checking support for fixup:\n"); - dump_color_fixup_desc(fixup); - } - /* We support everything except YUV conversions. */ - if (!is_complex_fixup(fixup)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; + return !is_complex_fixup(fixup); }
static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TABLE_SIZE] = diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index d329656..9d3a3a1 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -761,21 +761,8 @@ static void nvrc_fragment_free(struct wined3d_device *device) {}
static BOOL nvts_color_fixup_supported(struct color_fixup_desc fixup) { - if (TRACE_ON(d3d)) - { - TRACE("Checking support for fixup:\n"); - dump_color_fixup_desc(fixup); - } - /* We only support identity conversions. */ - if (is_identity_fixup(fixup)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; + return is_identity_fixup(fixup); }
static const struct StateEntryTemplate nvrc_fragmentstate_template[] = diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index a59e913..bc5b098 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5845,21 +5845,8 @@ static DWORD ffp_fragment_get_emul_mask(const struct wined3d_gl_info *gl_info)
static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup) { - if (TRACE_ON(d3d)) - { - TRACE("Checking support for fixup:\n"); - dump_color_fixup_desc(fixup); - } - /* We only support identity conversions. */ - if (is_identity_fixup(fixup)) - { - TRACE("[OK]\n"); - return TRUE; - } - - TRACE("[FAILED]\n"); - return FALSE; + return is_identity_fixup(fixup); }
static BOOL ffp_none_context_alloc(struct wined3d_context *context) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index bf7f916..912511b 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3350,9 +3350,18 @@ static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_ if (!(format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_TEXTURE)) continue;
+ TRACE("Checking support for fixup:\n"); + dump_color_fixup_desc(format->color_fixup); if (!adapter->shader_backend->shader_color_fixup_supported(format->color_fixup) || !adapter->fragment_pipe->color_fixup_supported(format->color_fixup)) + { + TRACE("[FAILED]\n"); format_clear_flag(format, WINED3DFMT_FLAG_TEXTURE); + } + else + { + TRACE("[OK]\n"); + } }
/* GL_EXT_texture_compression_s3tc does not support 3D textures. Some Windows drivers