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>
This commit is contained in:
Józef Kucia 2017-05-26 10:48:04 +02:00 committed by Alexandre Julliard
parent be20ddc38b
commit 229d4aa7bc
6 changed files with 15 additions and 71 deletions

View File

@ -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) {

View File

@ -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)

View File

@ -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] =

View File

@ -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[] =

View File

@ -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)

View File

@ -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