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
October 2015
----- 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
749 discussions
Start a n
N
ew thread
Matteo Bruni : d3d8/tests: Uninitialized varyings tests.
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: 7837a0504cf23f533277023baf9c30f20b40f412 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7837a0504cf23f533277023ba…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Oct 15 22:01:02 2015 +0200 d3d8/tests: Uninitialized varyings tests. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/visual.c | 205 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index 2748445..50c763f 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -8065,6 +8065,210 @@ static void test_flip(void) DestroyWindow(window); } +static void test_uninitialized_varyings(void) +{ + static const D3DMATRIX mat = + {{{ + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f, + }}}; + static const struct vec3 quad[] = + { + {-1.0f, -1.0f, 0.1f}, + {-1.0f, 1.0f, 0.1f}, + { 1.0f, -1.0f, 0.1f}, + { 1.0f, 1.0f, 0.1f}, + }; + static const DWORD decl[] = + { + D3DVSD_STREAM(0), + D3DVSD_REG(0, D3DVSDT_FLOAT3), + D3DVSD_CONST(0, 1), 0x3f000000, 0x3f000000, 0x3f000000, 0x3f000000, /* def c0, 0.5, 0.5, 0.5, 0.5 */ + D3DVSD_END() + }; + static const DWORD vs1_code[] = + { + 0xfffe0101, /* vs_1_1 */ + 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ + 0x0000ffff + }; + static const DWORD vs1_partial_code[] = + { + 0xfffe0101, /* vs_1_1 */ + 0x00000001, 0xc00f0000, 0x90e40000, /* mov oPos, v0 */ + 0x00000001, 0xd0010000, 0xa0e40000, /* mov oD0.x, c0 */ + 0x00000001, 0xd0010001, 0xa0e40000, /* mov oD1.x, c0 */ + 0x00000001, 0xe0010000, 0xa0e40000, /* mov oT0.x, c0 */ + 0x0000ffff + }; + static const DWORD ps1_diffuse_code[] = + { + 0xffff0101, /* ps_1_1 */ + 0x00000001, 0x800f0000, 0x90e40000, /* mov r0, v0 */ + 0x0000ffff + }; + static const DWORD ps1_specular_code[] = + { + 0xffff0101, /* ps_1_1 */ + 0x00000001, 0x800f0000, 0x90e40001, /* mov r0, v1 */ + 0x0000ffff + }; + static const DWORD ps1_texcoord_code[] = + { + 0xffff0101, /* ps_1_1 */ + 0x00000040, 0xb00f0000, /* texcoord t0 */ + 0x00000001, 0x800f0000, 0xb0e40000, /* mov r0, t0 */ + 0x0000ffff + }; + static const struct + { + DWORD vs_version; + const DWORD *vs; + DWORD ps_version; + const DWORD *ps; + D3DCOLOR expected; + BOOL allow_zero_alpha; + BOOL broken_warp; + } + /* On AMD specular color is generally initialized to 0x00000000 and texcoords to 0xff000000 + * while on Nvidia it's the opposite. Just allow both. */ + tests[] = + { + {D3DVS_VERSION(1, 1), vs1_code, 0, NULL, 0xffffffff}, + { 0, NULL, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff000000, TRUE}, + {D3DVS_VERSION(1, 1), vs1_code, D3DPS_VERSION(1, 1), ps1_diffuse_code, 0xffffffff}, + {D3DVS_VERSION(1, 1), vs1_code, D3DPS_VERSION(1, 1), ps1_specular_code, 0xff000000, TRUE, TRUE}, + {D3DVS_VERSION(1, 1), vs1_code, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff000000, TRUE}, + {D3DVS_VERSION(1, 1), vs1_partial_code, 0, NULL, 0xff7fffff, FALSE, TRUE}, + {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_diffuse_code, 0xff7fffff, FALSE, TRUE}, + {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_specular_code, 0xff7f0000, TRUE}, + {D3DVS_VERSION(1, 1), vs1_partial_code, D3DPS_VERSION(1, 1), ps1_texcoord_code, 0xff7f0000, TRUE}, + }; + IDirect3DDevice8 *device; + IDirect3D8 *d3d; + HWND window; + HRESULT hr; + DWORD vs, ps; + unsigned int i; + ULONG refcount; + D3DCAPS8 caps; + IDirect3DSurface8 *backbuffer; + D3DADAPTER_IDENTIFIER8 identifier; + struct surface_readback rb; + D3DCOLOR color; + BOOL warp; + + window = CreateWindowA("static", "d3d8_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate8(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + IDirect3D8_Release(d3d); + DestroyWindow(window); + return; + } + + hr = IDirect3D8_GetAdapterIdentifier(d3d, D3DADAPTER_DEFAULT, 0, &identifier); + ok(SUCCEEDED(hr), "Failed to get adapter identifier, hr %#x.\n", hr); + warp = !strcmp(identifier.Driver, "d3d10warp.dll"); + + hr = IDirect3DDevice8_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr); + + hr = IDirect3DDevice8_GetBackBuffer(device, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); + ok(SUCCEEDED(hr), "Failed to get back buffer, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetTransform(device, D3DTS_WORLD, &mat); + ok(SUCCEEDED(hr), "Failed to set world transform, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTransform(device, D3DTS_VIEW, &mat); + ok(SUCCEEDED(hr), "Failed to set view transform, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetTransform(device, D3DTS_PROJECTION, &mat); + ok(SUCCEEDED(hr), "Failed to set projection transform, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CLIPPING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, FALSE); + ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_FOGENABLE, FALSE); + ok(SUCCEEDED(hr), "Failed to disable fog, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_STENCILENABLE, FALSE); + ok(SUCCEEDED(hr), "Failed to disable stencil test, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE); + ok(SUCCEEDED(hr), "Failed to disable culling, hr %#x.\n", hr); + + for (i = 0; i < sizeof(tests) / sizeof(tests[0]); ++i) + { + if (caps.VertexShaderVersion < tests[i].vs_version + || caps.PixelShaderVersion < tests[i].ps_version) + { + skip("Vertex / pixel shader version not supported, skipping test %u.\n", i); + continue; + } + if (tests[i].vs) + { + hr = IDirect3DDevice8_CreateVertexShader(device, decl, tests[i].vs, &vs, 0); + ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x (case %u).\n", hr, i); + hr = IDirect3DDevice8_SetVertexShader(device, vs); + ok(SUCCEEDED(hr), "Failed to set vertex shader, hr %#x.\n", hr); + } + else + { + vs = 0; + hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ); + ok(SUCCEEDED(hr), "Failed to set vertex shader, hr %#x.\n", hr); + } + if (tests[i].ps) + { + hr = IDirect3DDevice8_CreatePixelShader(device, tests[i].ps, &ps); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x (case %u).\n", hr, i); + } + else + { + ps = 0; + } + + hr = IDirect3DDevice8_SetPixelShader(device, ps); + ok(SUCCEEDED(hr), "Failed to set pixel shader, hr %#x.\n", hr); + + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0); + ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0])); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + + get_rt_readback(backbuffer, &rb); + color = get_readback_color(&rb, 320, 240); + ok(color_match(color, tests[i].expected, 1) + || (tests[i].allow_zero_alpha && color_match(color, tests[i].expected & 0x00ffffff, 1)) + || (broken(warp && tests[i].broken_warp)), + "Got unexpected color 0x%08x, case %u.\n", color, i); + release_surface_readback(&rb); + + if (vs) + IDirect3DDevice8_DeleteVertexShader(device, vs); + if (ps) + IDirect3DDevice8_DeletePixelShader(device, ps); + } + + hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr); + + IDirect3DSurface8_Release(backbuffer); + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + IDirect3D8_Release(d3d); + DestroyWindow(window); +} + START_TEST(visual) { D3DADAPTER_IDENTIFIER8 identifier; @@ -8127,4 +8331,5 @@ START_TEST(visual) test_vshader_input(); test_fixed_function_fvf(); test_flip(); + test_uninitialized_varyings(); }
1
0
0
0
Stefan Dösinger : wined3d: Pass a context to surface_load_location.
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: 973de3f59c7d47602fe68c8cecf8fc3dbc59bcff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=973de3f59c7d47602fe68c8ce…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Oct 15 22:41:12 2015 +0200 wined3d: Pass a context to surface_load_location. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 4 +- dlls/wined3d/device.c | 22 ++++---- dlls/wined3d/drawprim.c | 20 +++---- dlls/wined3d/surface.c | 115 ++++++++++++++++++++++++----------------- dlls/wined3d/swapchain.c | 8 +-- dlls/wined3d/texture.c | 7 ++- dlls/wined3d/wined3d_private.h | 5 +- 7 files changed, 103 insertions(+), 78 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=973de3f59c7d47602fe68…
1
0
0
0
Stefan Dösinger : wined3d: Pass a context to surface_load_fb_texture.
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: 14f024048b301cd6ccc7e15e731d069cd68b13c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14f024048b301cd6ccc7e15e7…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Oct 15 22:41:11 2015 +0200 wined3d: Pass a context to surface_load_fb_texture. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 2 +- dlls/wined3d/surface.c | 22 ++++++++++++++++------ dlls/wined3d/wined3d_private.h | 3 ++- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 3d65fe0..9ac6666 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -7859,7 +7859,7 @@ static void arbfp_blit_surface(struct wined3d_device *device, DWORD filter, * flip in the blitter, we don't actually need that flip anyway. So we * use the surface's texture as scratch texture, and flip the source * rectangle instead. */ - surface_load_fb_texture(src_surface, FALSE); + surface_load_fb_texture(src_surface, FALSE, context); src_rect.top = src_surface->resource.height - src_rect.top; src_rect.bottom = src_surface->resource.height - src_rect.bottom; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1b78712..1f92d1e 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2803,14 +2803,23 @@ error: /* Read the framebuffer contents into a texture. Note that this function * doesn't do any kind of flipping. Using this on an onscreen surface will - * result in a flipped D3D texture. */ -void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb) + * result in a flipped D3D texture. + * + * Context activation is done by the caller. This function may temporarily + * switch to a different context and restore the original one before return. */ +void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *old_ctx) { struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; + struct wined3d_context *context = old_ctx; + struct wined3d_surface *restore_rt = NULL; + + if (old_ctx->current_rt != surface) + { + restore_rt = old_ctx->current_rt; + context = context_acquire(device, surface); + } - context = context_acquire(device, surface); gl_info = context->gl_info; device_invalidate_state(device, STATE_FRAMEBUFFER); @@ -2829,7 +2838,8 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb) 0, 0, 0, 0, surface->resource.width, surface->resource.height); checkGLcall("glCopyTexSubImage2D"); - context_release(context); + if (restore_rt) + context_restore(context, restore_rt); } void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample) @@ -3898,7 +3908,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, && wined3d_resource_is_offscreen(&texture->resource) && (surface->locations & WINED3D_LOCATION_DRAWABLE)) { - surface_load_fb_texture(surface, srgb); + surface_load_fb_texture(surface, srgb, context); return WINED3D_OK; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 75c16ef..68d420b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2448,7 +2448,8 @@ void surface_invalidate_location(struct wined3d_surface *surface, DWORD location void surface_load(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN; void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; -void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN; +void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, + struct wined3d_context *context) DECLSPEC_HIDDEN; HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN; void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; void surface_prepare_rb(struct wined3d_surface *surface,
1
0
0
0
Stefan Dösinger : wined3d: Pass a context to surface_load_texture.
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: 31e0755ea664e02f05a1e500a19fb5f584c1c1cc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=31e0755ea664e02f05a1e500a…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Oct 15 22:41:10 2015 +0200 wined3d: Pass a context to surface_load_texture. Signed-off-by: Stefan Dösinger <stefan(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 | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index eb88b59..1b78712 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3881,13 +3881,13 @@ static HRESULT surface_load_drawable(struct wined3d_surface *surface, } static HRESULT surface_load_texture(struct wined3d_surface *surface, - const struct wined3d_gl_info *gl_info, BOOL srgb) + struct wined3d_context *context, BOOL srgb) { + const struct wined3d_gl_info *gl_info = context->gl_info; RECT src_rect = {0, 0, surface->resource.width, surface->resource.height}; struct wined3d_device *device = surface->resource.device; const struct wined3d_color_key_conversion *conversion; struct wined3d_texture *texture = surface->container; - struct wined3d_context *context; UINT width, src_pitch, dst_pitch; struct wined3d_bo_address data; struct wined3d_format format; @@ -3909,8 +3909,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, NULL, surface->resource.usage, surface->resource.pool, surface->resource.format, NULL, surface->resource.usage, surface->resource.pool, surface->resource.format)) { - context = context_acquire(device, NULL); - if (srgb) surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_RGB, &src_rect, surface, WINED3D_LOCATION_TEXTURE_SRGB, &src_rect); @@ -3918,8 +3916,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_SRGB, &src_rect, surface, WINED3D_LOCATION_TEXTURE_RGB, &src_rect); - context_release(context); - return WINED3D_OK; } @@ -3934,10 +3930,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, DWORD dst_location = srgb ? WINED3D_LOCATION_TEXTURE_SRGB : WINED3D_LOCATION_TEXTURE_RGB; RECT rect = {0, 0, surface->resource.width, surface->resource.height}; - context = context_acquire(device, NULL); surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, src_location, &rect, surface, dst_location, &rect); - context_release(context); return WINED3D_OK; } @@ -3975,9 +3969,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, surface_load_location(surface, WINED3D_LOCATION_SYSMEM); } - /* TODO: Use already acquired context when possible. */ - context = context_acquire(device, NULL); - wined3d_texture_prepare_texture(texture, context, srgb); wined3d_texture_bind_and_dirtify(texture, context, srgb); @@ -4051,8 +4042,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, wined3d_surface_upload_data(surface, gl_info, &format, &src_rect, src_pitch, &dst_point, srgb, wined3d_const_bo_address(&data)); - context_release(context); - HeapFree(GetProcessHeap(), 0, mem); return WINED3D_OK; @@ -4074,7 +4063,6 @@ static void surface_multisample_resolve(struct wined3d_surface *surface, struct HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) { struct wined3d_device *device = surface->resource.device; - const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; HRESULT hr; struct wined3d_context *context = NULL; @@ -4154,7 +4142,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) case WINED3D_LOCATION_TEXTURE_RGB: case WINED3D_LOCATION_TEXTURE_SRGB: - if (FAILED(hr = surface_load_texture(surface, gl_info, location == WINED3D_LOCATION_TEXTURE_SRGB))) + context = context_acquire(device, NULL); + hr = surface_load_texture(surface, context, location == WINED3D_LOCATION_TEXTURE_SRGB); + context_release(context); + if (FAILED(hr)) return hr; break;
1
0
0
0
Stefan Dösinger : wined3d: Pass a context to surface_multisample_resolve.
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: c7eb6a75344dc3c602d627a1c0366482ed14936d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7eb6a75344dc3c602d627a1c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Oct 15 22:41:09 2015 +0200 wined3d: Pass a context to surface_multisample_resolve. Signed-off-by: Stefan Dösinger <stefan(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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 994e161..eb88b59 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -4058,19 +4058,17 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, return WINED3D_OK; } -static void surface_multisample_resolve(struct wined3d_surface *surface) +/* Context activation is done by the caller. */ +static void surface_multisample_resolve(struct wined3d_surface *surface, struct wined3d_context *context) { - struct wined3d_context *context; RECT rect = {0, 0, surface->resource.width, surface->resource.height}; if (!(surface->locations & WINED3D_LOCATION_RB_MULTISAMPLE)) ERR("Trying to resolve multisampled surface %p, but location WINED3D_LOCATION_RB_MULTISAMPLE not current.\n", surface); - context = context_acquire(surface->resource.device, NULL); surface_blt_fbo(surface->resource.device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_RB_MULTISAMPLE, &rect, surface, WINED3D_LOCATION_RB_RESOLVED, &rect); - context_release(context); } HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) @@ -4149,7 +4147,9 @@ HRESULT surface_load_location(struct wined3d_surface *surface, DWORD location) break; case WINED3D_LOCATION_RB_RESOLVED: - surface_multisample_resolve(surface); + context = context_acquire(device, NULL); + surface_multisample_resolve(surface, context); + context_release(context); break; case WINED3D_LOCATION_TEXTURE_RGB:
1
0
0
0
Nikolay Sivov : dwrite: Use given ppdip factor in GetAlphaTextureBounds().
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: a23b395e879f135fcf40d89320a32db45522b42e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a23b395e879f135fcf40d8932…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 16 13:21:53 2015 +0300 dwrite: Use given ppdip factor in GetAlphaTextureBounds(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/main.c | 7 ++++++- dlls/dwrite/tests/font.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index c996827..fc9d313 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -1097,7 +1097,12 @@ static HRESULT WINAPI dwritefactory_CreateGlyphRunAnalysis(IDWriteFactory2 *ifac TRACE("(%p)->(%p %.2f %p %d %d %.2f %.2f %p)\n", This, run, ppdip, transform, rendering_mode, measuring_mode, originX, originY, analysis); - return create_glyphrunanalysis(rendering_mode, measuring_mode, run, 1.0f, DWRITE_GRID_FIT_MODE_DEFAULT, + if (ppdip <= 0.0f) { + *analysis = NULL; + return E_INVALIDARG; + } + + return create_glyphrunanalysis(rendering_mode, measuring_mode, run, ppdip, DWRITE_GRID_FIT_MODE_DEFAULT, DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE, originX, originY, analysis); } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 468a5c0..a2af967 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -3531,17 +3531,37 @@ static void test_CreateGlyphRunAnalysis(void) run.isSideways = FALSE; run.bidiLevel = 0; + /* zero ppdip */ + analysis = (void*)0xdeadbeef; + hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 0.0, NULL, + DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, + 0.0, 0.0, &analysis); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(analysis == NULL, "got %p\n", analysis); + + /* negative ppdip */ + analysis = (void*)0xdeadbeef; + hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, -1.0, NULL, + DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, + 0.0, 0.0, &analysis); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(analysis == NULL, "got %p\n", analysis); + /* default mode is not allowed */ + analysis = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_DEFAULT, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(analysis == NULL, "got %p\n", analysis); /* outline too */ + analysis = (void*)0xdeadbeef; hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_OUTLINE, DWRITE_MEASURING_MODE_NATURAL, 0.0, 0.0, &analysis); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + ok(analysis == NULL, "got %p\n", analysis); hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, @@ -3562,6 +3582,18 @@ static void test_CreateGlyphRunAnalysis(void) ok(!IsRectEmpty(&rect), "got empty rect\n"); IDWriteGlyphRunAnalysis_Release(analysis); + /* doubled ppdip */ + hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 2.0, NULL, + DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, + 0.0, 0.0, &analysis); + ok(hr == S_OK, "got 0x%08x\n", hr); + memset(&rect2, 0, sizeof(rect2)); + hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_ALIASED_1x1, &rect2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(rect.right - rect.left < rect2.right - rect2.left, "expected wider rect\n"); + ok(rect.bottom - rect.top < rect2.bottom - rect2.top, "expected taller rect\n"); + IDWriteGlyphRunAnalysis_Release(analysis); + hr = IDWriteFactory_CreateGlyphRunAnalysis(factory, &run, 1.0, NULL, DWRITE_RENDERING_MODE_ALIASED, DWRITE_MEASURING_MODE_NATURAL, 10.0, -5.0, &analysis);
1
0
0
0
Henri Verbeet : wined3d: The cursor image surface is not allowed to be NULL in wined3d_device_set_cursor_properties ().
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: 8b9e56cc9e3d526e64e6fe7de664ed487875a0a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b9e56cc9e3d526e64e6fe7de…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Oct 16 10:35:09 2015 +0200 wined3d: The cursor image surface is not allowed to be NULL in wined3d_device_set_cursor_properties(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 138 +++++++++++++++++++++++++------------------------- 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4d1030d..0d607ee 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4205,6 +4205,10 @@ static struct wined3d_texture *wined3d_device_create_cursor_texture(struct wined HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device, UINT x_hotspot, UINT y_hotspot, struct wined3d_surface *cursor_image) { + struct wined3d_display_mode mode; + struct wined3d_map_desc map_desc; + HRESULT hr; + TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n", device, x_hotspot, y_hotspot, cursor_image); @@ -4214,86 +4218,84 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device device->cursor_texture = NULL; } - if (cursor_image) + if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM) { - struct wined3d_display_mode mode; - struct wined3d_map_desc map_desc; - HRESULT hr; + WARN("Surface %p has an invalid format %s.\n", + cursor_image, debug_d3dformat(cursor_image->resource.format->id)); + return WINED3DERR_INVALIDCALL; + } - /* MSDN: Cursor must be A8R8G8B8 */ - if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM) - { - WARN("surface %p has an invalid format.\n", cursor_image); - return WINED3DERR_INVALIDCALL; - } + if (FAILED(hr = wined3d_get_adapter_display_mode(device->wined3d, device->adapter->ordinal, &mode, NULL))) + { + ERR("Failed to get display mode, hr %#x.\n", hr); + return WINED3DERR_INVALIDCALL; + } - if (FAILED(hr = wined3d_get_adapter_display_mode(device->wined3d, device->adapter->ordinal, &mode, NULL))) - { - ERR("Failed to get display mode, hr %#x.\n", hr); - return WINED3DERR_INVALIDCALL; - } + if (cursor_image->resource.width > mode.width || cursor_image->resource.height > mode.height) + { + WARN("Surface %p dimensions are %ux%u, but screen dimensions are %ux%u.\n", + cursor_image, cursor_image->resource.width, cursor_image->resource.height, + mode.width, mode.height); + return WINED3DERR_INVALIDCALL; + } - /* MSDN: Cursor must be smaller than the display mode */ - if (cursor_image->resource.width > mode.width || cursor_image->resource.height > mode.height) - { - WARN("Surface %p dimensions are %ux%u, but screen dimensions are %ux%u.\n", - cursor_image, cursor_image->resource.width, cursor_image->resource.height, - mode.width, mode.height); - return WINED3DERR_INVALIDCALL; - } + /* TODO: MSDN: Cursor sizes must be a power of 2 */ - /* TODO: MSDN: Cursor sizes must be a power of 2 */ + /* Do not store the surface's pointer because the application may + * release it after setting the cursor image. Windows doesn't + * addref the set surface, so we can't do this either without + * creating circular refcount dependencies. */ + if (!(device->cursor_texture = wined3d_device_create_cursor_texture(device, cursor_image))) + { + ERR("Failed to create cursor texture.\n"); + return WINED3DERR_INVALIDCALL; + } - /* Do not store the surface's pointer because the application may - * release it after setting the cursor image. Windows doesn't - * addref the set surface, so we can't do this either without - * creating circular refcount dependencies. */ - if (!(device->cursor_texture = wined3d_device_create_cursor_texture(device, cursor_image))) - { - ERR("Failed to create cursor texture.\n"); - return WINED3DERR_INVALIDCALL; - } + if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32) + { + UINT mask_size = cursor_image->resource.width * cursor_image->resource.height / 8; + ICONINFO cursor_info; + DWORD *mask_bits; + HCURSOR cursor; - device->cursorWidth = cursor_image->resource.width; - device->cursorHeight = cursor_image->resource.height; + /* 32-bit user32 cursors ignore the alpha channel if it's all + * zeroes, and use the mask instead. Fill the mask with all ones + * to ensure we still get a fully transparent cursor. */ + if (!(mask_bits = HeapAlloc(GetProcessHeap(), 0, mask_size))) + return E_OUTOFMEMORY; + memset(mask_bits, 0xff, mask_size); + + wined3d_surface_map(cursor_image, &map_desc, NULL, WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY); + cursor_info.fIcon = FALSE; + cursor_info.xHotspot = x_hotspot; + cursor_info.yHotspot = y_hotspot; + cursor_info.hbmMask = CreateBitmap(cursor_image->resource.width, + cursor_image->resource.height, 1, 1, mask_bits); + cursor_info.hbmColor = CreateBitmap(cursor_image->resource.width, + cursor_image->resource.height, 1, 32, map_desc.data); + wined3d_surface_unmap(cursor_image); + + /* Create our cursor and clean up. */ + cursor = CreateIconIndirect(&cursor_info); + if (cursor_info.hbmMask) + DeleteObject(cursor_info.hbmMask); + if (cursor_info.hbmColor) + DeleteObject(cursor_info.hbmColor); + if (device->hardwareCursor) + DestroyCursor(device->hardwareCursor); + device->hardwareCursor = cursor; + if (device->bCursorVisible) + SetCursor(cursor); - if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32) - { - UINT mask_size = cursor_image->resource.width * cursor_image->resource.height / 8; - ICONINFO cursorInfo; - DWORD *maskBits; - HCURSOR cursor; - - /* 32-bit user32 cursors ignore the alpha channel if it's all - * zeroes, and use the mask instead. Fill the mask with all ones - * to ensure we still get a fully transparent cursor. */ - maskBits = HeapAlloc(GetProcessHeap(), 0, mask_size); - memset(maskBits, 0xff, mask_size); - wined3d_surface_map(cursor_image, &map_desc, NULL, - WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY); - TRACE("width: %u height: %u.\n", cursor_image->resource.width, cursor_image->resource.height); - - cursorInfo.fIcon = FALSE; - cursorInfo.xHotspot = x_hotspot; - cursorInfo.yHotspot = y_hotspot; - cursorInfo.hbmMask = CreateBitmap(cursor_image->resource.width, cursor_image->resource.height, - 1, 1, maskBits); - cursorInfo.hbmColor = CreateBitmap(cursor_image->resource.width, cursor_image->resource.height, - 1, 32, map_desc.data); - wined3d_surface_unmap(cursor_image); - /* Create our cursor and clean up. */ - cursor = CreateIconIndirect(&cursorInfo); - if (cursorInfo.hbmMask) DeleteObject(cursorInfo.hbmMask); - if (cursorInfo.hbmColor) DeleteObject(cursorInfo.hbmColor); - if (device->hardwareCursor) DestroyCursor(device->hardwareCursor); - device->hardwareCursor = cursor; - if (device->bCursorVisible) SetCursor( cursor ); - HeapFree(GetProcessHeap(), 0, maskBits); - } + HeapFree(GetProcessHeap(), 0, mask_bits); } + TRACE("New cursor dimensions are %ux%u.\n", cursor_image->resource.width, cursor_image->resource.height); + device->cursorWidth = cursor_image->resource.width; + device->cursorHeight = cursor_image->resource.height; device->xHotSpot = x_hotspot; device->yHotSpot = y_hotspot; + return WINED3D_OK; }
1
0
0
0
Henri Verbeet : d3d9: Simplify d3d9_device_CheckDeviceState().
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: 51b9aba9ccd476fbab2837243f314bab41186aaa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51b9aba9ccd476fbab2837243…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Oct 16 10:35:08 2015 +0200 d3d9: Simplify d3d9_device_CheckDeviceState(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 9c09f65..9ff32a7 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3287,13 +3287,11 @@ static HRESULT WINAPI d3d9_device_CheckDeviceState(IDirect3DDevice9Ex *iface, HW { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); struct wined3d_swapchain_desc swapchain_desc; - struct wined3d_swapchain *swapchain; TRACE("iface %p, dst_window %p.\n", iface, dst_window); wined3d_mutex_lock(); - swapchain = wined3d_device_get_swapchain(device->wined3d_device, 0); - wined3d_swapchain_get_desc(swapchain, &swapchain_desc); + wined3d_swapchain_get_desc(device->implicit_swapchains[0]->wined3d_swapchain, &swapchain_desc); wined3d_mutex_unlock(); if (swapchain_desc.windowed)
1
0
0
0
Henri Verbeet : d3d8: Simplify d3d8_device_GetBackBuffer().
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: aee692d2244127ecea4f477ed0d3a83ceb6dd5c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aee692d2244127ecea4f477ed…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri Oct 16 10:35:07 2015 +0200 d3d8: Simplify d3d8_device_GetBackBuffer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 20ce900..9dd78b0 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -722,7 +722,7 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface, UINT backbuffer_idx, D3DBACKBUFFER_TYPE backbuffer_type, IDirect3DSurface8 **backbuffer) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - struct wined3d_swapchain *swapchain; + struct wined3d_swapchain *wined3d_swapchain; struct wined3d_resource *wined3d_resource; struct wined3d_texture *wined3d_texture; struct d3d8_surface *surface_impl; @@ -734,14 +734,9 @@ static HRESULT WINAPI d3d8_device_GetBackBuffer(IDirect3DDevice8 *iface, /* No need to check for backbuffer == NULL, Windows crashes in that case. */ wined3d_mutex_lock(); - if (!(swapchain = wined3d_device_get_swapchain(device->wined3d_device, 0))) - { - wined3d_mutex_unlock(); - *backbuffer = NULL; - return D3DERR_INVALIDCALL; - } - if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(swapchain, backbuffer_idx))) + wined3d_swapchain = device->implicit_swapchain->wined3d_swapchain; + if (!(wined3d_texture = wined3d_swapchain_get_back_buffer(wined3d_swapchain, backbuffer_idx))) { wined3d_mutex_unlock(); *backbuffer = NULL;
1
0
0
0
Nikolay Sivov : strmbase: Avoid using HRESULT codes as BOOL value ( PVS-Studio).
by Alexandre Julliard
16 Oct '15
16 Oct '15
Module: wine Branch: master Commit: a59e3e0f4ef9b3232d3cd24f237f48f4e6920003 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a59e3e0f4ef9b3232d3cd24f2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 16 10:17:59 2015 +0300 strmbase: Avoid using HRESULT codes as BOOL value (PVS-Studio). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/outputqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/strmbase/outputqueue.c b/dlls/strmbase/outputqueue.c index cbcd964..36960e3 100644 --- a/dlls/strmbase/outputqueue.c +++ b/dlls/strmbase/outputqueue.c @@ -101,7 +101,7 @@ HRESULT WINAPI OutputQueue_Construct( EnterCriticalSection(&This->csQueue); if (bAuto && pInputPin->pMemInputPin) - threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin); + threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin) == S_OK; else threaded = bQueue;
1
0
0
0
← Newer
1
...
30
31
32
33
34
35
36
...
75
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200