winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
January 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
499 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Support WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST in the GLSL blitter.
by Alexandre Julliard
11 Jan '19
11 Jan '19
Module: wine Branch: master Commit: 536782bc1c74a65f72f0530141715f1f76acc001 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=536782bc1c74a65f72f05301…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jan 11 21:19:10 2019 +0330 wined3d: Support WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST in the GLSL blitter. Both the ARBfp and fixed-function blitter support WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST, but the fixed-function blitter requires a compatibility context, and the ARBfp blitter isn't created when the GLSL blitter is available. This fixes a regression introduced by commit 6fc027e5acfb7f7c7f50af421658e5442e896588. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45874
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index fc0b2c7..d6fd565 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -13116,7 +13116,8 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi blit_op = WINED3D_BLIT_OP_COLOR_BLIT; } - if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT && blit_op != WINED3D_BLIT_OP_COLOR_BLIT_CKEY) + if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT && blit_op != WINED3D_BLIT_OP_COLOR_BLIT_CKEY + && blit_op != WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST) { TRACE("Unsupported blit_op %#x.\n", blit_op); return FALSE; @@ -13168,6 +13169,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_texture *staging_texture = NULL; struct wined3d_glsl_blitter *glsl_blitter; + struct wined3d_color_key alpha_test_key; struct glsl_blitter_program *program; struct wined3d_blitter *next; unsigned int src_level; @@ -13284,8 +13286,20 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli context_invalidate_state(context, STATE_FRAMEBUFFER); } - if (!(program = glsl_blitter_get_program(glsl_blitter, context, src_texture_gl, - op == WINED3D_BLIT_OP_COLOR_BLIT_CKEY))) + if (op == WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST) + { + const struct wined3d_format *f = src_texture->resource.format; + + alpha_test_key.color_space_low_value = 0; + alpha_test_key.color_space_high_value = ~(((1u << f->alpha_size) - 1) << f->alpha_offset); + colour_key = &alpha_test_key; + } + else if (op != WINED3D_BLIT_OP_COLOR_BLIT_CKEY) + { + colour_key = NULL; + } + + if (!(program = glsl_blitter_get_program(glsl_blitter, context, src_texture_gl, !!colour_key))) { ERR("Failed to get blitter program.\n"); return dst_location; @@ -13310,7 +13324,7 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli default: break; } - if (op == WINED3D_BLIT_OP_COLOR_BLIT_CKEY) + if (colour_key) { struct wined3d_color float_key[2];
1
0
0
0
Henri Verbeet : wined3d: Support WINED3D_BLIT_OP_COLOR_BLIT_CKEY in the GLSL blitter.
by Alexandre Julliard
11 Jan '19
11 Jan '19
Module: wine Branch: master Commit: bb0063af39268814e9d4d226c30f112735dd96fe URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bb0063af39268814e9d4d226…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Jan 11 21:19:09 2019 +0330 wined3d: Support WINED3D_BLIT_OP_COLOR_BLIT_CKEY in the GLSL blitter. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45874
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 5f1a866..fc0b2c7 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7659,6 +7659,14 @@ static void shader_glsl_generate_alpha_test(struct wined3d_string_buffer *buffer shader_addline(buffer, " discard;\n"); } +static void shader_glsl_generate_colour_key_test(struct wined3d_string_buffer *buffer, + const char *colour, const char *colour_key_low, const char *colour_key_high) +{ + shader_addline(buffer, "if (all(greaterThanEqual(%s, %s)) && all(lessThan(%s, %s)))\n", + colour, colour_key_low, colour, colour_key_high); + shader_addline(buffer, " discard;\n"); +} + static void shader_glsl_enable_extensions(struct wined3d_string_buffer *buffer, const struct wined3d_gl_info *gl_info) { @@ -9952,10 +9960,7 @@ static GLuint shader_glsl_generate_ffp_fragment_shader(struct shader_glsl_priv * } if (settings->color_key_enabled) - { - shader_addline(buffer, "if (all(greaterThanEqual(tex0, color_key[0])) && all(lessThan(tex0, color_key[1])))\n"); - shader_addline(buffer, " discard;\n"); - } + shader_glsl_generate_colour_key_test(buffer, "tex0", "color_key[0]", "color_key[1]"); shader_addline(buffer, "ret = ffp_varying_diffuse;\n"); @@ -12499,7 +12504,7 @@ struct glsl_blitter_args { GLenum texture_type; struct color_fixup_desc fixup; - unsigned short padding; + unsigned short use_colour_key; }; struct glsl_blitter_program @@ -12573,6 +12578,8 @@ static void glsl_blitter_generate_p8_shader(struct wined3d_string_buffer *buffer shader_addline(buffer, " index = (index * 255.0 + 0.5) / 256.0;\n"); shader_addline(buffer, " %s = texture%s(sampler_palette, index);\n", output, needs_legacy_glsl_syntax(gl_info) ? "1D" : ""); + if (args->use_colour_key) + shader_glsl_generate_colour_key_test(buffer, output, "colour_key.low", "colour_key.high"); shader_addline(buffer, "}\n"); } @@ -12866,6 +12873,8 @@ static void glsl_blitter_generate_yuv_shader(struct wined3d_string_buffer *buffe shader_addline(buffer, " %s.x = luminance + chroma.x * yuv_coef.x;\n", output); shader_addline(buffer, " %s.y = luminance + chroma.y * yuv_coef.y + chroma.x * yuv_coef.z;\n", output); shader_addline(buffer, " %s.z = luminance + chroma.y * yuv_coef.w;\n", output); + if (args->use_colour_key) + shader_glsl_generate_colour_key_test(buffer, output, "colour_key.low", "colour_key.high"); shader_addline(buffer, "}\n"); } @@ -12878,6 +12887,8 @@ static void glsl_blitter_generate_plain_shader(struct wined3d_string_buffer *buf shader_addline(buffer, " %s = texture%s(sampler, out_texcoord.%s);\n", output, needs_legacy_glsl_syntax(gl_info) ? tex_type : "", swizzle); shader_glsl_color_correction_ext(buffer, output, WINED3DSP_WRITEMASK_ALL, args->fixup); + if (args->use_colour_key) + shader_glsl_generate_colour_key_test(buffer, output, "colour_key.low", "colour_key.high"); shader_addline(buffer, "}\n"); } @@ -12947,6 +12958,12 @@ static GLuint glsl_blitter_generate_program(struct wined3d_glsl_blitter *blitter string_buffer_clear(buffer); shader_glsl_add_version_declaration(buffer, gl_info); shader_addline(buffer, "uniform sampler%s sampler;\n", tex_type); + if (args->use_colour_key) + { + shader_addline(buffer, "uniform struct\n{\n"); + shader_addline(buffer, " vec4 low, high;\n"); + shader_addline(buffer, "} colour_key;\n"); + } declare_in_varying(gl_info, buffer, FALSE, "vec3 out_texcoord;\n"); /* TODO: Declare the out variable with the correct type (and put it in the * blitter args). */ @@ -13041,7 +13058,7 @@ static void glsl_blitter_upload_palette(struct wined3d_glsl_blitter *blitter, /* Context activation is done by the caller. */ static struct glsl_blitter_program *glsl_blitter_get_program(struct wined3d_glsl_blitter *blitter, - struct wined3d_context *context, const struct wined3d_texture_gl *texture_gl) + struct wined3d_context *context, const struct wined3d_texture_gl *texture_gl, BOOL use_colour_key) { const struct wined3d_gl_info *gl_info = context->gl_info; struct glsl_blitter_program *program; @@ -13051,6 +13068,7 @@ static struct glsl_blitter_program *glsl_blitter_get_program(struct wined3d_glsl memset(&args, 0, sizeof(args)); args.texture_type = texture_gl->target; args.fixup = texture_gl->t.resource.format->color_fixup; + args.use_colour_key = use_colour_key; if ((entry = wine_rb_get(&blitter->programs, &args))) return WINE_RB_ENTRY_VALUE(entry, struct glsl_blitter_program, entry); @@ -13098,7 +13116,7 @@ static BOOL glsl_blitter_supported(enum wined3d_blit_op blit_op, const struct wi blit_op = WINED3D_BLIT_OP_COLOR_BLIT; } - if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT) + if (blit_op != WINED3D_BLIT_OP_COLOR_BLIT && blit_op != WINED3D_BLIT_OP_COLOR_BLIT_CKEY) { TRACE("Unsupported blit_op %#x.\n", blit_op); return FALSE; @@ -13266,7 +13284,8 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli context_invalidate_state(context, STATE_FRAMEBUFFER); } - if (!(program = glsl_blitter_get_program(glsl_blitter, context, src_texture_gl))) + if (!(program = glsl_blitter_get_program(glsl_blitter, context, src_texture_gl, + op == WINED3D_BLIT_OP_COLOR_BLIT_CKEY))) { ERR("Failed to get blitter program.\n"); return dst_location; @@ -13291,6 +13310,16 @@ static DWORD glsl_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_bli default: break; } + if (op == WINED3D_BLIT_OP_COLOR_BLIT_CKEY) + { + struct wined3d_color float_key[2]; + + wined3d_format_get_float_color_key(src_texture->resource.format, colour_key, float_key); + location = GL_EXTCALL(glGetUniformLocation(program->id, "colour_key.low")); + GL_EXTCALL(glUniform4fv(location, 1, &float_key[0].r)); + location = GL_EXTCALL(glGetUniformLocation(program->id, "colour_key.high")); + GL_EXTCALL(glUniform4fv(location, 1, &float_key[1].r)); + } context_draw_shaded_quad(context, src_texture_gl, src_sub_resource_idx, src_rect, dst_rect, filter); GL_EXTCALL(glUseProgram(0));
1
0
0
0
Alistair Leslie-Hughes : dsound: Trace ref in a consistent way.
by Alexandre Julliard
11 Jan '19
11 Jan '19
Module: wine Branch: master Commit: 061121b81a0f9595b961670265f3acdb2abaff36 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=061121b81a0f9595b9616702…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Thu Jan 10 22:41:04 2019 +0000 dsound: Trace ref in a consistent way. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dsound/buffer.c | 16 ++++++++-------- dlls/dsound/capture.c | 10 +++++----- dlls/dsound/dsound.c | 4 ++-- dlls/dsound/primary.c | 4 ++-- dlls/dsound/propset.c | 4 ++-- dlls/dsound/sound3d.c | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index cb7ff78..5262628 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -60,7 +60,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(IDirectSoundNotify *iface) IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface); ULONG ref = InterlockedIncrement(&This->refn); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -73,7 +73,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(IDirectSoundNotify *iface) IDirectSoundBufferImpl *This = impl_from_IDirectSoundNotify(iface); ULONG ref = InterlockedDecrement(&This->refn); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref %d\n", This, ref); if (!ref && !InterlockedDecrement(&This->numIfaces)) secondarybuffer_destroy(This); @@ -344,7 +344,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_AddRef(IDirectSoundBuffer8 *iface) IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -361,7 +361,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface) ref = capped_refcount_dec(&This->ref); if(!ref) capped_refcount_dec(&This->numIfaces); - TRACE("(%p) ref is now: %d\n", This, ref); + TRACE("(%p) ref %d\n", This, ref); return ref; } @@ -369,7 +369,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(IDirectSoundBuffer8 *iface) if (!ref && !InterlockedDecrement(&This->numIfaces)) secondarybuffer_destroy(This); - TRACE("(%p) ref is now %d\n", This, ref); + TRACE("(%p) ref %d\n", This, ref); return ref; } @@ -1237,7 +1237,7 @@ static ULONG WINAPI IKsPropertySetImpl_AddRef(IKsPropertySet *iface) IDirectSoundBufferImpl *This = impl_from_IKsPropertySet(iface); ULONG ref = InterlockedIncrement(&This->refiks); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -1254,7 +1254,7 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface) ref = capped_refcount_dec(&This->refiks); if(!ref) capped_refcount_dec(&This->numIfaces); - TRACE("(%p) ref is now: %d\n", This, ref); + TRACE("(%p) ref %d\n", This, ref); return ref; } @@ -1262,7 +1262,7 @@ static ULONG WINAPI IKsPropertySetImpl_Release(IKsPropertySet *iface) if (!ref && !InterlockedDecrement(&This->numIfaces)) secondarybuffer_destroy(This); - TRACE("(%p) ref is now %d\n", This, ref); + TRACE("(%p) ref %d\n", This, ref); return ref; } diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index c849624..8fc2749 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -137,7 +137,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_AddRef(IDirectSoundNotify *iface) IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface); ULONG ref = InterlockedIncrement(&This->refn); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -150,7 +150,7 @@ static ULONG WINAPI IDirectSoundNotifyImpl_Release(IDirectSoundNotify *iface) IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundNotify(iface); ULONG ref = InterlockedDecrement(&This->refn); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref %d\n", This, ref); if (!ref && !InterlockedDecrement(&This->numIfaces)) capturebuffer_destroy(This); @@ -263,7 +263,7 @@ static ULONG WINAPI IDirectSoundCaptureBufferImpl_AddRef(IDirectSoundCaptureBuff IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -276,7 +276,7 @@ static ULONG WINAPI IDirectSoundCaptureBufferImpl_Release(IDirectSoundCaptureBuf IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface); ULONG ref = InterlockedDecrement(&This->ref); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref %d\n", This, ref); if (!ref && !InterlockedDecrement(&This->numIfaces)) capturebuffer_destroy(This); @@ -851,7 +851,7 @@ static ULONG DirectSoundCaptureDevice_Release( DirectSoundCaptureDevice * device) { ULONG ref = InterlockedDecrement(&(device->ref)); - TRACE("(%p) ref was %d\n", device, ref + 1); + TRACE("(%p) ref %d\n", device, ref); if (!ref) { TRACE("deleting object\n"); diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 71ede7d..2fbb3ce 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c @@ -189,7 +189,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice) static ULONG DirectSoundDevice_AddRef(DirectSoundDevice * device) { ULONG ref = InterlockedIncrement(&(device->ref)); - TRACE("(%p) ref was %d\n", device, ref - 1); + TRACE("(%p) ref %d\n", device, ref); return ref; } @@ -197,7 +197,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device) { HRESULT hr; ULONG ref = InterlockedDecrement(&(device->ref)); - TRACE("(%p) ref was %u\n", device, ref + 1); + TRACE("(%p) ref %d\n", device, ref); if (!ref) { int i; diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index f74db2f..a30fc5e 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -675,7 +675,7 @@ static ULONG WINAPI PrimaryBufferImpl_AddRef(IDirectSoundBuffer8 *iface) { IDirectSoundBufferImpl *This = impl_from_IDirectSoundBuffer8(iface); ULONG ref = InterlockedIncrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); return ref; @@ -704,7 +704,7 @@ static ULONG WINAPI PrimaryBufferImpl_Release(IDirectSoundBuffer8 *iface) if(!ref) capped_refcount_dec(&This->numIfaces); - TRACE("(%p) primary ref is now %d\n", This, ref); + TRACE("(%p) primary ref %d\n", This, ref); return ref; } diff --git a/dlls/dsound/propset.c b/dlls/dsound/propset.c index 0272ac0..92aae8f 100644 --- a/dlls/dsound/propset.c +++ b/dlls/dsound/propset.c @@ -81,7 +81,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_AddRef(LPKSPROPERTYSET iface) { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); ULONG ref = InterlockedIncrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); return ref; } @@ -89,7 +89,7 @@ static ULONG WINAPI IKsPrivatePropertySetImpl_Release(LPKSPROPERTYSET iface) { IKsPrivatePropertySetImpl *This = impl_from_IKsPropertySet(iface); ULONG ref = InterlockedDecrement(&(This->ref)); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref %d\n", This, ref); if (!ref) { HeapFree(GetProcessHeap(), 0, This); diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c index 118bb60..27fc416 100644 --- a/dlls/dsound/sound3d.c +++ b/dlls/dsound/sound3d.c @@ -396,7 +396,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_AddRef(IDirectSound3DBuffer *iface) IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); ULONG ref = InterlockedIncrement(&This->ref3D); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -409,7 +409,7 @@ static ULONG WINAPI IDirectSound3DBufferImpl_Release(IDirectSound3DBuffer *iface IDirectSoundBufferImpl *This = impl_from_IDirectSound3DBuffer(iface); ULONG ref = InterlockedDecrement(&This->ref3D); - TRACE("(%p) ref was %d\n", This, ref + 1); + TRACE("(%p) ref %d\n", This, ref); if (!ref && !InterlockedDecrement(&This->numIfaces)) secondarybuffer_destroy(This); @@ -744,7 +744,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_AddRef(IDirectSound3DListener *if IDirectSoundBufferImpl *This = impl_from_IDirectSound3DListener(iface); ULONG ref = InterlockedIncrement(&This->ref3D); - TRACE("(%p) ref was %d\n", This, ref - 1); + TRACE("(%p) ref %d\n", This, ref); if(ref == 1) InterlockedIncrement(&This->numIfaces); @@ -761,7 +761,7 @@ static ULONG WINAPI IDirectSound3DListenerImpl_Release(IDirectSound3DListener *i if(!ref) capped_refcount_dec(&This->numIfaces); - TRACE("(%p) ref is now %d\n", This, ref); + TRACE("(%p) ref %d\n", This, ref); return ref; }
1
0
0
0
Alexandre Julliard : shell32/tests: Wait a bit longer for the explorer window to be created.
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: 2d6de2d129b39d2a0c4ffafa84dabed21c0e830e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2d6de2d129b39d2a0c4ffafa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jan 10 12:58:48 2019 -0600 shell32/tests: Wait a bit longer for the explorer window to be created. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/progman_dde.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/tests/progman_dde.c b/dlls/shell32/tests/progman_dde.c index 62ed413..2d19404 100644 --- a/dlls/shell32/tests/progman_dde.c +++ b/dlls/shell32/tests/progman_dde.c @@ -166,7 +166,7 @@ static BOOL check_window_exists(const char *name) for (i = 0; i < 20; i++) { - Sleep(100); + Sleep(100 * i); if ((window = FindWindowA("ExplorerWClass", title)) || (window = FindWindowA("CabinetWClass", title))) {
1
0
0
0
Józef Kucia : d3d9/tests: Add test for clearing surfaces with different sizes.
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: 2a9f248b678a90a3b78c898dd5f895a5bf0474d6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2a9f248b678a90a3b78c898d…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 10 15:10:18 2019 +0100 d3d9/tests: Add test for clearing surfaces with different sizes. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/visual.c | 107 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 2 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index b4f512e..9a62f87 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -239,10 +239,10 @@ static DWORD getPixelColor(IDirect3DDevice9 *device, UINT x, UINT y) #define check_rt_color(a, b) check_rt_color_(__LINE__, a, b) static void check_rt_color_(unsigned int line, IDirect3DSurface9 *rt, D3DCOLOR expected_color) { + D3DCOLOR color = 0xdeadbeef; struct surface_readback rb; D3DSURFACE_DESC desc; unsigned int x, y; - D3DCOLOR color; HRESULT hr; hr = IDirect3DSurface9_GetDesc(rt, &desc); @@ -261,7 +261,7 @@ static void check_rt_color_(unsigned int line, IDirect3DSurface9 *rt, D3DCOLOR e break; } release_surface_readback(&rb); - ok_(__FILE__, line)(color == 0x000000ff, "Got unexpected color 0x%08x.\n", color); + ok_(__FILE__, line)(color == expected_color, "Got unexpected color 0x%08x.\n", color); } static IDirect3DDevice9 *create_device(IDirect3D9 *d3d, HWND device_window, HWND focus_window, BOOL windowed) @@ -1349,6 +1349,108 @@ done: DestroyWindow(window); } +static void test_clear_different_size_surfaces(void) +{ + IDirect3DSurface9 *ds, *rt, *rt2; + IDirect3DDevice9 *device; + D3DFORMAT ds_format; + D3DLOCKED_RECT lr; + unsigned int x, y; + D3DVIEWPORT9 vp; + IDirect3D9 *d3d; + D3DCAPS9 caps; + WORD *depth; + HWND window; + HRESULT hr; + + window = create_window(); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create D3D device.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(hr == D3D_OK, "Failed to get device caps, hr %#x.\n", hr); + + hr = IDirect3DDevice9_CreateRenderTarget(device, 1, 1, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, 0, TRUE, &rt, NULL); + ok(hr == D3D_OK, "Failed to create render target surface, hr %#x.\n", hr); + hr = IDirect3DDevice9_CreateRenderTarget(device, 1, 2, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, 0, TRUE, &rt2, NULL); + ok(hr == D3D_OK, "Failed to create render target surface, hr %#x.\n", hr); + + if (SUCCEEDED(IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_A8R8G8B8, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D16_LOCKABLE))) + { + ds_format = D3DFMT_D16_LOCKABLE; + } + else + { + ds_format = D3DFMT_D24S8; + } + + hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 4, 4, ds_format, + D3DMULTISAMPLE_NONE, 0, FALSE, &ds, NULL); + ok(hr == D3D_OK, "Failed to create depth surface, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetDepthStencilSurface(device, ds); + ok(hr == D3D_OK, "Failed to set depth stencil surface, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderTarget(device, 0, rt); + ok(hr == D3D_OK, "Failed to set render target, hr %#x.\n", hr); + if (caps.NumSimultaneousRTs >= 2) + { + hr = IDirect3DDevice9_SetRenderTarget(device, 1, rt2); + ok(hr == D3D_OK, "Failed to set render target, hr %#x.\n", hr); + } + + vp.X = 0; + vp.Y = 0; + vp.Width = 640; + vp.Height = 640; + vp.MinZ = 0.0f; + vp.MaxZ = 1.0f; + hr = IDirect3DDevice9_SetViewport(device, &vp); + ok(hr == D3D_OK, "Failed to set viewport, hr %#x.\n", hr); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff0000, 0.5f, 0); + ok(hr == D3D_OK, "Failed to clear, hr %#x.\n", hr); + + check_rt_color(rt, 0x00ff0000); + + if (caps.NumSimultaneousRTs >= 2) + check_rt_color(rt2, 0x00ff0000); + + if (ds_format == D3DFMT_D16_LOCKABLE) + { + hr = IDirect3DSurface9_LockRect(ds, &lr, NULL, D3DLOCK_READONLY); + ok(hr == D3D_OK, "Failed to lock rect, hr %#x.\n", hr); + for (y = 0; y < 4; ++y) + { + depth = (WORD *)((BYTE *)lr.pBits + y * lr.Pitch); + for (x = 0; x < 4; ++x) + { + ok(abs(depth[x] - 0x7fff) <= 2, "Got depth 0x%04x at %u, %u.\n", depth[x], x, y); + } + } + hr = IDirect3DSurface9_UnlockRect(ds); + ok(hr == D3D_OK, "Failed to unlock rect, hr %#x.\n", hr); + IDirect3DSurface9_Release(ds); + } + else + { + skip("D3DFMT_D16_LOCKABLE is not supported.\n"); + } + + IDirect3DSurface9_Release(rt); + IDirect3DSurface9_Release(rt2); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + static void color_fill_test(void) { IDirect3DSurface9 *surface; @@ -24465,6 +24567,7 @@ START_TEST(visual) lighting_test(); test_specular_lighting(); clear_test(); + test_clear_different_size_surfaces(); color_fill_test(); fog_test(); test_cube_wrap();
1
0
0
0
Józef Kucia : wined3d: Do not limit draw rect to intersection of all render target views.
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: 0435cac34007003f8d1172019e5a68ee250ac6a8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0435cac34007003f8d117201…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 10 15:10:17 2019 +0100 wined3d: Do not limit draw rect to intersection of all render target views. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46067
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index c67cc6c..7471d24 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -605,7 +605,6 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * struct wined3d_rendertarget_view *view; struct wined3d_cs_clear *op; unsigned int rt_count, i; - RECT view_rect; rt_count = flags & WINED3DCLEAR_TARGET ? cs->device->adapter->d3d_info.limits.max_rt_count : 0; @@ -627,17 +626,11 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * for (i = 0; i < rt_count; ++i) { if ((view = state->fb->render_targets[i])) - { - SetRect(&view_rect, 0, 0, view->width, view->height); - IntersectRect(&op->draw_rect, &op->draw_rect, &view_rect); wined3d_resource_acquire(view->resource); - } } if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) { view = state->fb->depth_stencil; - SetRect(&view_rect, 0, 0, view->width, view->height); - IntersectRect(&op->draw_rect, &op->draw_rect, &view_rect); wined3d_resource_acquire(view->resource); }
1
0
0
0
Józef Kucia : wined3d: Limit surface_cpu_blt_colour_fill() to dimensions of render target view.
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: 8a2583c7d98ea6190dc7db257ed267cfa798ea6d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8a2583c7d98ea6190dc7db25…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 10 15:10:16 2019 +0100 wined3d: Limit surface_cpu_blt_colour_fill() to dimensions of render target view. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 5dbac1c..1b6e7a5 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2970,8 +2970,8 @@ static void surface_cpu_blt_colour_fill(struct wined3d_rendertarget_view *view, c = wined3d_format_convert_from_float(view->format, colour); bpp = view->format->byte_count; - w = box->right - box->left; - h = box->bottom - box->top; + w = min(box->right, view->width) - box->left; + h = min(box->bottom, view->height) - box->top; texture = texture_from_resource(view->resource); map_binding = texture->resource.map_binding;
1
0
0
0
Józef Kucia : wined3d: Split clears for different size resources in ffp_blitter_clear().
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: 0530f33cc1644cd782ee2028966721bddf28c5d4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0530f33cc1644cd782ee2028…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 10 15:10:15 2019 +0100 wined3d: Split clears for different size resources in ffp_blitter_clear(). We cannot reliably clear attachments of different sizes using a single glClear() command. The OpenGL spec says: "If the attachment sizes are not all identical, the results of rendering are defined only within the largest area that can fit in all of the attachments. This area is defined as the intersection of rectangles having a lower left of (0, 0) and an upper right of (width, height) for each attachment. Contents of attachments outside this area are undefined after execution of a rendering command (as defined in section 2.4)." Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46067
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index a36d010..5dbac1c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2052,8 +2052,12 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de unsigned int rt_count, const struct wined3d_fb_state *fb, unsigned int rect_count, const RECT *clear_rects, const RECT *draw_rect, DWORD flags, const struct wined3d_color *colour, float depth, DWORD stencil) { + BOOL have_previous_rect = FALSE, have_identical_size = TRUE; struct wined3d_rendertarget_view *view; + struct wined3d_fb_state tmp_fb; + unsigned int next_rt_count = 0; struct wined3d_blitter *next; + RECT previous_rect, rect; DWORD next_flags = 0; unsigned int i; @@ -2071,6 +2075,8 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de { next_flags |= WINED3DCLEAR_TARGET; flags &= ~WINED3DCLEAR_TARGET; + next_rt_count = rt_count; + rt_count = 0; break; } @@ -2089,11 +2095,60 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de } if (flags) - device_clear_render_targets(device, flags & WINED3DCLEAR_TARGET ? rt_count : 0, fb, rect_count, - clear_rects, draw_rect, flags, colour, depth, stencil); + { + for (i = 0; i < rt_count; ++i) + { + if (!(view = fb->render_targets[i])) + continue; + + SetRect(&rect, 0, 0, view->width, view->height); + IntersectRect(&rect, draw_rect, &rect); + if (have_previous_rect && !EqualRect(&previous_rect, &rect)) + have_identical_size = FALSE; + previous_rect = rect; + have_previous_rect = TRUE; + } + if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) + { + view = fb->depth_stencil; + + SetRect(&rect, 0, 0, view->width, view->height); + IntersectRect(&rect, draw_rect, &rect); + if (have_previous_rect && !EqualRect(&previous_rect, &rect)) + have_identical_size = FALSE; + previous_rect = rect; + have_previous_rect = TRUE; + } + + if (have_identical_size) + { + device_clear_render_targets(device, rt_count, fb, rect_count, + clear_rects, draw_rect, flags, colour, depth, stencil); + } + else + { + for (i = 0; i < rt_count; ++i) + { + if (!(view = fb->render_targets[i])) + continue; + + tmp_fb.render_targets[0] = view; + tmp_fb.depth_stencil = NULL; + device_clear_render_targets(device, 1, &tmp_fb, rect_count, + clear_rects, draw_rect, WINED3DCLEAR_TARGET, colour, depth, stencil); + } + if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) + { + tmp_fb.render_targets[0] = NULL; + tmp_fb.depth_stencil = fb->depth_stencil; + device_clear_render_targets(device, 0, &tmp_fb, rect_count, + clear_rects, draw_rect, flags & ~WINED3DCLEAR_TARGET, colour, depth, stencil); + } + } + } if (next_flags && (next = blitter->next)) - next->ops->blitter_clear(next, device, next_flags & WINED3DCLEAR_TARGET ? rt_count : 0, fb, rect_count, + next->ops->blitter_clear(next, device, next_rt_count, fb, rect_count, clear_rects, draw_rect, next_flags, colour, depth, stencil); }
1
0
0
0
Józef Kucia : wined3d: Use accurate rt_count in ffp_blitter_clear().
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: cd3c3e56b10b64f85e5d02adc79a89227750e589 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cd3c3e56b10b64f85e5d02ad…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 10 15:10:14 2019 +0100 wined3d: Use accurate rt_count in ffp_blitter_clear(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 85f9489..a36d010 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2089,11 +2089,11 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de } if (flags) - device_clear_render_targets(device, rt_count, fb, rect_count, + device_clear_render_targets(device, flags & WINED3DCLEAR_TARGET ? rt_count : 0, fb, rect_count, clear_rects, draw_rect, flags, colour, depth, stencil); if (next_flags && (next = blitter->next)) - next->ops->blitter_clear(next, device, rt_count, fb, rect_count, + next->ops->blitter_clear(next, device, next_flags & WINED3DCLEAR_TARGET ? rt_count : 0, fb, rect_count, clear_rects, draw_rect, next_flags, colour, depth, stencil); }
1
0
0
0
Józef Kucia : wined3d: Sanitise clear flags passed to blitters.
by Alexandre Julliard
10 Jan '19
10 Jan '19
Module: wine Branch: master Commit: 2727a6ecf69397a988c29d168dc467fb7081f59c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2727a6ecf69397a988c29d16…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 10 15:10:13 2019 +0100 wined3d: Sanitise clear flags passed to blitters. In order to not trigger "if (flags)" conditions in ffp_blitter_clear() unnecessarily. Also, avoids passing WINED3DCLEAR_SYNCHRONOUS, which is handled at the level of command stream. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index aa8eef7..c67cc6c 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -612,7 +612,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * op = wined3d_cs_require_space(cs, FIELD_OFFSET(struct wined3d_cs_clear, rects[rect_count]), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_CLEAR; - op->flags = flags; + op->flags = flags & (WINED3DCLEAR_TARGET | WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL); op->rt_count = rt_count; op->fb = &cs->fb; SetRect(&op->draw_rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height); @@ -655,7 +655,7 @@ void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined op->fb = (void *)&op->rects[1]; op->opcode = WINED3D_CS_OP_CLEAR; - op->flags = flags; + op->flags = flags & (WINED3DCLEAR_TARGET | WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL); if (flags & WINED3DCLEAR_TARGET) { op->rt_count = 1;
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
50
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200