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
2024
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
Download
wine-devel
April 2018
----- 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
[email protected]
75 participants
538 discussions
Start a n
N
ew thread
[PATCH 1/2] msi: Execute the custom action server with the correct bitness.
by Zebediah Figura
The bitness depends solely on the bitness of the DLL (tested manually). Fixes bugs 31741 and 37856. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- dlls/msi/custom.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 72c3efd..4ec1a39 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -579,11 +579,19 @@ UINT __wine_msi_call_dll_function(const GUID *guid) static DWORD WINAPI DllThread( LPVOID arg ) { - WCHAR buffer[64] = {'m','s','i','e','x','e','c','.','e','x','e',' ','-','E','m','b','e','d','d','i','n','g',' ',0}; + static const WCHAR msiexec32W[] = {'C',':','/','w','i','n','d','o','w','s','/', + 's','y','s','w','o','w','6','4','/','m','s','i','e','x','e','c','.','e','x','e',0}; + static const WCHAR msiexecW[] = {'m','s','i','e','x','e','c','.','e','x','e',0}; + static const WCHAR embeddingW[] = {' ','-','E','m','b','e','d','d','i','n','g',' ',0}; + msi_custom_action_info *info; PROCESS_INFORMATION pi = {0}; STARTUPINFOW si = {0}; + WCHAR buffer[100]; RPC_STATUS status; GUID *guid = arg; + void *cookie; + BOOL wow64; + DWORD arch; DWORD rc; TRACE("custom action (%x) started\n", GetCurrentThreadId() ); @@ -605,8 +613,25 @@ static DWORD WINAPI DllThread( LPVOID arg ) return status; } + info = find_action_by_guid(guid); + GetBinaryTypeW(info->source, &arch); + + if (sizeof(void *) == 8 && arch == SCS_32BIT_BINARY) + strcpyW(buffer, msiexec32W); + else + strcpyW(buffer, msiexecW); + strcatW(buffer, embeddingW); StringFromGUID2(guid, buffer + strlenW(buffer), 39); - CreateProcessW(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + + if (IsWow64Process(GetCurrentProcess(), &wow64) && wow64 && arch == SCS_64BIT_BINARY) + { + Wow64DisableWow64FsRedirection(&cookie); + CreateProcessW(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + Wow64RevertWow64FsRedirection(cookie); + } + else + CreateProcessW(NULL, buffer, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); + WaitForSingleObject(pi.hProcess, INFINITE); GetExitCodeProcess(pi.hProcess, &rc); CloseHandle(pi.hProcess); -- 2.7.4
6 years
3
5
0
0
[PATCH 5/5] d3d11/tests: Add tests for D3D11_FEATURE_ARCHITECTURE_INFO in CheckFeatureSupport().
by Henri Verbeet
From: Pablo Martin <pmart-wine(a)riseup.net> Signed-off-by: Pablo Martin <pmart-wine(a)riseup.net> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/d3d11/tests/d3d11.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 8ca66346266..0fc22c45a0b 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -15486,6 +15486,7 @@ static void test_check_feature_support(void) { D3D11_FEATURE_DATA_THREADING threading[2]; D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS hwopts; + D3D11_FEATURE_DATA_ARCHITECTURE_INFO archinfo; ID3D11Device *device; ULONG refcount; HRESULT hr; @@ -15544,6 +15545,13 @@ static void test_check_feature_support(void) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); trace("Compute shader support via SM4 %#x.\n", hwopts.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_ARCHITECTURE_INFO, &archinfo, sizeof(archinfo)); + ok(hr == S_OK || broken(hr == E_INVALIDARG) /* Not available on all Windows versions. */, + "Got unexpected hr %#x.\n", hr); + hr = ID3D11Device_CheckFeatureSupport(device, D3D11_FEATURE_ARCHITECTURE_INFO, &archinfo, sizeof(archinfo)*2); + ok(hr == E_INVALIDARG /* Not available on all Windows versions but they will return E_INVALIDARG anyways. */, + "Got unexpected hr %#x.\n", hr); + refcount = ID3D11Device_Release(device); ok(!refcount, "Device has %u references left.\n", refcount); } -- 2.11.0
6 years
2
1
0
0
[PATCH 4/5] d3d11: Handle D3D11_FEATURE_ARCHITECTURE_INFO in d3d11_device_CheckFeatureSupport().
by Henri Verbeet
From: Pablo Martin <pmart-wine(a)riseup.net> Signed-off-by: Pablo Martin <pmart-wine(a)riseup.net> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/d3d11/device.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d3155d56bf6..fbcbaf8c9da 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3445,6 +3445,20 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device * return S_OK; } + case D3D11_FEATURE_ARCHITECTURE_INFO: + { + D3D11_FEATURE_DATA_ARCHITECTURE_INFO *options = feature_support_data; + if (feature_support_data_size != sizeof(*options)) + { + WARN("Invalid data size.\n"); + return E_INVALIDARG; + } + + FIXME("Returning fake data architecture info.\n"); + options->TileBasedDeferredRenderer = FALSE; + return S_OK; + } + default: FIXME("Unhandled feature %#x.\n", feature); return E_NOTIMPL; -- 2.11.0
6 years
1
0
0
0
[PATCH 3/5] wined3d: Add new functions to set and get maximum frame latency for the device.
by Henri Verbeet
From: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/wined3d/cs.c | 5 ++--- dlls/wined3d/device.c | 19 +++++++++++++++++++ dlls/wined3d/swapchain.c | 7 +++++++ dlls/wined3d/wined3d.spec | 2 ++ dlls/wined3d/wined3d_private.h | 4 ++++ include/wine/wined3d.h | 2 ++ 6 files changed, 36 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 173490d789a..e4a29406a4f 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -496,9 +496,8 @@ void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *sw cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT); /* Limit input latency by limiting the number of presents that we can get - * ahead of the worker thread. We have a constant limit here, but - * IDXGIDevice1 allows tuning this. */ - while (pending > 1) + * ahead of the worker thread. */ + while (pending >= swapchain->max_frame_latency) { wined3d_pause(); pending = InterlockedCompareExchange(&cs->pending_presents, 0, 0); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 86c36d5a266..c853b43440b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3081,6 +3081,23 @@ struct wined3d_unordered_access_view * CDECL wined3d_device_get_unordered_access return wined3d_device_get_pipeline_unordered_access_view(device, WINED3D_PIPELINE_GRAPHICS, idx); } +void CDECL wined3d_device_set_max_frame_latency(struct wined3d_device *device, unsigned int latency) +{ + unsigned int i; + + if (!latency) + latency = 3; + + device->max_frame_latency = latency; + for (i = 0; i < device->swapchain_count; ++i) + swapchain_set_max_frame_latency(device->swapchains[i], device); +} + +unsigned int CDECL wined3d_device_get_max_frame_latency(const struct wined3d_device *device) +{ + return device->max_frame_latency; +} + /* Context activation is done by the caller. */ #define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size) static HRESULT process_vertices_strided(const struct wined3d_device *device, DWORD dwDestIndex, DWORD dwCount, @@ -5225,6 +5242,8 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, &adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT); device->update_state = &device->state; + device->max_frame_latency = 3; + if (!(device->cs = wined3d_cs_create(device))) { WARN("Failed to create command stream.\n"); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 2aec612018c..ea93212a24f 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -740,6 +740,12 @@ static void wined3d_swapchain_cs_init(void *object) context_release(swapchain->context[0]); } +void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain, const struct wined3d_device *device) +{ + /* Subtract 1 for the implicit OpenGL latency. */ + swapchain->max_frame_latency = device->max_frame_latency >= 2 ? device->max_frame_latency - 1 : 1; +} + static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device, struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) { @@ -777,6 +783,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 swapchain->win_handle = window; swapchain->device_window = window; swapchain->swap_interval = WINED3D_SWAP_INTERVAL_DEFAULT; + swapchain_set_max_frame_latency(swapchain, device); if (FAILED(hr = wined3d_get_adapter_display_mode(device->wined3d, adapter->ordinal, &swapchain->original_mode, NULL))) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 357b76ebac1..bf29e206b53 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -86,6 +86,7 @@ @ cdecl wined3d_device_get_light(ptr long ptr) @ cdecl wined3d_device_get_light_enable(ptr long ptr) @ cdecl wined3d_device_get_material(ptr ptr) +@ cdecl wined3d_device_get_max_frame_latency(ptr) @ cdecl wined3d_device_get_npatch_mode(ptr) @ cdecl wined3d_device_get_pixel_shader(ptr) @ cdecl wined3d_device_get_predication(ptr ptr) @@ -161,6 +162,7 @@ @ cdecl wined3d_device_set_light(ptr long ptr) @ cdecl wined3d_device_set_light_enable(ptr long long) @ cdecl wined3d_device_set_material(ptr ptr) +@ cdecl wined3d_device_set_max_frame_latency(ptr long) @ cdecl wined3d_device_set_multithreaded(ptr) @ cdecl wined3d_device_set_npatch_mode(ptr float) @ cdecl wined3d_device_set_pixel_shader(ptr ptr) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ab13a29530a..b297799f821 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2957,6 +2957,7 @@ struct wined3d_device struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; + unsigned int max_frame_latency; struct list resources; /* a linked list to track resources created by the device */ struct list shaders; /* a linked list to track shaders (pixel and vertex) */ @@ -3821,6 +3822,7 @@ struct wined3d_swapchain struct wined3d_palette *palette; RECT front_buffer_update; unsigned int swap_interval; + unsigned int max_frame_latency; LONG prev_time, frames; /* Performance tracking */ @@ -3841,6 +3843,8 @@ struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchai void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; +void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain, + const struct wined3d_device *device) DECLSPEC_HIDDEN; /***************************************************************************** * Utility function prototypes diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 13e83da6265..15e14e5c5f3 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2281,6 +2281,7 @@ HRESULT __cdecl wined3d_device_get_light(const struct wined3d_device *device, UINT light_idx, struct wined3d_light *light); HRESULT __cdecl wined3d_device_get_light_enable(const struct wined3d_device *device, UINT light_idx, BOOL *enable); void __cdecl wined3d_device_get_material(const struct wined3d_device *device, struct wined3d_material *material); +unsigned int __cdecl wined3d_device_get_max_frame_latency(const struct wined3d_device *device); float __cdecl wined3d_device_get_npatch_mode(const struct wined3d_device *device); struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct wined3d_device *device); struct wined3d_query * __cdecl wined3d_device_get_predication(struct wined3d_device *device, BOOL *value); @@ -2402,6 +2403,7 @@ HRESULT __cdecl wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const struct wined3d_light *light); HRESULT __cdecl wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable); void __cdecl wined3d_device_set_material(struct wined3d_device *device, const struct wined3d_material *material); +void __cdecl wined3d_device_set_max_frame_latency(struct wined3d_device *device, unsigned int max_frame_latency); void __cdecl wined3d_device_set_multithreaded(struct wined3d_device *device); HRESULT __cdecl wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments); void __cdecl wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader); -- 2.11.0
6 years
1
0
0
0
[PATCH 2/5] wined3d: Rename gen_planar_yuv_read() to gen_packed_yuv_read().
by Henri Verbeet
From: Matteo Bruni <mbruni(a)codeweavers.com> UYVY and YUY2 are packed, YV12 and NV12 are planar. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/wined3d/arb_program_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index d4cc9d54d2a..4fbb3a59ecd 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -6936,7 +6936,7 @@ static void arbfp_blitter_destroy(struct wined3d_blitter *blitter, struct wined3 heap_free(arbfp_blitter); } -static void gen_planar_yuv_read(struct wined3d_string_buffer *buffer, +static void gen_packed_yuv_read(struct wined3d_string_buffer *buffer, const struct arbfp_blit_type *type, char *luminance) { char chroma; @@ -7464,7 +7464,7 @@ static GLuint gen_yuv_shader(const struct wined3d_gl_info *gl_info, const struct { case COMPLEX_FIXUP_UYVY: case COMPLEX_FIXUP_YUY2: - gen_planar_yuv_read(&buffer, type, &luminance_component); + gen_packed_yuv_read(&buffer, type, &luminance_component); break; case COMPLEX_FIXUP_YV12: -- 2.11.0
6 years
1
0
0
0
[PATCH 1/5] wined3d: Add core context P8 blit support to the GLSL blitter.
by Henri Verbeet
We use GL_R8 for WINED3DFMT_P8_UINT in core contexts, since GL_ALPHA8 is not available. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/wined3d/glsl_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 64a2604ab7d..a9af9acd31f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -12318,8 +12318,9 @@ static void glsl_blitter_generate_p8_shader(struct wined3d_string_buffer *buffer shader_addline(buffer, "uniform sampler1D sampler_palette;\n"); shader_addline(buffer, "\nvoid main()\n{\n"); /* The alpha-component contains the palette index. */ - shader_addline(buffer, " float index = texture%s(sampler, out_texcoord.%s).w;\n", - needs_legacy_glsl_syntax(gl_info) ? tex_type : "", swizzle); + shader_addline(buffer, " float index = texture%s(sampler, out_texcoord.%s).%c;\n", + needs_legacy_glsl_syntax(gl_info) ? tex_type : "", swizzle, + gl_info->supported[WINED3D_GL_LEGACY_CONTEXT] ? 'w' : 'x'); /* Scale the index by 255/256 and add a bias of 0.5 in order to sample in * the middle. */ shader_addline(buffer, " index = (index * 255.0 + 0.5) / 256.0;\n"); -- 2.11.0
6 years
1
0
0
0
[PATCH 1/2] d3d11: Add ID3D11Device1 stub.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d3d11/async.c | 14 +-- dlls/d3d11/buffer.c | 14 +-- dlls/d3d11/d3d11_private.h | 48 +++---- dlls/d3d11/device.c | 250 +++++++++++++++++++++++-------------- dlls/d3d11/inputlayout.c | 12 +- dlls/d3d11/shader.c | 84 ++++++------- dlls/d3d11/state.c | 56 ++++----- dlls/d3d11/tests/d3d11.c | 12 +- dlls/d3d11/texture.c | 40 +++--- dlls/d3d11/view.c | 52 ++++---- 10 files changed, 327 insertions(+), 255 deletions(-) diff --git a/dlls/d3d11/async.c b/dlls/d3d11/async.c index 41238aca3c..fd0936c7ec 100644 --- a/dlls/d3d11/async.c +++ b/dlls/d3d11/async.c @@ -74,7 +74,7 @@ static ULONG STDMETHODCALLTYPE d3d11_query_AddRef(ID3D11Query *iface) if (refcount == 1) { - ID3D11Device_AddRef(query->device); + ID3D11Device1_AddRef(query->device); wined3d_mutex_lock(); wined3d_query_incref(query->wined3d_query); wined3d_mutex_unlock(); @@ -92,13 +92,13 @@ static ULONG STDMETHODCALLTYPE d3d11_query_Release(ID3D11Query *iface) if (!refcount) { - ID3D11Device *device = query->device; + ID3D11Device1 *device = query->device; wined3d_mutex_lock(); wined3d_query_decref(query->wined3d_query); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -110,7 +110,7 @@ static void STDMETHODCALLTYPE d3d11_query_GetDevice(ID3D11Query *iface, ID3D11De TRACE("iface %p, device %p.\n", iface, device); - *device = query->device; + *device = (ID3D11Device *)query->device; ID3D11Device_AddRef(*device); } @@ -254,7 +254,7 @@ static void STDMETHODCALLTYPE d3d10_query_GetDevice(ID3D10Query *iface, ID3D10De TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(query->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(query->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_query_GetPrivateData(ID3D10Query *iface, @@ -470,8 +470,8 @@ static HRESULT d3d_query_init(struct d3d_query *query, struct d3d_device *device wined3d_mutex_unlock(); query->predicate = predicate; - query->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(query->device); + query->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(query->device); return S_OK; } diff --git a/dlls/d3d11/buffer.c b/dlls/d3d11/buffer.c index 09778e20ad..7511b4536e 100644 --- a/dlls/d3d11/buffer.c +++ b/dlls/d3d11/buffer.c @@ -71,7 +71,7 @@ static ULONG STDMETHODCALLTYPE d3d11_buffer_AddRef(ID3D11Buffer *iface) if (refcount == 1) { - ID3D11Device_AddRef(buffer->device); + ID3D11Device1_AddRef(buffer->device); wined3d_mutex_lock(); wined3d_buffer_incref(buffer->wined3d_buffer); wined3d_mutex_unlock(); @@ -89,14 +89,14 @@ static ULONG STDMETHODCALLTYPE d3d11_buffer_Release(ID3D11Buffer *iface) if (!refcount) { - ID3D11Device *device = buffer->device; + ID3D11Device1 *device = buffer->device; wined3d_mutex_lock(); wined3d_buffer_decref(buffer->wined3d_buffer); wined3d_mutex_unlock(); /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -108,7 +108,7 @@ static void STDMETHODCALLTYPE d3d11_buffer_GetDevice(ID3D11Buffer *iface, ID3D11 TRACE("iface %p, device %p.\n", iface, device); - *device = buffer->device; + *device = (ID3D11Device *)buffer->device; ID3D11Device_AddRef(*device); } @@ -242,7 +242,7 @@ static void STDMETHODCALLTYPE d3d10_buffer_GetDevice(ID3D10Buffer *iface, ID3D10 TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(buffer->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(buffer->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_buffer_GetPrivateData(ID3D10Buffer *iface, @@ -470,8 +470,8 @@ static HRESULT d3d_buffer_init(struct d3d_buffer *buffer, struct d3d_device *dev } wined3d_mutex_unlock(); - buffer->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(buffer->device); + buffer->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(buffer->device); return S_OK; } diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 94e9e39fb3..299319b0d3 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -125,7 +125,7 @@ struct d3d_texture1d IUnknown *dxgi_surface; struct wined3d_texture *wined3d_texture; D3D11_TEXTURE1D_DESC desc; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_texture1d_create(struct d3d_device *device, const D3D11_TEXTURE1D_DESC *desc, @@ -144,7 +144,7 @@ struct d3d_texture2d IUnknown *dxgi_surface; struct wined3d_texture *wined3d_texture; D3D11_TEXTURE2D_DESC desc; - ID3D11Device *device; + ID3D11Device1 *device; }; static inline struct d3d_texture2d *impl_from_ID3D11Texture2D(ID3D11Texture2D *iface) @@ -167,7 +167,7 @@ struct d3d_texture3d struct wined3d_private_store private_store; struct wined3d_texture *wined3d_texture; D3D11_TEXTURE3D_DESC desc; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_texture3d_create(struct d3d_device *device, const D3D11_TEXTURE3D_DESC *desc, @@ -185,7 +185,7 @@ struct d3d_buffer struct wined3d_private_store private_store; struct wined3d_buffer *wined3d_buffer; D3D11_BUFFER_DESC desc; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_buffer_create(struct d3d_device *device, const D3D11_BUFFER_DESC *desc, @@ -204,7 +204,7 @@ struct d3d_depthstencil_view struct wined3d_rendertarget_view *wined3d_view; D3D11_DEPTH_STENCIL_VIEW_DESC desc; ID3D11Resource *resource; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_depthstencil_view_create(struct d3d_device *device, ID3D11Resource *resource, @@ -223,7 +223,7 @@ struct d3d_rendertarget_view struct wined3d_rendertarget_view *wined3d_view; D3D11_RENDER_TARGET_VIEW_DESC desc; ID3D11Resource *resource; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_rendertarget_view_create(struct d3d_device *device, ID3D11Resource *resource, @@ -242,7 +242,7 @@ struct d3d_shader_resource_view struct wined3d_shader_resource_view *wined3d_view; D3D11_SHADER_RESOURCE_VIEW_DESC desc; ID3D11Resource *resource; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_shader_resource_view_create(struct d3d_device *device, ID3D11Resource *resource, @@ -262,7 +262,7 @@ struct d3d11_unordered_access_view struct wined3d_unordered_access_view *wined3d_view; D3D11_UNORDERED_ACCESS_VIEW_DESC desc; ID3D11Resource *resource; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d11_unordered_access_view_create(struct d3d_device *device, ID3D11Resource *resource, @@ -279,7 +279,7 @@ struct d3d_input_layout struct wined3d_private_store private_store; struct wined3d_vertex_declaration *wined3d_decl; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_input_layout_create(struct d3d_device *device, @@ -298,7 +298,7 @@ struct d3d_vertex_shader struct wined3d_private_store private_store; struct wined3d_shader *wined3d_shader; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_vertex_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, @@ -314,7 +314,7 @@ struct d3d11_hull_shader struct wined3d_private_store private_store; struct wined3d_shader *wined3d_shader; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d11_hull_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, @@ -329,7 +329,7 @@ struct d3d11_domain_shader struct wined3d_private_store private_store; struct wined3d_shader *wined3d_shader; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d11_domain_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, @@ -345,7 +345,7 @@ struct d3d_geometry_shader struct wined3d_private_store private_store; struct wined3d_shader *wined3d_shader; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_geometry_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, @@ -364,7 +364,7 @@ struct d3d_pixel_shader struct wined3d_private_store private_store; struct wined3d_shader *wined3d_shader; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_pixel_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, @@ -380,7 +380,7 @@ struct d3d11_compute_shader struct wined3d_private_store private_store; struct wined3d_shader *wined3d_shader; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d11_compute_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, @@ -400,7 +400,7 @@ struct d3d11_class_linkage LONG refcount; struct wined3d_private_store private_store; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d11_class_linkage_create(struct d3d_device *device, @@ -417,7 +417,7 @@ struct d3d_blend_state struct wined3d_blend_state *wined3d_state; D3D11_BLEND_DESC desc; struct wine_rb_entry entry; - ID3D11Device *device; + ID3D11Device1 *device; }; static inline struct d3d_blend_state *impl_from_ID3D11BlendState(ID3D11BlendState *iface) @@ -440,7 +440,7 @@ struct d3d_depthstencil_state struct wined3d_private_store private_store; D3D11_DEPTH_STENCIL_DESC desc; struct wine_rb_entry entry; - ID3D11Device *device; + ID3D11Device1 *device; }; static inline struct d3d_depthstencil_state *impl_from_ID3D11DepthStencilState(ID3D11DepthStencilState *iface) @@ -466,7 +466,7 @@ struct d3d_rasterizer_state struct wined3d_rasterizer_state *wined3d_state; D3D11_RASTERIZER_DESC desc; struct wine_rb_entry entry; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_rasterizer_state_create(struct d3d_device *device, const D3D11_RASTERIZER_DESC *desc, @@ -485,7 +485,7 @@ struct d3d_sampler_state struct wined3d_sampler *wined3d_sampler; D3D11_SAMPLER_DESC desc; struct wine_rb_entry entry; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_sampler_state_create(struct d3d_device *device, const D3D11_SAMPLER_DESC *desc, @@ -504,7 +504,7 @@ struct d3d_query struct wined3d_query *wined3d_query; BOOL predicate; D3D11_QUERY_DESC desc; - ID3D11Device *device; + ID3D11Device1 *device; }; HRESULT d3d_query_create(struct d3d_device *device, const D3D11_QUERY_DESC *desc, BOOL predicate, @@ -526,7 +526,7 @@ struct d3d11_immediate_context struct d3d_device { IUnknown IUnknown_inner; - ID3D11Device ID3D11Device_iface; + ID3D11Device1 ID3D11Device1_iface; ID3D10Device1 ID3D10Device1_iface; ID3D10Multithread ID3D10Multithread_iface; IWineDXGIDeviceParent IWineDXGIDeviceParent_iface; @@ -550,9 +550,9 @@ struct d3d_device UINT stencil_ref; }; -static inline struct d3d_device *impl_from_ID3D11Device(ID3D11Device *iface) +static inline struct d3d_device *impl_from_ID3D11Device1(ID3D11Device1 *iface) { - return CONTAINING_RECORD(iface, struct d3d_device, ID3D11Device_iface); + return CONTAINING_RECORD(iface, struct d3d_device, ID3D11Device1_iface); } static inline struct d3d_device *impl_from_ID3D10Device(ID3D10Device1 *iface) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d3155d56bf..0b99222854 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -74,7 +74,7 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_AddRef(ID3D11DeviceContex if (refcount == 1) { - ID3D11Device_AddRef(&device->ID3D11Device_iface); + ID3D11Device1_AddRef(&device->ID3D11Device1_iface); } return refcount; @@ -90,7 +90,7 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceConte if (!refcount) { - ID3D11Device_Release(&device->ID3D11Device_iface); + ID3D11Device1_Release(&device->ID3D11Device1_iface); } return refcount; @@ -102,7 +102,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GetDevice(ID3D11DeviceCont TRACE("iface %p, device %p.\n", iface, device); - *device = &device_object->ID3D11Device_iface; + *device = (ID3D11Device *)&device_object->ID3D11Device1_iface; ID3D11Device_AddRef(*device); } @@ -2719,7 +2719,7 @@ static void d3d11_immediate_context_init(struct d3d11_immediate_context *context context->ID3D11DeviceContext_iface.lpVtbl = &d3d11_immediate_context_vtbl; context->refcount = 1; - ID3D11Device_AddRef(&device->ID3D11Device_iface); + ID3D11Device1_AddRef(&device->ID3D11Device1_iface); wined3d_private_store_init(&context->private_store); } @@ -2731,28 +2731,28 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont /* ID3D11Device methods */ -static HRESULT STDMETHODCALLTYPE d3d11_device_QueryInterface(ID3D11Device *iface, REFIID riid, void **out) +static HRESULT STDMETHODCALLTYPE d3d11_device_QueryInterface(ID3D11Device1 *iface, REFIID riid, void **out) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); return IUnknown_QueryInterface(device->outer_unk, riid, out); } -static ULONG STDMETHODCALLTYPE d3d11_device_AddRef(ID3D11Device *iface) +static ULONG STDMETHODCALLTYPE d3d11_device_AddRef(ID3D11Device1 *iface) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); return IUnknown_AddRef(device->outer_unk); } -static ULONG STDMETHODCALLTYPE d3d11_device_Release(ID3D11Device *iface) +static ULONG STDMETHODCALLTYPE d3d11_device_Release(ID3D11Device1 *iface) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); return IUnknown_Release(device->outer_unk); } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBuffer(ID3D11Device *iface, const D3D11_BUFFER_DESC *desc, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBuffer(ID3D11Device1 *iface, const D3D11_BUFFER_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Buffer **buffer) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_buffer *object; HRESULT hr; @@ -2766,10 +2766,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBuffer(ID3D11Device *iface, return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture1D(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture1D(ID3D11Device1 *iface, const D3D11_TEXTURE1D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture1D **texture) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_texture1d *object; HRESULT hr; @@ -2783,10 +2783,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture1D(ID3D11Device *ifac return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture2D(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture2D(ID3D11Device1 *iface, const D3D11_TEXTURE2D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture2D **texture) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_texture2d *object; HRESULT hr; @@ -2800,10 +2800,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture2D(ID3D11Device *ifac return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture3D(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture3D(ID3D11Device1 *iface, const D3D11_TEXTURE3D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture3D **texture) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_texture3d *object; HRESULT hr; @@ -2817,10 +2817,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture3D(ID3D11Device *ifac return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateShaderResourceView(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateShaderResourceView(ID3D11Device1 *iface, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11ShaderResourceView **view) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_shader_resource_view *object; HRESULT hr; @@ -2837,10 +2837,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateShaderResourceView(ID3D11Dev return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateUnorderedAccessView(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateUnorderedAccessView(ID3D11Device1 *iface, ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11UnorderedAccessView **view) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d11_unordered_access_view *object; HRESULT hr; @@ -2854,10 +2854,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateUnorderedAccessView(ID3D11De return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Device1 *iface, ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11RenderTargetView **view) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_rendertarget_view *object; HRESULT hr; @@ -2874,10 +2874,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Devic return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilView(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilView(ID3D11Device1 *iface, ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11DepthStencilView **view) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_depthstencil_view *object; HRESULT hr; @@ -2891,11 +2891,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilView(ID3D11Devic return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateInputLayout(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateInputLayout(ID3D11Device1 *iface, const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code, SIZE_T shader_byte_code_length, ID3D11InputLayout **input_layout) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_input_layout *object; HRESULT hr; @@ -2912,10 +2912,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateInputLayout(ID3D11Device *if return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device *iface, const void *byte_code, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11VertexShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_vertex_shader *object; HRESULT hr; @@ -2933,10 +2933,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device *i return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShader(ID3D11Device *iface, const void *byte_code, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShader(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_geometry_shader *object; HRESULT hr; @@ -2955,12 +2955,12 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShader(ID3D11Device return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShaderWithStreamOutput(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShaderWithStreamOutput(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, const D3D11_SO_DECLARATION_ENTRY *so_entries, UINT entry_count, const UINT *buffer_strides, UINT strides_count, UINT rasterizer_stream, ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_geometry_shader *object; HRESULT hr; @@ -2984,10 +2984,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShaderWithStreamOutp return hr; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePixelShader(ID3D11Device *iface, const void *byte_code, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePixelShader(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11PixelShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_pixel_shader *object; HRESULT hr; @@ -3005,10 +3005,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePixelShader(ID3D11Device *if return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateHullShader(ID3D11Device *iface, const void *byte_code, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateHullShader(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11HullShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d11_hull_shader *object; HRESULT hr; @@ -3026,10 +3026,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateHullShader(ID3D11Device *ifa return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDomainShader(ID3D11Device *iface, const void *byte_code, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDomainShader(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11DomainShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d11_domain_shader *object; HRESULT hr; @@ -3047,10 +3047,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDomainShader(ID3D11Device *i return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateComputeShader(ID3D11Device *iface, const void *byte_code, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateComputeShader(ID3D11Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11ComputeShader **shader) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d11_compute_shader *object; HRESULT hr; @@ -3068,10 +3068,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateComputeShader(ID3D11Device * return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateClassLinkage(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateClassLinkage(ID3D11Device1 *iface, ID3D11ClassLinkage **class_linkage) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d11_class_linkage *object; HRESULT hr; @@ -3085,10 +3085,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateClassLinkage(ID3D11Device *i return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState(ID3D11Device1 *iface, const D3D11_BLEND_DESC *desc, ID3D11BlendState **blend_state) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_blend_state *object; HRESULT hr; @@ -3102,10 +3102,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState(ID3D11Device *ifa return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilState(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilState(ID3D11Device1 *iface, const D3D11_DEPTH_STENCIL_DESC *desc, ID3D11DepthStencilState **depth_stencil_state) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_depthstencil_state *object; HRESULT hr; @@ -3119,10 +3119,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilState(ID3D11Devi return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRasterizerState(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRasterizerState(ID3D11Device1 *iface, const D3D11_RASTERIZER_DESC *desc, ID3D11RasterizerState **rasterizer_state) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_rasterizer_state *object; HRESULT hr; @@ -3136,10 +3136,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRasterizerState(ID3D11Device return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateSamplerState(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateSamplerState(ID3D11Device1 *iface, const D3D11_SAMPLER_DESC *desc, ID3D11SamplerState **sampler_state) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_sampler_state *object; HRESULT hr; @@ -3153,10 +3153,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateSamplerState(ID3D11Device *i return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateQuery(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateQuery(ID3D11Device1 *iface, const D3D11_QUERY_DESC *desc, ID3D11Query **query) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_query *object; HRESULT hr; @@ -3175,10 +3175,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateQuery(ID3D11Device *iface, return S_FALSE; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePredicate(ID3D11Device *iface, const D3D11_QUERY_DESC *desc, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePredicate(ID3D11Device1 *iface, const D3D11_QUERY_DESC *desc, ID3D11Predicate **predicate) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct d3d_query *object; HRESULT hr; @@ -3197,7 +3197,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePredicate(ID3D11Device *ifac return S_FALSE; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device *iface, const D3D11_COUNTER_DESC *desc, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device1 *iface, const D3D11_COUNTER_DESC *desc, ID3D11Counter **counter) { FIXME("iface %p, desc %p, counter %p stub!\n", iface, desc, counter); @@ -3205,7 +3205,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device *iface, return E_NOTIMPL; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device *iface, UINT flags, +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device1 *iface, UINT flags, ID3D11DeviceContext **context) { FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context); @@ -3213,7 +3213,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device return E_NOTIMPL; } -static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device *iface, HANDLE resource, REFIID riid, +static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device1 *iface, HANDLE resource, REFIID riid, void **out) { FIXME("iface %p, resource %p, riid %s, out %p stub!\n", iface, resource, debugstr_guid(riid), out); @@ -3221,10 +3221,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device *i return E_NOTIMPL; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device *iface, DXGI_FORMAT format, +static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device1 *iface, DXGI_FORMAT format, UINT *format_support) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct wined3d_device_creation_parameters params; enum wined3d_format_id wined3d_format; struct wined3d *wined3d; @@ -3280,10 +3280,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device *i return S_OK; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels(ID3D11Device *iface, +static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels(ID3D11Device1 *iface, DXGI_FORMAT format, UINT sample_count, UINT *quality_level_count) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); struct wined3d_device_creation_parameters params; struct wined3d *wined3d; HRESULT hr; @@ -3320,12 +3320,12 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels(ID3D return hr; } -static void STDMETHODCALLTYPE d3d11_device_CheckCounterInfo(ID3D11Device *iface, D3D11_COUNTER_INFO *info) +static void STDMETHODCALLTYPE d3d11_device_CheckCounterInfo(ID3D11Device1 *iface, D3D11_COUNTER_INFO *info) { FIXME("iface %p, info %p stub!\n", iface, info); } -static HRESULT STDMETHODCALLTYPE d3d11_device_CheckCounter(ID3D11Device *iface, const D3D11_COUNTER_DESC *desc, +static HRESULT STDMETHODCALLTYPE d3d11_device_CheckCounter(ID3D11Device1 *iface, const D3D11_COUNTER_DESC *desc, D3D11_COUNTER_TYPE *type, UINT *active_counter_count, char *name, UINT *name_length, char *units, UINT *units_length, char *description, UINT *description_length) { @@ -3337,10 +3337,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckCounter(ID3D11Device *iface, return E_NOTIMPL; } -static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device *iface, D3D11_FEATURE feature, +static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device1 *iface, D3D11_FEATURE feature, void *feature_support_data, UINT feature_support_data_size) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); WINED3DCAPS wined3d_caps; HRESULT hr; @@ -3451,7 +3451,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device * } } -static HRESULT STDMETHODCALLTYPE d3d11_device_GetPrivateData(ID3D11Device *iface, REFGUID guid, +static HRESULT STDMETHODCALLTYPE d3d11_device_GetPrivateData(ID3D11Device1 *iface, REFGUID guid, UINT *data_size, void *data) { IDXGIDevice *dxgi_device; @@ -3459,7 +3459,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_GetPrivateData(ID3D11Device *iface TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data); - if (FAILED(hr = ID3D11Device_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device))) + if (FAILED(hr = ID3D11Device1_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device))) return hr; hr = IDXGIDevice_GetPrivateData(dxgi_device, guid, data_size, data); IDXGIDevice_Release(dxgi_device); @@ -3467,7 +3467,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_GetPrivateData(ID3D11Device *iface return hr; } -static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateData(ID3D11Device *iface, REFGUID guid, +static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateData(ID3D11Device1 *iface, REFGUID guid, UINT data_size, const void *data) { IDXGIDevice *dxgi_device; @@ -3475,7 +3475,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateData(ID3D11Device *iface TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data); - if (FAILED(hr = ID3D11Device_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device))) + if (FAILED(hr = ID3D11Device1_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device))) return hr; hr = IDXGIDevice_SetPrivateData(dxgi_device, guid, data_size, data); IDXGIDevice_Release(dxgi_device); @@ -3483,7 +3483,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateData(ID3D11Device *iface return hr; } -static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateDataInterface(ID3D11Device *iface, REFGUID guid, +static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateDataInterface(ID3D11Device1 *iface, REFGUID guid, const IUnknown *data) { IDXGIDevice *dxgi_device; @@ -3491,7 +3491,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateDataInterface(ID3D11Devi TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data); - if (FAILED(hr = ID3D11Device_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device))) + if (FAILED(hr = ID3D11Device1_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device))) return hr; hr = IDXGIDevice_SetPrivateDataInterface(dxgi_device, guid, data); IDXGIDevice_Release(dxgi_device); @@ -3499,33 +3499,33 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateDataInterface(ID3D11Devi return hr; } -static D3D_FEATURE_LEVEL STDMETHODCALLTYPE d3d11_device_GetFeatureLevel(ID3D11Device *iface) +static D3D_FEATURE_LEVEL STDMETHODCALLTYPE d3d11_device_GetFeatureLevel(ID3D11Device1 *iface) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); TRACE("iface %p.\n", iface); return device->feature_level; } -static UINT STDMETHODCALLTYPE d3d11_device_GetCreationFlags(ID3D11Device *iface) +static UINT STDMETHODCALLTYPE d3d11_device_GetCreationFlags(ID3D11Device1 *iface) { FIXME("iface %p stub!\n", iface); return 0; } -static HRESULT STDMETHODCALLTYPE d3d11_device_GetDeviceRemovedReason(ID3D11Device *iface) +static HRESULT STDMETHODCALLTYPE d3d11_device_GetDeviceRemovedReason(ID3D11Device1 *iface) { WARN("iface %p stub!\n", iface); return S_OK; } -static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext(ID3D11Device *iface, +static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext(ID3D11Device1 *iface, ID3D11DeviceContext **immediate_context) { - struct d3d_device *device = impl_from_ID3D11Device(iface); + struct d3d_device *device = impl_from_ID3D11Device1(iface); TRACE("iface %p, immediate_context %p.\n", iface, immediate_context); @@ -3533,21 +3533,78 @@ static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext(ID3D11Device *ifa ID3D11DeviceContext_AddRef(*immediate_context); } -static HRESULT STDMETHODCALLTYPE d3d11_device_SetExceptionMode(ID3D11Device *iface, UINT flags) +static HRESULT STDMETHODCALLTYPE d3d11_device_SetExceptionMode(ID3D11Device1 *iface, UINT flags) { FIXME("iface %p, flags %#x stub!\n", iface, flags); return E_NOTIMPL; } -static UINT STDMETHODCALLTYPE d3d11_device_GetExceptionMode(ID3D11Device *iface) +static UINT STDMETHODCALLTYPE d3d11_device_GetExceptionMode(ID3D11Device1 *iface) { FIXME("iface %p stub!\n", iface); return 0; } -static const struct ID3D11DeviceVtbl d3d11_device_vtbl = +static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device1 *iface, ID3D11DeviceContext1 **context) +{ + FIXME("iface %p, context %p stub!\n", iface, context); +} + +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext1(ID3D11Device1 *iface, UINT flags, + ID3D11DeviceContext1 **context) +{ + FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState1(ID3D11Device1 *iface, + const D3D11_BLEND_DESC1 *desc, ID3D11BlendState1 **state) +{ + FIXME("iface %p, desc %p, state %p stub!\n", iface, desc, state); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRasterizerState1(ID3D11Device1 *iface, + const D3D11_RASTERIZER_DESC1 *desc, ID3D11RasterizerState1 **state) +{ + FIXME("iface %p, desc %p, state %p stub!\n", iface, desc, state); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeviceContextState(ID3D11Device1 *iface, UINT flags, + const D3D_FEATURE_LEVEL *feature_levels, UINT feature_levels_count, UINT sdk_version, + REFIID emulated_interface, D3D_FEATURE_LEVEL *chosen_feature_level, ID3DDeviceContextState **state) +{ + FIXME("iface %p, flags %#x, feature_levels %p, feature_level_count %u, sdk_version %u, " + "emulated_interface %s, chosen_feature_level %p, state %p stub!\n", iface, flags, feature_levels, + feature_levels_count, sdk_version, debugstr_guid(emulated_interface), chosen_feature_level, state); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource1(ID3D11Device1 *iface, HANDLE handle, + REFIID riid, void **resource) +{ + FIXME("iface %p, handle %p, riid %s, resource %p stub!\n", iface, handle, debugstr_guid(riid), resource); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResourceByName(ID3D11Device1 *iface, const WCHAR *name, + DWORD access, REFIID riid, void **resource) +{ + FIXME("iface %p, name %s, access %#x, riid %s, resource %p stub!\n", iface, debugstr_w(name), access, + debugstr_guid(riid), resource); + + return E_NOTIMPL; +} + +static const struct ID3D11Device1Vtbl d3d11_device_vtbl = { /* IUnknown methods */ d3d11_device_QueryInterface, @@ -3594,6 +3651,14 @@ static const struct ID3D11DeviceVtbl d3d11_device_vtbl = d3d11_device_GetImmediateContext, d3d11_device_SetExceptionMode, d3d11_device_GetExceptionMode, + /* ID3D11Device1 methods */ + d3d11_device_GetImmediateContext1, + d3d11_device_CreateDeferredContext1, + d3d11_device_CreateBlendState1, + d3d11_device_CreateRasterizerState1, + d3d11_device_CreateDeviceContextState, + d3d11_device_OpenSharedResource1, + d3d11_device_OpenSharedResourceByName, }; /* Inner IUnknown methods */ @@ -3609,10 +3674,11 @@ static HRESULT STDMETHODCALLTYPE d3d_device_inner_QueryInterface(IUnknown *iface TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out); - if (IsEqualGUID(riid, &IID_ID3D11Device) + if (IsEqualGUID(riid, &IID_ID3D11Device1) + || IsEqualGUID(riid, &IID_ID3D11Device) || IsEqualGUID(riid, &IID_IUnknown)) { - *out = &device->ID3D11Device_iface; + *out = &device->ID3D11Device1_iface; } else if (IsEqualGUID(riid, &IID_ID3D10Device1) || IsEqualGUID(riid, &IID_ID3D10Device)) @@ -4984,7 +5050,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_GetPrivateData(ID3D10Device1 *ifac TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data); - return d3d11_device_GetPrivateData(&device->ID3D11Device_iface, guid, data_size, data); + return d3d11_device_GetPrivateData(&device->ID3D11Device1_iface, guid, data_size, data); } static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateData(ID3D10Device1 *iface, @@ -4994,7 +5060,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateData(ID3D10Device1 *ifac TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data); - return d3d11_device_SetPrivateData(&device->ID3D11Device_iface, guid, data_size, data); + return d3d11_device_SetPrivateData(&device->ID3D11Device1_iface, guid, data_size, data); } static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateDataInterface(ID3D10Device1 *iface, @@ -5004,7 +5070,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateDataInterface(ID3D10Devi TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data); - return d3d11_device_SetPrivateDataInterface(&device->ID3D11Device_iface, guid, data); + return d3d11_device_SetPrivateDataInterface(&device->ID3D11Device1_iface, guid, data); } static void STDMETHODCALLTYPE d3d10_device_ClearState(ID3D10Device1 *iface) @@ -5542,7 +5608,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device1 * TRACE("iface %p, format %s, format_support %p.\n", iface, debug_dxgi_format(format), format_support); - return d3d11_device_CheckFormatSupport(&device->ID3D11Device_iface, format, format_support); + return d3d11_device_CheckFormatSupport(&device->ID3D11Device1_iface, format, format_support); } static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device1 *iface, @@ -5553,7 +5619,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D TRACE("iface %p, format %s, sample_count %u, quality_level_count %p.\n", iface, debug_dxgi_format(format), sample_count, quality_level_count); - return d3d11_device_CheckMultisampleQualityLevels(&device->ID3D11Device_iface, format, + return d3d11_device_CheckMultisampleQualityLevels(&device->ID3D11Device1_iface, format, sample_count, quality_level_count); } @@ -5915,7 +5981,7 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic if (texture_flags) FIXME("Unhandled flags %#x.\n", texture_flags); - if (FAILED(hr = d3d11_device_CreateTexture2D(&device->ID3D11Device_iface, + if (FAILED(hr = d3d11_device_CreateTexture2D(&device->ID3D11Device1_iface, &desc, NULL, &texture_iface))) { WARN("Failed to create 2D texture, hr %#x.\n", hr); @@ -5940,7 +6006,7 @@ static HRESULT CDECL device_parent_create_swapchain(struct wined3d_device_parent TRACE("device_parent %p, desc %p, swapchain %p.\n", device_parent, desc, swapchain); - if (FAILED(hr = d3d11_device_QueryInterface(&device->ID3D11Device_iface, + if (FAILED(hr = d3d11_device_QueryInterface(&device->ID3D11Device1_iface, &IID_IWineDXGIDevice, (void **)&wine_device))) { ERR("Device should implement IWineDXGIDevice.\n"); @@ -6004,7 +6070,7 @@ static int d3d_rasterizer_state_compare(const void *key, const struct wine_rb_en void d3d_device_init(struct d3d_device *device, void *outer_unknown) { device->IUnknown_inner.lpVtbl = &d3d_device_inner_unknown_vtbl; - device->ID3D11Device_iface.lpVtbl = &d3d11_device_vtbl; + device->ID3D11Device1_iface.lpVtbl = &d3d11_device_vtbl; device->ID3D10Device1_iface.lpVtbl = &d3d10_device1_vtbl; device->ID3D10Multithread_iface.lpVtbl = &d3d10_multithread_vtbl; device->IWineDXGIDeviceParent_iface.lpVtbl = &d3d_dxgi_device_parent_vtbl; diff --git a/dlls/d3d11/inputlayout.c b/dlls/d3d11/inputlayout.c index ef1d2e687d..7b2d9b457d 100644 --- a/dlls/d3d11/inputlayout.c +++ b/dlls/d3d11/inputlayout.c @@ -134,7 +134,7 @@ static ULONG STDMETHODCALLTYPE d3d11_input_layout_AddRef(ID3D11InputLayout *ifac if (refcount == 1) { - ID3D11Device_AddRef(layout->device); + ID3D11Device1_AddRef(layout->device); wined3d_mutex_lock(); wined3d_vertex_declaration_incref(layout->wined3d_decl); wined3d_mutex_unlock(); @@ -152,13 +152,13 @@ static ULONG STDMETHODCALLTYPE d3d11_input_layout_Release(ID3D11InputLayout *ifa if (!refcount) { - ID3D11Device *device = layout->device; + ID3D11Device1 *device = layout->device; wined3d_mutex_lock(); wined3d_vertex_declaration_decref(layout->wined3d_decl); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -171,7 +171,7 @@ static void STDMETHODCALLTYPE d3d11_input_layout_GetDevice(ID3D11InputLayout *if TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_AddRef(*device = layout->device); + ID3D11Device_AddRef(*device = (ID3D11Device *)layout->device); } static HRESULT STDMETHODCALLTYPE d3d11_input_layout_GetPrivateData(ID3D11InputLayout *iface, @@ -262,7 +262,7 @@ static void STDMETHODCALLTYPE d3d10_input_layout_GetDevice(ID3D10InputLayout *if TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(layout->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(layout->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_input_layout_GetPrivateData(ID3D10InputLayout *iface, @@ -357,7 +357,7 @@ static HRESULT d3d_input_layout_init(struct d3d_input_layout *layout, struct d3d } wined3d_mutex_unlock(); - ID3D11Device_AddRef(layout->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(layout->device = &device->ID3D11Device1_iface); return S_OK; } diff --git a/dlls/d3d11/shader.c b/dlls/d3d11/shader.c index b15bd5cd64..de0607d2d4 100644 --- a/dlls/d3d11/shader.c +++ b/dlls/d3d11/shader.c @@ -330,7 +330,7 @@ static ULONG STDMETHODCALLTYPE d3d11_vertex_shader_AddRef(ID3D11VertexShader *if if (refcount == 1) { - ID3D11Device_AddRef(shader->device); + ID3D11Device1_AddRef(shader->device); wined3d_mutex_lock(); wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); @@ -348,14 +348,14 @@ static ULONG STDMETHODCALLTYPE d3d11_vertex_shader_Release(ID3D11VertexShader *i if (!refcount) { - ID3D11Device *device = shader->device; + ID3D11Device1 *device = shader->device; wined3d_mutex_lock(); wined3d_shader_decref(shader->wined3d_shader); wined3d_mutex_unlock(); /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -368,7 +368,7 @@ static void STDMETHODCALLTYPE d3d11_vertex_shader_GetDevice(ID3D11VertexShader * TRACE("iface %p, device %p.\n", iface, device); - *device = shader->device; + *device = (ID3D11Device *)shader->device; ID3D11Device_AddRef(*device); } @@ -460,7 +460,7 @@ static void STDMETHODCALLTYPE d3d10_vertex_shader_GetDevice(ID3D10VertexShader * TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(shader->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(shader->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_GetPrivateData(ID3D10VertexShader *iface, @@ -575,8 +575,8 @@ static HRESULT d3d_vertex_shader_init(struct d3d_vertex_shader *shader, struct d } wined3d_mutex_unlock(); - shader->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(shader->device); + shader->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(shader->device); return S_OK; } @@ -657,7 +657,7 @@ static ULONG STDMETHODCALLTYPE d3d11_hull_shader_AddRef(ID3D11HullShader *iface) if (refcount == 1) { - ID3D11Device_AddRef(shader->device); + ID3D11Device1_AddRef(shader->device); wined3d_mutex_lock(); wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); @@ -675,7 +675,7 @@ static ULONG STDMETHODCALLTYPE d3d11_hull_shader_Release(ID3D11HullShader *iface if (!refcount) { - ID3D11Device *device = shader->device; + ID3D11Device1 *device = shader->device; wined3d_mutex_lock(); wined3d_shader_decref(shader->wined3d_shader); @@ -683,7 +683,7 @@ static ULONG STDMETHODCALLTYPE d3d11_hull_shader_Release(ID3D11HullShader *iface /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -696,7 +696,7 @@ static void STDMETHODCALLTYPE d3d11_hull_shader_GetDevice(ID3D11HullShader *ifac TRACE("iface %p, device %p.\n", iface, device); - *device = shader->device; + *device = (ID3D11Device *)shader->device; ID3D11Device_AddRef(*device); } @@ -788,8 +788,8 @@ static HRESULT d3d11_hull_shader_init(struct d3d11_hull_shader *shader, struct d } wined3d_mutex_unlock(); - shader->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(shader->device); + shader->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(shader->device); return S_OK; } @@ -860,7 +860,7 @@ static ULONG STDMETHODCALLTYPE d3d11_domain_shader_AddRef(ID3D11DomainShader *if if (refcount == 1) { - ID3D11Device_AddRef(shader->device); + ID3D11Device1_AddRef(shader->device); wined3d_mutex_lock(); wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); @@ -878,7 +878,7 @@ static ULONG STDMETHODCALLTYPE d3d11_domain_shader_Release(ID3D11DomainShader *i if (!refcount) { - ID3D11Device *device = shader->device; + ID3D11Device1 *device = shader->device; wined3d_mutex_lock(); wined3d_shader_decref(shader->wined3d_shader); @@ -886,7 +886,7 @@ static ULONG STDMETHODCALLTYPE d3d11_domain_shader_Release(ID3D11DomainShader *i /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -899,7 +899,7 @@ static void STDMETHODCALLTYPE d3d11_domain_shader_GetDevice(ID3D11DomainShader * TRACE("iface %p, device %p.\n", iface, device); - *device = shader->device; + *device = (ID3D11Device *)shader->device; ID3D11Device_AddRef(*device); } @@ -991,8 +991,8 @@ static HRESULT d3d11_domain_shader_init(struct d3d11_domain_shader *shader, stru } wined3d_mutex_unlock(); - shader->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(shader->device); + shader->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(shader->device); return S_OK; } @@ -1073,7 +1073,7 @@ static ULONG STDMETHODCALLTYPE d3d11_geometry_shader_AddRef(ID3D11GeometryShader if (refcount == 1) { - ID3D11Device_AddRef(shader->device); + ID3D11Device1_AddRef(shader->device); wined3d_mutex_lock(); wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); @@ -1091,7 +1091,7 @@ static ULONG STDMETHODCALLTYPE d3d11_geometry_shader_Release(ID3D11GeometryShade if (!refcount) { - ID3D11Device *device = shader->device; + ID3D11Device1 *device = shader->device; wined3d_mutex_lock(); wined3d_shader_decref(shader->wined3d_shader); @@ -1099,7 +1099,7 @@ static ULONG STDMETHODCALLTYPE d3d11_geometry_shader_Release(ID3D11GeometryShade /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1112,7 +1112,7 @@ static void STDMETHODCALLTYPE d3d11_geometry_shader_GetDevice(ID3D11GeometryShad TRACE("iface %p, device %p.\n", iface, device); - *device = shader->device; + *device = (ID3D11Device *)shader->device; ID3D11Device_AddRef(*device); } @@ -1204,7 +1204,7 @@ static void STDMETHODCALLTYPE d3d10_geometry_shader_GetDevice(ID3D10GeometryShad TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(shader->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(shader->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_GetPrivateData(ID3D10GeometryShader *iface, @@ -1530,8 +1530,8 @@ static HRESULT d3d_geometry_shader_init(struct d3d_geometry_shader *shader, } wined3d_mutex_unlock(); - shader->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(shader->device); + shader->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(shader->device); return S_OK; } @@ -1625,7 +1625,7 @@ static ULONG STDMETHODCALLTYPE d3d11_pixel_shader_AddRef(ID3D11PixelShader *ifac if (refcount == 1) { - ID3D11Device_AddRef(shader->device); + ID3D11Device1_AddRef(shader->device); wined3d_mutex_lock(); wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); @@ -1643,14 +1643,14 @@ static ULONG STDMETHODCALLTYPE d3d11_pixel_shader_Release(ID3D11PixelShader *ifa if (!refcount) { - ID3D11Device *device = shader->device; + ID3D11Device1 *device = shader->device; wined3d_mutex_lock(); wined3d_shader_decref(shader->wined3d_shader); wined3d_mutex_unlock(); /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1663,7 +1663,7 @@ static void STDMETHODCALLTYPE d3d11_pixel_shader_GetDevice(ID3D11PixelShader *if TRACE("iface %p, device %p.\n", iface, device); - *device = shader->device; + *device = (ID3D11Device *)shader->device; ID3D11Device_AddRef(*device); } @@ -1755,7 +1755,7 @@ static void STDMETHODCALLTYPE d3d10_pixel_shader_GetDevice(ID3D10PixelShader *if TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(shader->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(shader->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_GetPrivateData(ID3D10PixelShader *iface, @@ -1849,8 +1849,8 @@ static HRESULT d3d_pixel_shader_init(struct d3d_pixel_shader *shader, struct d3d } wined3d_mutex_unlock(); - shader->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(shader->device); + shader->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(shader->device); return S_OK; } @@ -1930,7 +1930,7 @@ static ULONG STDMETHODCALLTYPE d3d11_compute_shader_AddRef(ID3D11ComputeShader * if (refcount == 1) { - ID3D11Device_AddRef(shader->device); + ID3D11Device1_AddRef(shader->device); wined3d_mutex_lock(); wined3d_shader_incref(shader->wined3d_shader); wined3d_mutex_unlock(); @@ -1948,7 +1948,7 @@ static ULONG STDMETHODCALLTYPE d3d11_compute_shader_Release(ID3D11ComputeShader if (!refcount) { - ID3D11Device *device = shader->device; + ID3D11Device1 *device = shader->device; wined3d_mutex_lock(); wined3d_shader_decref(shader->wined3d_shader); @@ -1956,7 +1956,7 @@ static ULONG STDMETHODCALLTYPE d3d11_compute_shader_Release(ID3D11ComputeShader /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1969,7 +1969,7 @@ static void STDMETHODCALLTYPE d3d11_compute_shader_GetDevice(ID3D11ComputeShader TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_AddRef(*device = shader->device); + ID3D11Device_AddRef(*device = (ID3D11Device *)shader->device); } static HRESULT STDMETHODCALLTYPE d3d11_compute_shader_GetPrivateData(ID3D11ComputeShader *iface, @@ -2060,7 +2060,7 @@ static HRESULT d3d11_compute_shader_init(struct d3d11_compute_shader *shader, st } wined3d_mutex_unlock(); - ID3D11Device_AddRef(shader->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(shader->device = &device->ID3D11Device1_iface); return S_OK; } @@ -2140,12 +2140,12 @@ static ULONG STDMETHODCALLTYPE d3d11_class_linkage_Release(ID3D11ClassLinkage *i if (!refcount) { - ID3D11Device *device = class_linkage->device; + ID3D11Device1 *device = class_linkage->device; wined3d_private_store_cleanup(&class_linkage->private_store); heap_free(class_linkage); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -2158,7 +2158,7 @@ static void STDMETHODCALLTYPE d3d11_class_linkage_GetDevice(ID3D11ClassLinkage * TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_AddRef(*device = class_linkage->device); + ID3D11Device_AddRef(*device = (ID3D11Device *)class_linkage->device); } static HRESULT STDMETHODCALLTYPE d3d11_class_linkage_GetPrivateData(ID3D11ClassLinkage *iface, @@ -2239,7 +2239,7 @@ HRESULT d3d11_class_linkage_create(struct d3d_device *device, struct d3d11_class object->refcount = 1; wined3d_private_store_init(&object->private_store); - ID3D11Device_AddRef(object->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(object->device = &device->ID3D11Device1_iface); TRACE("Created class linkage %p.\n", object); *class_linkage = object; diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index a14c9d3cb4..29c6fa1beb 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -66,7 +66,7 @@ static ULONG STDMETHODCALLTYPE d3d11_blend_state_AddRef(ID3D11BlendState *iface) if (refcount == 1) { - ID3D11Device_AddRef(state->device); + ID3D11Device1_AddRef(state->device); wined3d_mutex_lock(); wined3d_blend_state_incref(state->wined3d_state); wined3d_mutex_unlock(); @@ -84,13 +84,13 @@ static ULONG STDMETHODCALLTYPE d3d11_blend_state_Release(ID3D11BlendState *iface if (!refcount) { - ID3D11Device *device = state->device; + ID3D11Device1 *device = state->device; wined3d_mutex_lock(); wined3d_blend_state_decref(state->wined3d_state); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -103,7 +103,7 @@ static void STDMETHODCALLTYPE d3d11_blend_state_GetDevice(ID3D11BlendState *ifac TRACE("iface %p, device %p.\n", iface, device); - *device = state->device; + *device = (ID3D11Device *)state->device; ID3D11Device_AddRef(*device); } @@ -206,7 +206,7 @@ static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice(ID3D10BlendState1 *ifa TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData(ID3D10BlendState1 *iface, @@ -294,7 +294,7 @@ static const struct ID3D10BlendState1Vtbl d3d10_blend_state_vtbl = static void STDMETHODCALLTYPE d3d_blend_state_wined3d_object_destroyed(void *parent) { struct d3d_blend_state *state = parent; - struct d3d_device *device = impl_from_ID3D11Device(state->device); + struct d3d_device *device = impl_from_ID3D11Device1(state->device); wine_rb_remove(&device->blend_states, &state->entry); wined3d_private_store_cleanup(&state->private_store); @@ -395,7 +395,7 @@ HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC } wined3d_mutex_unlock(); - ID3D11Device_AddRef(object->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(object->device = &device->ID3D11Device1_iface); TRACE("Created blend state %p.\n", object); *state = object; @@ -466,7 +466,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_AddRef(ID3D11DepthStenci static void d3d_depthstencil_state_cleanup(struct d3d_depthstencil_state *state) { wined3d_private_store_cleanup(&state->private_store); - ID3D11Device_Release(state->device); + ID3D11Device1_Release(state->device); } static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_Release(ID3D11DepthStencilState *iface) @@ -478,7 +478,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_Release(ID3D11DepthStenc if (!refcount) { - struct d3d_device *device = impl_from_ID3D11Device(state->device); + struct d3d_device *device = impl_from_ID3D11Device1(state->device); wined3d_mutex_lock(); wine_rb_remove(&device->depthstencil_states, &state->entry); d3d_depthstencil_state_cleanup(state); @@ -496,7 +496,7 @@ static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDevice(ID3D11DepthSten TRACE("iface %p, device %p.\n", iface, device); - *device = state->device; + *device = (ID3D11Device *)state->device; ID3D11Device_AddRef(*device); } @@ -600,7 +600,7 @@ static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice(ID3D10DepthSten TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10DepthStencilState *iface, @@ -671,8 +671,8 @@ static HRESULT d3d_depthstencil_state_init(struct d3d_depthstencil_state *state, wined3d_private_store_init(&state->private_store); state->desc = *desc; - state->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(state->device); + state->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(state->device); return S_OK; } @@ -831,7 +831,7 @@ static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_AddRef(ID3D11RasterizerSta if (refcount == 1) { - ID3D11Device_AddRef(state->device); + ID3D11Device1_AddRef(state->device); wined3d_mutex_lock(); wined3d_rasterizer_state_incref(state->wined3d_state); wined3d_mutex_unlock(); @@ -849,13 +849,13 @@ static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_Release(ID3D11RasterizerSt if (!refcount) { - ID3D11Device *device = state->device; + ID3D11Device1 *device = state->device; wined3d_mutex_lock(); wined3d_rasterizer_state_decref(state->wined3d_state); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -868,7 +868,7 @@ static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDevice(ID3D11RasterizerS TRACE("iface %p, device %p.\n", iface, device); - *device = state->device; + *device = (ID3D11Device *)state->device; ID3D11Device_AddRef(*device); } @@ -972,7 +972,7 @@ static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice(ID3D10RasterizerS TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData(ID3D10RasterizerState *iface, @@ -1037,7 +1037,7 @@ static const struct ID3D10RasterizerStateVtbl d3d10_rasterizer_state_vtbl = static void STDMETHODCALLTYPE d3d_rasterizer_state_wined3d_object_destroyed(void *parent) { struct d3d_rasterizer_state *state = parent; - struct d3d_device *device = impl_from_ID3D11Device(state->device); + struct d3d_device *device = impl_from_ID3D11Device1(state->device); wine_rb_remove(&device->rasterizer_states, &state->entry); wined3d_private_store_cleanup(&state->private_store); @@ -1081,7 +1081,7 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str return hr; } - ID3D11Device_AddRef(state->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(state->device = &device->ID3D11Device1_iface); return S_OK; } @@ -1194,7 +1194,7 @@ static ULONG STDMETHODCALLTYPE d3d11_sampler_state_AddRef(ID3D11SamplerState *if if (refcount == 1) { - ID3D11Device_AddRef(state->device); + ID3D11Device1_AddRef(state->device); wined3d_mutex_lock(); wined3d_sampler_incref(state->wined3d_sampler); wined3d_mutex_unlock(); @@ -1212,13 +1212,13 @@ static ULONG STDMETHODCALLTYPE d3d11_sampler_state_Release(ID3D11SamplerState *i if (!refcount) { - ID3D11Device *device = state->device; + ID3D11Device1 *device = state->device; wined3d_mutex_lock(); wined3d_sampler_decref(state->wined3d_sampler); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1231,7 +1231,7 @@ static void STDMETHODCALLTYPE d3d11_sampler_state_GetDevice(ID3D11SamplerState * TRACE("iface %p, device %p.\n", iface, device); - *device = state->device; + *device = (ID3D11Device *)state->device; ID3D11Device_AddRef(*device); } @@ -1335,7 +1335,7 @@ static void STDMETHODCALLTYPE d3d10_sampler_state_GetDevice(ID3D10SamplerState * TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(state->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_GetPrivateData(ID3D10SamplerState *iface, @@ -1400,7 +1400,7 @@ static const struct ID3D10SamplerStateVtbl d3d10_sampler_state_vtbl = static void STDMETHODCALLTYPE d3d_sampler_wined3d_object_destroyed(void *parent) { struct d3d_sampler_state *state = parent; - struct d3d_device *device = impl_from_ID3D11Device(state->device); + struct d3d_device *device = impl_from_ID3D11Device1(state->device); wine_rb_remove(&device->sampler_states, &state->entry); wined3d_private_store_cleanup(&state->private_store); @@ -1494,8 +1494,8 @@ static HRESULT d3d_sampler_state_init(struct d3d_sampler_state *state, struct d3 return hr; } - state->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(state->device); + state->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(state->device); return S_OK; } diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 8ca6634626..8feba4ffb4 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -5927,9 +5927,9 @@ static void test_device_context_state(void) { ID3DDeviceContextState *context_state, *previous_context_state; ID3D11SamplerState *sampler, *tmp_sampler; + ID3D11DeviceContext1 *context = NULL; D3D11_SAMPLER_DESC sampler_desc; D3D_FEATURE_LEVEL feature_level; - ID3D11DeviceContext1 *context; ID3D11Device *d3d11_device; ID3D11Device1 *device; ULONG refcount; @@ -5949,11 +5949,17 @@ static void test_device_context_state(void) return; } - check_interface(device, &IID_ID3D10Device, FALSE, FALSE); - check_interface(device, &IID_ID3D10Device1, FALSE, FALSE); + todo_wine check_interface(device, &IID_ID3D10Device, FALSE, FALSE); + todo_wine check_interface(device, &IID_ID3D10Device1, FALSE, FALSE); feature_level = ID3D11Device1_GetFeatureLevel(device); ID3D11Device1_GetImmediateContext1(device, &context); + todo_wine ok(!!context, "Failed to get immediate context.\n"); + if (!context) + { + ID3D11Device1_Release(device); + return; + } sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP; diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index 0730dbc8c6..2c460b408d 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -78,7 +78,7 @@ static ULONG STDMETHODCALLTYPE d3d11_texture1d_AddRef(ID3D11Texture1D *iface) if (refcount == 1) { - ID3D11Device_AddRef(texture->device); + ID3D11Device1_AddRef(texture->device); wined3d_mutex_lock(); wined3d_texture_incref(texture->wined3d_texture); wined3d_mutex_unlock(); @@ -96,14 +96,14 @@ static ULONG STDMETHODCALLTYPE d3d11_texture1d_Release(ID3D11Texture1D *iface) if (!refcount) { - ID3D11Device *device = texture->device; + ID3D11Device1 *device = texture->device; wined3d_mutex_lock(); wined3d_texture_decref(texture->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -115,7 +115,7 @@ static void STDMETHODCALLTYPE d3d11_texture1d_GetDevice(ID3D11Texture1D *iface, TRACE("iface %p, device %p.\n", iface, device); - *device = texture->device; + *device = (ID3D11Device *)texture->device; ID3D11Device_AddRef(*device); } @@ -287,7 +287,7 @@ static void STDMETHODCALLTYPE d3d10_texture1d_GetDevice(ID3D10Texture1D *iface, TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(texture->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(texture->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_texture1d_GetPrivateData(ID3D10Texture1D *iface, @@ -510,8 +510,8 @@ HRESULT d3d_texture1d_create(struct d3d_device *device, const D3D11_TEXTURE1D_DE } wined3d_mutex_unlock(); - texture->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(texture->device); + texture->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(texture->device); TRACE("Created texture %p.\n", texture); *out = texture; @@ -566,7 +566,7 @@ static ULONG STDMETHODCALLTYPE d3d11_texture2d_AddRef(ID3D11Texture2D *iface) if (refcount == 1) { - ID3D11Device_AddRef(texture->device); + ID3D11Device1_AddRef(texture->device); wined3d_mutex_lock(); wined3d_texture_incref(texture->wined3d_texture); wined3d_mutex_unlock(); @@ -584,14 +584,14 @@ static ULONG STDMETHODCALLTYPE d3d11_texture2d_Release(ID3D11Texture2D *iface) if (!refcount) { - ID3D11Device *device = texture->device; + ID3D11Device1 *device = texture->device; wined3d_mutex_lock(); wined3d_texture_decref(texture->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -603,7 +603,7 @@ static void STDMETHODCALLTYPE d3d11_texture2d_GetDevice(ID3D11Texture2D *iface, TRACE("iface %p, device %p.\n", iface, device); - *device = texture->device; + *device = (ID3D11Device *)texture->device; ID3D11Device_AddRef(*device); } @@ -789,7 +789,7 @@ static void STDMETHODCALLTYPE d3d10_texture2d_GetDevice(ID3D10Texture2D *iface, TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(texture->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(texture->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_texture2d_GetPrivateData(ID3D10Texture2D *iface, @@ -1066,7 +1066,7 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE } wined3d_mutex_unlock(); - ID3D11Device_AddRef(texture->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(texture->device = &device->ID3D11Device1_iface); TRACE("Created texture %p.\n", texture); *out = texture; @@ -1120,7 +1120,7 @@ static ULONG STDMETHODCALLTYPE d3d11_texture3d_AddRef(ID3D11Texture3D *iface) if (refcount == 1) { - ID3D11Device_AddRef(texture->device); + ID3D11Device1_AddRef(texture->device); wined3d_mutex_lock(); wined3d_texture_incref(texture->wined3d_texture); wined3d_mutex_unlock(); @@ -1146,14 +1146,14 @@ static ULONG STDMETHODCALLTYPE d3d11_texture3d_Release(ID3D11Texture3D *iface) if (!refcount) { - ID3D11Device *device = texture->device; + ID3D11Device1 *device = texture->device; wined3d_mutex_lock(); wined3d_texture_decref(texture->wined3d_texture); wined3d_mutex_unlock(); /* Release the device last, it may cause the wined3d device to be * destroyed. */ - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1165,7 +1165,7 @@ static void STDMETHODCALLTYPE d3d11_texture3d_GetDevice(ID3D11Texture3D *iface, TRACE("iface %p, device %p.\n", iface, device); - *device = texture->device; + *device = (ID3D11Device *)texture->device; ID3D11Device_AddRef(*device); } @@ -1287,7 +1287,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_GetDevice(ID3D10Texture3D *iface, TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(texture->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(texture->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_texture3d_GetPrivateData(ID3D10Texture3D *iface, @@ -1495,8 +1495,8 @@ static HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_devi wined3d_mutex_unlock(); texture->desc.MipLevels = levels; - texture->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(texture->device); + texture->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(texture->device); return S_OK; } diff --git a/dlls/d3d11/view.c b/dlls/d3d11/view.c index 2787c08ce0..5b3f1d02d0 100644 --- a/dlls/d3d11/view.c +++ b/dlls/d3d11/view.c @@ -1006,7 +1006,7 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_AddRef(ID3D11DepthStencil if (refcount == 1) { - ID3D11Device_AddRef(view->device); + ID3D11Device1_AddRef(view->device); wined3d_mutex_lock(); wined3d_rendertarget_view_incref(view->wined3d_view); wined3d_mutex_unlock(); @@ -1024,13 +1024,13 @@ static ULONG STDMETHODCALLTYPE d3d11_depthstencil_view_Release(ID3D11DepthStenci if (!refcount) { - ID3D11Device *device = view->device; + ID3D11Device1 *device = view->device; wined3d_mutex_lock(); wined3d_rendertarget_view_decref(view->wined3d_view); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1043,7 +1043,7 @@ static void STDMETHODCALLTYPE d3d11_depthstencil_view_GetDevice(ID3D11DepthStenc TRACE("iface %p, device %p.\n", iface, device); - *device = view->device; + *device = (ID3D11Device *)view->device; ID3D11Device_AddRef(*device); } @@ -1160,7 +1160,7 @@ static void STDMETHODCALLTYPE d3d10_depthstencil_view_GetDevice(ID3D10DepthStenc TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(view->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(view->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_view_GetPrivateData(ID3D10DepthStencilView *iface, @@ -1355,8 +1355,8 @@ static HRESULT d3d_depthstencil_view_init(struct d3d_depthstencil_view *view, st wined3d_private_store_init(&view->private_store); wined3d_mutex_unlock(); view->resource = resource; - view->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(view->device); + view->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(view->device); return S_OK; } @@ -1449,7 +1449,7 @@ static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_AddRef(ID3D11RenderTarget if (refcount == 1) { - ID3D11Device_AddRef(view->device); + ID3D11Device1_AddRef(view->device); wined3d_mutex_lock(); wined3d_rendertarget_view_incref(view->wined3d_view); wined3d_mutex_unlock(); @@ -1467,13 +1467,13 @@ static ULONG STDMETHODCALLTYPE d3d11_rendertarget_view_Release(ID3D11RenderTarge if (!refcount) { - ID3D11Device *device = view->device; + ID3D11Device1 *device = view->device; wined3d_mutex_lock(); wined3d_rendertarget_view_decref(view->wined3d_view); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1486,7 +1486,7 @@ static void STDMETHODCALLTYPE d3d11_rendertarget_view_GetDevice(ID3D11RenderTarg TRACE("iface %p, device %p.\n", iface, device); - *device = view->device; + *device = (ID3D11Device *)view->device; ID3D11Device_AddRef(*device); } @@ -1603,7 +1603,7 @@ static void STDMETHODCALLTYPE d3d10_rendertarget_view_GetDevice(ID3D10RenderTarg TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(view->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(view->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_rendertarget_view_GetPrivateData(ID3D10RenderTargetView *iface, @@ -1803,8 +1803,8 @@ static HRESULT d3d_rendertarget_view_init(struct d3d_rendertarget_view *view, st wined3d_private_store_init(&view->private_store); wined3d_mutex_unlock(); view->resource = resource; - view->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(view->device); + view->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(view->device); return S_OK; } @@ -1898,7 +1898,7 @@ static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_AddRef(ID3D11ShaderRes if (refcount == 1) { - ID3D11Device_AddRef(view->device); + ID3D11Device1_AddRef(view->device); wined3d_mutex_lock(); wined3d_shader_resource_view_incref(view->wined3d_view); wined3d_mutex_unlock(); @@ -1916,13 +1916,13 @@ static ULONG STDMETHODCALLTYPE d3d11_shader_resource_view_Release(ID3D11ShaderRe if (!refcount) { - ID3D11Device *device = view->device; + ID3D11Device1 *device = view->device; wined3d_mutex_lock(); wined3d_shader_resource_view_decref(view->wined3d_view); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -1935,7 +1935,7 @@ static void STDMETHODCALLTYPE d3d11_shader_resource_view_GetDevice(ID3D11ShaderR TRACE("iface %p, device %p.\n", iface, device); - *device = view->device; + *device = (ID3D11Device *)view->device; ID3D11Device_AddRef(*device); } @@ -2053,7 +2053,7 @@ static void STDMETHODCALLTYPE d3d10_shader_resource_view_GetDevice(ID3D10ShaderR TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_QueryInterface(view->device, &IID_ID3D10Device, (void **)device); + ID3D11Device1_QueryInterface(view->device, &IID_ID3D10Device, (void **)device); } static HRESULT STDMETHODCALLTYPE d3d10_shader_resource_view_GetPrivateData(ID3D10ShaderResourceView1 *iface, @@ -2304,8 +2304,8 @@ static HRESULT d3d_shader_resource_view_init(struct d3d_shader_resource_view *vi wined3d_private_store_init(&view->private_store); wined3d_mutex_unlock(); view->resource = resource; - view->device = &device->ID3D11Device_iface; - ID3D11Device_AddRef(view->device); + view->device = &device->ID3D11Device1_iface; + ID3D11Device1_AddRef(view->device); return S_OK; } @@ -2384,7 +2384,7 @@ static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_AddRef(ID3D11Unordere if (refcount == 1) { - ID3D11Device_AddRef(view->device); + ID3D11Device1_AddRef(view->device); wined3d_mutex_lock(); wined3d_unordered_access_view_incref(view->wined3d_view); wined3d_mutex_unlock(); @@ -2402,13 +2402,13 @@ static ULONG STDMETHODCALLTYPE d3d11_unordered_access_view_Release(ID3D11Unorder if (!refcount) { - ID3D11Device *device = view->device; + ID3D11Device1 *device = view->device; wined3d_mutex_lock(); wined3d_unordered_access_view_decref(view->wined3d_view); wined3d_mutex_unlock(); - ID3D11Device_Release(device); + ID3D11Device1_Release(device); } return refcount; @@ -2421,7 +2421,7 @@ static void STDMETHODCALLTYPE d3d11_unordered_access_view_GetDevice(ID3D11Unorde TRACE("iface %p, device %p.\n", iface, device); - ID3D11Device_AddRef(*device = view->device); + ID3D11Device_AddRef(*device = (ID3D11Device *)view->device); } static HRESULT STDMETHODCALLTYPE d3d11_unordered_access_view_GetPrivateData(ID3D11UnorderedAccessView *iface, @@ -2614,7 +2614,7 @@ static HRESULT d3d11_unordered_access_view_init(struct d3d11_unordered_access_vi wined3d_private_store_init(&view->private_store); wined3d_mutex_unlock(); view->resource = resource; - ID3D11Device_AddRef(view->device = &device->ID3D11Device_iface); + ID3D11Device1_AddRef(view->device = &device->ID3D11Device1_iface); return S_OK; } -- 2.17.0
6 years
2
3
0
0
[PATCH 1/2 resend] d3d11: Handle D3D11_FEATURE_ARCHITECTURE_INFO in d3d11_device_CheckFeatureSupport.
by Pablo Martin
Some applications will not start if they find this query not available. Tested on Ubuntu 17.10. Signed-off-by: Pablo Martin <pmart-wine(a)riseup.net> --- dlls/d3d11/device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d3155d56bf..02dff99452 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3445,6 +3445,18 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device * return S_OK; } + case D3D11_FEATURE_ARCHITECTURE_INFO: + { + D3D11_FEATURE_DATA_ARCHITECTURE_INFO *options = feature_support_data; + if (feature_support_data_size != sizeof(*options)) + { + WARN("Invalid data size.\n"); + return E_INVALIDARG; + } + options->TileBasedDeferredRenderer = FALSE; + return S_OK; + } + default: FIXME("Unhandled feature %#x.\n", feature); return E_NOTIMPL; -- 2.14.1
6 years
1
1
0
0
[PATCH] comctl32/toolbar: Fix tooltip notification forwarding.
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/comctl32/tests/toolbar.c | 3 +- dlls/comctl32/toolbar.c | 59 +++++++++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 8 deletions(-) diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c index ce5eab3cc8..5fd6133e1f 100644 --- a/dlls/comctl32/tests/toolbar.c +++ b/dlls/comctl32/tests/toolbar.c @@ -56,7 +56,6 @@ static BOOL g_ResetDispTextPtr; static const struct message ttgetdispinfo_parent_seq[] = { { WM_NOTIFY, sent|id, 0, 0, TBN_GETINFOTIPA }, - /* next line is todo, currently TTN_GETDISPINFOW is raised here */ { WM_NOTIFY, sent|id, 0, 0, TTN_GETDISPINFOA }, { 0 } }; @@ -2026,7 +2025,7 @@ static void test_tooltip(void) flush_sequences(sequences, NUM_MSG_SEQUENCES); SendMessageA(hToolbar, WM_NOTIFY, 0, (LPARAM)&nmtti); ok_sequence(sequences, PARENT_SEQ_INDEX, ttgetdispinfo_parent_seq, - "dispinfo from tooltip", TRUE); + "dispinfo from tooltip", FALSE); g_ResetDispTextPtr = TRUE; SendMessageA(hToolbar, WM_NOTIFY, 0, (LPARAM)&nmtti); diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index cc708f0642..e1cb7b7169 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -6118,6 +6118,9 @@ TOOLBAR_NCPaint (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnmtdi) { int index = TOOLBAR_GetButtonIndex(infoPtr, lpnmtdi->hdr.idFrom, FALSE); + NMTTDISPINFOA nmtdi; + unsigned int len; + LRESULT ret; TRACE("button index = %d\n", index); @@ -6131,7 +6134,6 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm { WCHAR wszBuffer[INFOTIPSIZE+1]; NMTBGETINFOTIPW tbgit; - unsigned int len; /* in chars */ wszBuffer[0] = '\0'; wszBuffer[INFOTIPSIZE] = '\0'; @@ -6169,7 +6171,6 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm { CHAR szBuffer[INFOTIPSIZE+1]; NMTBGETINFOTIPA tbgit; - unsigned int len; /* in chars */ szBuffer[0] = '\0'; szBuffer[INFOTIPSIZE] = '\0'; @@ -6210,7 +6211,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm !(infoPtr->buttons[index].fsStyle & BTNS_SHOWTEXT)) { LPWSTR pszText = TOOLBAR_GetText(infoPtr, &infoPtr->buttons[index]); - unsigned int len = pszText ? strlenW(pszText) : 0; + len = pszText ? strlenW(pszText) : 0; TRACE("using button hidden text %s\n", debugstr_w(pszText)); @@ -6236,9 +6237,55 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm TRACE("Sending tooltip notification to %p\n", infoPtr->hwndNotify); - /* last resort: send notification on to app */ - /* FIXME: find out what is really used here */ - return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmtdi->hdr.idFrom, (LPARAM)lpnmtdi); + /* Last resort, forward TTN_GETDISPINFO to the app: + + - NFR_UNICODE gets TTN_GETDISPINFOW, and TTN_GETDISPINFOA if -W returned no text; + - NFR_ANSI gets only TTN_GETDISPINFOA. + */ + if (infoPtr->bUnicode) + { + ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, lpnmtdi->hdr.idFrom, (LPARAM)lpnmtdi); + + TRACE("TTN_GETDISPINFOW - got string %s\n", debugstr_w(lpnmtdi->lpszText)); + + if (lpnmtdi->lpszText && *lpnmtdi->lpszText) + return ret; + } + + nmtdi.hdr.hwndFrom = lpnmtdi->hdr.hwndFrom; + nmtdi.hdr.idFrom = lpnmtdi->hdr.idFrom; + nmtdi.hdr.code = TTN_GETDISPINFOA; + nmtdi.lpszText = nmtdi.szText; + nmtdi.szText[0] = 0; + nmtdi.hinst = lpnmtdi->hinst; + nmtdi.uFlags = lpnmtdi->uFlags; + nmtdi.lParam = lpnmtdi->lParam; + + ret = SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, nmtdi.hdr.idFrom, (LPARAM)&nmtdi); + + TRACE("TTN_GETDISPINFOA - got string %s\n", debugstr_a(nmtdi.lpszText)); + + if (!nmtdi.lpszText || !*nmtdi.lpszText) + return ret; + + len = MultiByteToWideChar(CP_ACP, 0, nmtdi.lpszText, -1, NULL, 0); + if (len > ARRAY_SIZE(lpnmtdi->szText)) + { + infoPtr->pszTooltipText = Alloc(len * sizeof(WCHAR)); + if (infoPtr->pszTooltipText) + { + MultiByteToWideChar(CP_ACP, 0, nmtdi.lpszText, -1, infoPtr->pszTooltipText, len); + lpnmtdi->lpszText = infoPtr->pszTooltipText; + return 0; + } + } + else + { + MultiByteToWideChar(CP_ACP, 0, nmtdi.lpszText, -1, lpnmtdi->lpszText, ARRAY_SIZE(nmtdi.szText)); + return 0; + } + + return ret; } -- 2.17.0
6 years
1
0
0
0
[PATCH 2/2] wininet: Add support for INTERNET_OPTION_SETTINGS_CHANGED in InternetSetOption.
by Alistair Leslie-Hughes
From: Michael Müller <michael(a)fds-team.de> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/wininet/internet.c | 3 +++ dlls/wininet/tests/internet.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index c3838e0..a53a8c5 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -2940,6 +2940,9 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption, case INTERNET_OPTION_SETTINGS_CHANGED: FIXME("INTERNET_OPTION_SETTINGS_CHANGED; STUB\n"); break; + case INTERNET_OPTION_REFRESH: + FIXME("INTERNET_OPTION_REFRESH; STUB\n"); + break; default: FIXME("Option %d STUB\n",dwOption); SetLastError(ERROR_INTERNET_INVALID_OPTION); diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index d9cb720..a6498ce 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -1171,6 +1171,14 @@ static void test_InternetSetOption(void) ret = InternetSetOptionA(ses, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0); ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + ret = InternetSetOptionA(ses, INTERNET_OPTION_REFRESH, NULL, 0); + ok(ret == TRUE, "InternetSetOption should've succeeded\n"); + + SetLastError(0xdeadbeef); + ret = InternetSetOptionA(req, INTERNET_OPTION_REFRESH, NULL, 0); + todo_wine ok(ret == FALSE, "InternetSetOption should've failed\n"); + todo_wine ok(GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE, "GetLastError() = %x\n", GetLastError()); + ret = InternetCloseHandle(req); ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError()); ret = InternetCloseHandle(con); -- 1.9.1
6 years
2
1
0
0
← Newer
1
2
3
4
5
6
...
54
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
Results per page:
10
25
50
100
200