winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1163 discussions
Start a n
N
ew thread
Rémi Bernon : widl: Only register activatable WinRT runtimeclass.
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 7f9143143ffd2f2a52dcfe39bbe3e6c4ae200bb5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7f9143143ffd2f2a52dcfe39…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Mar 17 13:07:02 2021 +0100 widl: Only register activatable WinRT runtimeclass. Or with a static factory, as Windows.Input.Gamepad for instance. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windows.media.speech/tests/statics.c | 3 +-- tools/widl/register.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/windows.media.speech/tests/statics.c b/dlls/windows.media.speech/tests/statics.c index 8454729f9c3..9faa49dfc5d 100644 --- a/dlls/windows.media.speech/tests/statics.c +++ b/dlls/windows.media.speech/tests/statics.c @@ -136,8 +136,7 @@ static void test_VoiceInformation(void) ok(SUCCEEDED(hr), "WindowsCreateString failed, hr %#x\n", hr); hr = pRoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory); - todo_wine ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr); - if (SUCCEEDED(hr)) IActivationFactory_Release(factory); + ok(hr == REGDB_E_CLASSNOTREG, "RoGetActivationFactory returned unexpected hr %#x\n", hr); pWindowsDeleteString(str); diff --git a/tools/widl/register.c b/tools/widl/register.c index 76bfc3c715c..e13d8451f9e 100644 --- a/tools/widl/register.c +++ b/tools/widl/register.c @@ -194,6 +194,7 @@ static void write_runtimeclasses_registry( const statement_list_t *stmts ) { if (stmt->type != STMT_TYPE) continue; if (type_get_type((type = stmt->u.type)) != TYPE_RUNTIMECLASS) continue; + if (!get_attrp(type->attrs, ATTR_ACTIVATABLE) && !get_attrp(type->attrs, ATTR_STATIC)) continue; put_str( indent, "ForceRemove %s\n", format_namespace( type->namespace, "", ".", type->name, NULL ) ); put_str( indent++, "{\n" ); put_str( indent, "val 'DllPath' = s '%%MODULE%%'\n" );
1
0
0
0
Zebediah Figura : d3d11: Use wined3d_device_context_set_sampler().
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: c057c76893c348c4c6b2c4c4f975810013c1aa2b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c057c76893c348c4c6b2c4c4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 16 19:06:10 2021 -0500 d3d11: Use wined3d_device_context_set_sampler(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/device.c | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index e045e8f7087..7dc6f441185 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -537,7 +537,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", @@ -548,7 +548,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11Device { struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - wined3d_device_set_ps_sampler(device->wined3d_device, start_slot + i, + wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); } wined3d_mutex_unlock(); @@ -799,7 +799,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", @@ -810,7 +810,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11Device { struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - wined3d_device_set_vs_sampler(device->wined3d_device, start_slot + i, + wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); } wined3d_mutex_unlock(); @@ -913,7 +913,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", @@ -924,7 +924,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11Device { struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - wined3d_device_set_gs_sampler(device->wined3d_device, start_slot + i, + wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); } wined3d_mutex_unlock(); @@ -1454,7 +1454,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", @@ -1465,7 +1465,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11Device { struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - wined3d_device_set_hs_sampler(device->wined3d_device, start_slot + i, + wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_HULL, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); } wined3d_mutex_unlock(); @@ -1522,7 +1522,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", @@ -1533,7 +1533,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11Device { struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - wined3d_device_set_ds_sampler(device->wined3d_device, start_slot + i, + wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); } wined3d_mutex_unlock(); @@ -1610,7 +1610,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", @@ -1621,7 +1621,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11Device { struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - wined3d_device_set_cs_sampler(device->wined3d_device, start_slot + i, + wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); } wined3d_mutex_unlock(); @@ -2599,15 +2599,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon TRACE("iface %p.\n", iface); wined3d_mutex_lock(); - for (i = 0; i < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; ++i) - { - wined3d_device_set_vs_sampler(device->wined3d_device, i, NULL); - wined3d_device_set_hs_sampler(device->wined3d_device, i, NULL); - wined3d_device_set_ds_sampler(device->wined3d_device, i, NULL); - wined3d_device_set_gs_sampler(device->wined3d_device, i, NULL); - wined3d_device_set_ps_sampler(device->wined3d_device, i, NULL); - wined3d_device_set_cs_sampler(device->wined3d_device, i, NULL); - } for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) { wined3d_device_context_set_shader(context->wined3d_context, i, NULL); @@ -2615,6 +2606,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon wined3d_device_context_set_constant_buffer(context->wined3d_context, i, j, NULL); for (j = 0; j < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; ++j) wined3d_device_context_set_shader_resource_view(context->wined3d_context, i, j, NULL); + for (j = 0; j < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; ++j) + wined3d_device_context_set_sampler(context->wined3d_context, i, j, NULL); } for (i = 0; i < D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; ++i) {
1
0
0
0
Zebediah Figura : wined3d: Introduce wined3d_device_context_set_sampler().
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 9a1d82a3c0a8ef662cde713806e9b7310eb41f9f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9a1d82a3c0a8ef662cde7138…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 16 19:06:09 2021 -0500 wined3d: Introduce wined3d_device_context_set_sampler(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 62 ++++++++++++++++++++++++----------------------- dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 ++ 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5612e4bd0ce..c4700d2dc65 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2230,6 +2230,32 @@ void CDECL wined3d_device_context_set_shader_resource_view(struct wined3d_device } } +void CDECL wined3d_device_context_set_sampler(struct wined3d_device_context *context, + enum wined3d_shader_type type, unsigned int idx, struct wined3d_sampler *sampler) +{ + struct wined3d_state *state = context->state; + struct wined3d_sampler *prev; + + TRACE("context %p, type %#x, idx %u, sampler %p.\n", context, type, idx, sampler); + + if (idx >= MAX_SAMPLER_OBJECTS) + { + WARN("Invalid sampler index %u.\n", idx); + return; + } + + prev = state->sampler[type][idx]; + if (sampler == prev) + return; + + if (sampler) + wined3d_sampler_incref(sampler); + state->sampler[type][idx] = sampler; + wined3d_device_context_emit_set_sampler(context, type, idx, sampler); + if (prev) + wined3d_sampler_decref(prev); +} + void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) { TRACE("device %p, shader %p.\n", device, shader); @@ -2294,35 +2320,11 @@ struct wined3d_shader_resource_view * CDECL wined3d_device_get_vs_resource_view( return wined3d_device_get_shader_resource_view(device, WINED3D_SHADER_TYPE_VERTEX, idx); } -static void wined3d_device_set_sampler(struct wined3d_device *device, - enum wined3d_shader_type type, UINT idx, struct wined3d_sampler *sampler) -{ - struct wined3d_state *state = device->cs->c.state; - struct wined3d_sampler *prev; - - if (idx >= MAX_SAMPLER_OBJECTS) - { - WARN("Invalid sampler index %u.\n", idx); - return; - } - - prev = state->sampler[type][idx]; - if (sampler == prev) - return; - - if (sampler) - wined3d_sampler_incref(sampler); - state->sampler[type][idx] = sampler; - wined3d_device_context_emit_set_sampler(&device->cs->c, type, idx, sampler); - if (prev) - wined3d_sampler_decref(prev); -} - void CDECL wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler) { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); - wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_VERTEX, idx, sampler); + wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_VERTEX, idx, sampler); } static struct wined3d_sampler *wined3d_device_get_sampler(const struct wined3d_device *device, @@ -2432,7 +2434,7 @@ void CDECL wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); - wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_PIXEL, idx, sampler); + wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_PIXEL, idx, sampler); } struct wined3d_sampler * CDECL wined3d_device_get_ps_sampler(const struct wined3d_device *device, UINT idx) @@ -2531,7 +2533,7 @@ void CDECL wined3d_device_set_hs_sampler(struct wined3d_device *device, { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); - wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_HULL, idx, sampler); + wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_HULL, idx, sampler); } struct wined3d_sampler * CDECL wined3d_device_get_hs_sampler(const struct wined3d_device *device, unsigned int idx) @@ -2576,7 +2578,7 @@ void CDECL wined3d_device_set_ds_sampler(struct wined3d_device *device, { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); - wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_DOMAIN, idx, sampler); + wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_DOMAIN, idx, sampler); } struct wined3d_sampler * CDECL wined3d_device_get_ds_sampler(const struct wined3d_device *device, unsigned int idx) @@ -2620,7 +2622,7 @@ void CDECL wined3d_device_set_gs_sampler(struct wined3d_device *device, UINT idx { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); - wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_GEOMETRY, idx, sampler); + wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_GEOMETRY, idx, sampler); } struct wined3d_sampler * CDECL wined3d_device_get_gs_sampler(const struct wined3d_device *device, UINT idx) @@ -2665,7 +2667,7 @@ void CDECL wined3d_device_set_cs_sampler(struct wined3d_device *device, { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); - wined3d_device_set_sampler(device, WINED3D_SHADER_TYPE_COMPUTE, idx, sampler); + wined3d_device_context_set_sampler(&device->cs->c, WINED3D_SHADER_TYPE_COMPUTE, idx, sampler); } struct wined3d_sampler * CDECL wined3d_device_get_cs_sampler(const struct wined3d_device *device, unsigned int idx) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 20cea2490ae..7c39295c256 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -170,6 +170,7 @@ @ cdecl wined3d_device_context_set_constant_buffer(ptr long long ptr) @ cdecl wined3d_device_context_set_depth_stencil_state(ptr ptr long) @ cdecl wined3d_device_context_set_rasterizer_state(ptr ptr) +@ cdecl wined3d_device_context_set_sampler(ptr long long ptr) @ cdecl wined3d_device_context_set_scissor_rects(ptr long ptr) @ cdecl wined3d_device_context_set_shader(ptr long ptr) @ cdecl wined3d_device_context_set_shader_resource_view(ptr long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index d4c97604e14..760e1ebcc80 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2556,6 +2556,8 @@ void __cdecl wined3d_device_context_set_depth_stencil_state(struct wined3d_devic struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref); void __cdecl wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state); +void __cdecl wined3d_device_context_set_sampler(struct wined3d_device_context *context, + enum wined3d_shader_type type, unsigned int idx, struct wined3d_sampler *sampler); void __cdecl wined3d_device_context_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects); void __cdecl wined3d_device_context_set_shader(struct wined3d_device_context *context,
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_sampler().
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 57770a47d5cbf422e9d817db6d118ae4d5326e42 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=57770a47d5cbf422e9d817db…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 16 19:06:08 2021 -0500 wined3d: Pass a wined3d_device_context to wined3d_cs_emit_set_sampler(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 8 ++++---- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 23360be76a9..8afa298b905 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1605,18 +1605,18 @@ static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data) device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING); } -void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, - UINT sampler_idx, struct wined3d_sampler *sampler) +void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int sampler_idx, struct wined3d_sampler *sampler) { struct wined3d_cs_set_sampler *op; - op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_SET_SAMPLER; op->type = type; op->sampler_idx = sampler_idx; op->sampler = sampler; - wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 512b995510a..5612e4bd0ce 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1903,7 +1903,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 wined3d_device_context_emit_set_constant_buffer(context, i, j, state->cb[i][j]); for (j = 0; j < MAX_SAMPLER_OBJECTS; ++j) { - wined3d_cs_emit_set_sampler(device->cs, i, j, state->sampler[i][j]); + wined3d_device_context_emit_set_sampler(context, i, j, state->sampler[i][j]); } for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j) { @@ -2313,7 +2313,7 @@ static void wined3d_device_set_sampler(struct wined3d_device *device, if (sampler) wined3d_sampler_incref(sampler); state->sampler[type][idx] = sampler; - wined3d_cs_emit_set_sampler(device->cs, type, idx, sampler); + wined3d_device_context_emit_set_sampler(&device->cs->c, type, idx, sampler); if (prev) wined3d_sampler_decref(prev); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d587f039569..19ef894021b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4770,8 +4770,6 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; -void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, - UINT sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, enum wined3d_sampler_state state, DWORD value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx, @@ -4821,6 +4819,8 @@ void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_c struct wined3d_depth_stencil_state *state, unsigned int stencil_ref) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type,
1
0
0
0
Zebediah Figura : d3d11: Use wined3d_device_context_set_shader_resource_view().
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 990acef53bc0802cf4fe8b3cf2f9faf89d73f1d7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=990acef53bc0802cf4fe8b3c…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 16 19:06:07 2021 -0500 d3d11: Use wined3d_device_context_set_shader_resource_view(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/device.c | 47 ++++++++++++++++++++--------------------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 941e61f4b5a..e045e8f7087 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -499,7 +499,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", @@ -510,8 +510,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D1 { struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); - wined3d_device_set_ps_resource_view(device->wined3d_device, start_slot + i, - view ? view->wined3d_view : NULL); + wined3d_device_context_set_shader_resource_view(context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, + start_slot + i, view ? view->wined3d_view : NULL); } wined3d_mutex_unlock(); } @@ -780,7 +780,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IASetPrimitiveTopology(ID3 static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views); @@ -790,8 +790,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D1 { struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); - wined3d_device_set_vs_resource_view(device->wined3d_device, start_slot + i, - view ? view->wined3d_view : NULL); + wined3d_device_context_set_shader_resource_view(context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, + start_slot + i, view ? view->wined3d_view : NULL); } wined3d_mutex_unlock(); } @@ -894,7 +894,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_SetPredication(ID3D11Devic static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views); @@ -904,8 +904,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D1 { struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); - wined3d_device_set_gs_resource_view(device->wined3d_device, start_slot + i, - view ? view->wined3d_view : NULL); + wined3d_device_context_set_shader_resource_view(context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, + start_slot + i, view ? view->wined3d_view : NULL); } wined3d_mutex_unlock(); } @@ -1416,7 +1416,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11D static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", @@ -1427,8 +1427,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D1 { struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); - wined3d_device_set_hs_resource_view(device->wined3d_device, start_slot + i, - view ? view->wined3d_view : NULL); + wined3d_device_context_set_shader_resource_view(context->wined3d_context, WINED3D_SHADER_TYPE_HULL, + start_slot + i, view ? view->wined3d_view : NULL); } wined3d_mutex_unlock(); } @@ -1484,7 +1484,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", @@ -1495,8 +1495,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShaderResources(ID3D1 { struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); - wined3d_device_set_ds_resource_view(device->wined3d_device, start_slot + i, - view ? view->wined3d_view : NULL); + wined3d_device_context_set_shader_resource_view(context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, + start_slot + i, view ? view->wined3d_view : NULL); } wined3d_mutex_unlock(); } @@ -1552,7 +1552,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface); unsigned int i; TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", @@ -1563,8 +1563,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShaderResources(ID3D1 { struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D11ShaderResourceView(views[i]); - wined3d_device_set_cs_resource_view(device->wined3d_device, start_slot + i, - view ? view->wined3d_view : NULL); + wined3d_device_context_set_shader_resource_view(context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, + start_slot + i, view ? view->wined3d_view : NULL); } wined3d_mutex_unlock(); } @@ -2608,20 +2608,13 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon wined3d_device_set_ps_sampler(device->wined3d_device, i, NULL); wined3d_device_set_cs_sampler(device->wined3d_device, i, NULL); } - for (i = 0; i < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; ++i) - { - wined3d_device_set_vs_resource_view(device->wined3d_device, i, NULL); - wined3d_device_set_hs_resource_view(device->wined3d_device, i, NULL); - wined3d_device_set_ds_resource_view(device->wined3d_device, i, NULL); - wined3d_device_set_gs_resource_view(device->wined3d_device, i, NULL); - wined3d_device_set_ps_resource_view(device->wined3d_device, i, NULL); - wined3d_device_set_cs_resource_view(device->wined3d_device, i, NULL); - } for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) { wined3d_device_context_set_shader(context->wined3d_context, i, NULL); for (j = 0; j < D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; ++j) wined3d_device_context_set_constant_buffer(context->wined3d_context, i, j, NULL); + for (j = 0; j < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; ++j) + wined3d_device_context_set_shader_resource_view(context->wined3d_context, i, j, NULL); } for (i = 0; i < D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; ++i) {
1
0
0
0
Zebediah Figura : wined3d: Introduce wined3d_device_context_set_shader_resource_view().
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: ee788e3e08ed28ea2f0e725977718ba0408f99e2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ee788e3e08ed28ea2f0e7259…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 16 19:06:06 2021 -0500 wined3d: Introduce wined3d_device_context_set_shader_resource_view(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 96 ++++++++++++++++++++++++----------------------- dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 2 + 3 files changed, 52 insertions(+), 47 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 08115cb0de2..512b995510a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2188,49 +2188,15 @@ void CDECL wined3d_device_context_set_scissor_rects(struct wined3d_device_contex wined3d_device_context_emit_set_scissor_rects(context, rect_count, rects); } -void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) -{ - TRACE("device %p, shader %p.\n", device, shader); - - return wined3d_device_context_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_VERTEX, shader); -} - -struct wined3d_shader * CDECL wined3d_device_get_vertex_shader(const struct wined3d_device *device) -{ - TRACE("device %p.\n", device); - - return device->cs->c.state->shader[WINED3D_SHADER_TYPE_VERTEX]; -} - -void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device, - enum wined3d_shader_type type, UINT idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, type %#x, idx %u, buffer %p.\n", device, type, idx, buffer); - - return wined3d_device_context_set_constant_buffer(&device->cs->c, type, idx, buffer); -} - -struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device, - enum wined3d_shader_type shader_type, unsigned int idx) -{ - TRACE("device %p, shader_type %#x, idx %u.\n", device, shader_type, idx); - - if (idx >= MAX_CONSTANT_BUFFERS) - { - WARN("Invalid constant buffer index %u.\n", idx); - return NULL; - } - - return device->cs->c.state->cb[shader_type][idx]; -} - -static void wined3d_device_set_shader_resource_view(struct wined3d_device *device, - enum wined3d_shader_type type, UINT idx, struct wined3d_shader_resource_view *view) +void CDECL wined3d_device_context_set_shader_resource_view(struct wined3d_device_context *context, + enum wined3d_shader_type type, unsigned int idx, struct wined3d_shader_resource_view *view) { + struct wined3d_state *state = context->state; const struct wined3d_rendertarget_view *dsv; - struct wined3d_state *state = device->cs->c.state; struct wined3d_shader_resource_view *prev; + TRACE("context %p, type %#x, idx %u, view %p.\n", context, type, idx, view); + if (idx >= MAX_SHADER_RESOURCE_VIEWS) { WARN("Invalid view index %u.\n", idx); @@ -2256,7 +2222,7 @@ static void wined3d_device_set_shader_resource_view(struct wined3d_device *devic } state->shader_resource_view[type][idx] = view; - wined3d_device_context_emit_set_shader_resource_view(&device->cs->c, type, idx, view); + wined3d_device_context_emit_set_shader_resource_view(context, type, idx, view); if (prev) { wined3d_srv_bind_count_dec(prev); @@ -2264,12 +2230,48 @@ static void wined3d_device_set_shader_resource_view(struct wined3d_device *devic } } +void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader) +{ + TRACE("device %p, shader %p.\n", device, shader); + + return wined3d_device_context_set_shader(&device->cs->c, WINED3D_SHADER_TYPE_VERTEX, shader); +} + +struct wined3d_shader * CDECL wined3d_device_get_vertex_shader(const struct wined3d_device *device) +{ + TRACE("device %p.\n", device); + + return device->cs->c.state->shader[WINED3D_SHADER_TYPE_VERTEX]; +} + +void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device, + enum wined3d_shader_type type, UINT idx, struct wined3d_buffer *buffer) +{ + TRACE("device %p, type %#x, idx %u, buffer %p.\n", device, type, idx, buffer); + + return wined3d_device_context_set_constant_buffer(&device->cs->c, type, idx, buffer); +} + +struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device, + enum wined3d_shader_type shader_type, unsigned int idx) +{ + TRACE("device %p, shader_type %#x, idx %u.\n", device, shader_type, idx); + + if (idx >= MAX_CONSTANT_BUFFERS) + { + WARN("Invalid constant buffer index %u.\n", idx); + return NULL; + } + + return device->cs->c.state->cb[shader_type][idx]; +} + void CDECL wined3d_device_set_vs_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view) { TRACE("device %p, idx %u, view %p.\n", device, idx, view); - wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_VERTEX, idx, view); + wined3d_device_context_set_shader_resource_view(&device->cs->c, WINED3D_SHADER_TYPE_VERTEX, idx, view); } static struct wined3d_shader_resource_view *wined3d_device_get_shader_resource_view( @@ -2415,7 +2417,7 @@ void CDECL wined3d_device_set_ps_resource_view(struct wined3d_device *device, { TRACE("device %p, idx %u, view %p.\n", device, idx, view); - wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_PIXEL, idx, view); + wined3d_device_context_set_shader_resource_view(&device->cs->c, WINED3D_SHADER_TYPE_PIXEL, idx, view); } struct wined3d_shader_resource_view * CDECL wined3d_device_get_ps_resource_view(const struct wined3d_device *device, @@ -2513,7 +2515,7 @@ void CDECL wined3d_device_set_hs_resource_view(struct wined3d_device *device, { TRACE("device %p, idx %u, view %p.\n", device, idx, view); - wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_HULL, idx, view); + wined3d_device_context_set_shader_resource_view(&device->cs->c, WINED3D_SHADER_TYPE_HULL, idx, view); } struct wined3d_shader_resource_view * CDECL wined3d_device_get_hs_resource_view(const struct wined3d_device *device, @@ -2558,7 +2560,7 @@ void CDECL wined3d_device_set_ds_resource_view(struct wined3d_device *device, { TRACE("device %p, idx %u, view %p.\n", device, idx, view); - wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_DOMAIN, idx, view); + wined3d_device_context_set_shader_resource_view(&device->cs->c, WINED3D_SHADER_TYPE_DOMAIN, idx, view); } struct wined3d_shader_resource_view * CDECL wined3d_device_get_ds_resource_view(const struct wined3d_device *device, @@ -2603,7 +2605,7 @@ void CDECL wined3d_device_set_gs_resource_view(struct wined3d_device *device, { TRACE("device %p, idx %u, view %p.\n", device, idx, view); - wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_GEOMETRY, idx, view); + wined3d_device_context_set_shader_resource_view(&device->cs->c, WINED3D_SHADER_TYPE_GEOMETRY, idx, view); } struct wined3d_shader_resource_view * CDECL wined3d_device_get_gs_resource_view(const struct wined3d_device *device, @@ -2647,7 +2649,7 @@ void CDECL wined3d_device_set_cs_resource_view(struct wined3d_device *device, { TRACE("device %p, idx %u, view %p.\n", device, idx, view); - wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_COMPUTE, idx, view); + wined3d_device_context_set_shader_resource_view(&device->cs->c, WINED3D_SHADER_TYPE_COMPUTE, idx, view); } struct wined3d_shader_resource_view * CDECL wined3d_device_get_cs_resource_view(const struct wined3d_device *device, @@ -5183,7 +5185,7 @@ static void wined3d_unbind_srv_for_rtv(struct wined3d_device *device, if ((srv = state->shader_resource_view[i][j]) && srv->resource == resource && ((!dsv && wined3d_is_srv_rtv_bound(srv)) || (dsv && wined3d_dsv_srv_conflict(view, srv->format)))) - wined3d_device_set_shader_resource_view(device, i, j, NULL); + wined3d_device_context_set_shader_resource_view(&device->cs->c, i, j, NULL); } } diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 60d85a46290..20cea2490ae 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -172,6 +172,7 @@ @ cdecl wined3d_device_context_set_rasterizer_state(ptr ptr) @ cdecl wined3d_device_context_set_scissor_rects(ptr long ptr) @ cdecl wined3d_device_context_set_shader(ptr long ptr) +@ cdecl wined3d_device_context_set_shader_resource_view(ptr long long ptr) @ cdecl wined3d_device_context_set_viewports(ptr long ptr) @ cdecl wined3d_output_find_closest_matching_mode(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 7b585b92cef..d4c97604e14 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2560,6 +2560,8 @@ void __cdecl wined3d_device_context_set_scissor_rects(struct wined3d_device_cont const RECT *rects); void __cdecl wined3d_device_context_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader); +void __cdecl wined3d_device_context_set_shader_resource_view(struct wined3d_device_context *context, + enum wined3d_shader_type type, unsigned int idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports);
1
0
0
0
Zebediah Figura : wined3d: Pass a wined3d_device_context to wind3d_cs_emit_set_shader_resource_view().
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: e2c96d3453b30ced082457d834c92bd1e631750e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e2c96d3453b30ced082457d8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 16 19:06:05 2021 -0500 wined3d: Pass a wined3d_device_context to wind3d_cs_emit_set_shader_resource_view(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 8 ++++---- dlls/wined3d/device.c | 4 ++-- dlls/wined3d/wined3d_private.h | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index d8635bba8d7..23360be76a9 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1546,18 +1546,18 @@ static void wined3d_cs_exec_set_shader_resource_view(struct wined3d_cs *cs, cons device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING); } -void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type, - UINT view_idx, struct wined3d_shader_resource_view *view) +void wined3d_device_context_emit_set_shader_resource_view(struct wined3d_device_context *context, + enum wined3d_shader_type type, unsigned int view_idx, struct wined3d_shader_resource_view *view) { struct wined3d_cs_set_shader_resource_view *op; - op = wined3d_device_context_require_space(&cs->c, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); + op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); op->opcode = WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEW; op->type = type; op->view_idx = view_idx; op->view = view; - wined3d_device_context_submit(&cs->c, WINED3D_CS_QUEUE_DEFAULT); + wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, const void *data) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3feabbe79f1..08115cb0de2 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1907,7 +1907,7 @@ void CDECL wined3d_device_set_state(struct wined3d_device *device, struct wined3 } for (j = 0; j < MAX_SHADER_RESOURCE_VIEWS; ++j) { - wined3d_cs_emit_set_shader_resource_view(device->cs, i, j, state->shader_resource_view[i][j]); + wined3d_device_context_emit_set_shader_resource_view(context, i, j, state->shader_resource_view[i][j]); } } @@ -2256,7 +2256,7 @@ static void wined3d_device_set_shader_resource_view(struct wined3d_device *devic } state->shader_resource_view[type][idx] = view; - wined3d_cs_emit_set_shader_resource_view(device->cs, type, idx, view); + wined3d_device_context_emit_set_shader_resource_view(&device->cs->c, type, idx, view); if (prev) { wined3d_srv_bind_count_dec(prev); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 4ad0c05d34a..d587f039569 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4770,8 +4770,6 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; -void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type, - UINT view_idx, struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, UINT sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, @@ -4827,6 +4825,9 @@ void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context unsigned int rect_count, const RECT *rects) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_shader_resource_view(struct wined3d_device_context *context, + enum wined3d_shader_type type, unsigned int view_idx, + struct wined3d_shader_resource_view *view) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : server: Remove the redundant cpu field in the PE image information.
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 86947587d206a0a95b4ac2c5458f8465ee4c371d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=86947587d206a0a95b4ac2c5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 17 10:38:43 2021 +0100 server: Remove the redundant cpu field in the PE image information. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/loader.c | 13 ++++++------- dlls/ntdll/unix/process.c | 40 ++++++++++++++++++++++++++-------------- dlls/ntdll/unix/unix_private.h | 4 ++++ include/wine/server_protocol.h | 4 +--- server/mapping.c | 12 ++---------- server/protocol.def | 2 -- server/trace.c | 4 +--- 7 files changed, 40 insertions(+), 39 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=86947587d206a0a95b4a…
1
0
0
0
Alexandre Julliard : ntdll: Check the builtin signature when creating a module.
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 4ea07a30ce25e63ba61012ec9886ffc636e70bbb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4ea07a30ce25e63ba61012ec…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 17 10:36:47 2021 +0100 ntdll: Check the builtin signature when creating a module. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 04bcdb18a2b..092c47eac3b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1832,6 +1832,9 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, const SECTION_IMAGE_INFORMATION *image_info, const struct file_id *id, DWORD flags, WINE_MODREF **pwm ) { + static const char builtin_signature[] = "Wine builtin DLL"; + char *signature = (char *)((IMAGE_DOS_HEADER *)*module + 1); + BOOL is_builtin; IMAGE_NT_HEADERS *nt; WINE_MODREF *wm; NTSTATUS status; @@ -1842,10 +1845,12 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, map_size = (nt->OptionalHeader.SizeOfImage + page_size - 1) & ~(page_size - 1); if ((status = perform_relocations( *module, nt, map_size ))) return status; + is_builtin = ((char *)nt - signature >= sizeof(builtin_signature) && + !memcmp( signature, builtin_signature, sizeof(builtin_signature) )); + /* create the MODREF */ - if (!(wm = alloc_module( *module, nt_name, (image_info->u.s.WineBuiltin) ))) - return STATUS_NO_MEMORY; + if (!(wm = alloc_module( *module, nt_name, is_builtin ))) return STATUS_NO_MEMORY; if (id) wm->id = *id; if (image_info->LoaderFlags) wm->ldr.Flags |= LDR_COR_IMAGE; @@ -1883,7 +1888,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, TRACE( "loaded %s %p %p\n", debugstr_us(nt_name), wm, *module ); - if (image_info->u.s.WineBuiltin) + if (is_builtin) { if (TRACE_ON(relay)) RELAY_SetupDLL( *module ); } @@ -1893,7 +1898,7 @@ static NTSTATUS build_module( LPCWSTR load_path, const UNICODE_STRING *nt_name, } TRACE_(loaddll)( "Loaded %s at %p: %s\n", debugstr_w(wm->ldr.FullDllName.Buffer), *module, - (image_info->u.s.WineBuiltin) ? "builtin" : "native" ); + is_builtin ? "builtin" : "native" ); wm->ldr.LoadCount = 1; *pwm = wm; @@ -2319,7 +2324,6 @@ static NTSTATUS load_so_dll( LPCWSTR load_path, const UNICODE_STRING *nt_name, { SECTION_IMAGE_INFORMATION image_info = { 0 }; - image_info.u.s.WineBuiltin = 1; if ((status = build_module( load_path, &win_name, &module, &image_info, NULL, flags, &wm ))) { if (module) NtUnmapViewOfSection( NtCurrentProcess(), module );
1
0
0
0
Alexandre Julliard : ntoskrnl: Load driver dependencies from the driver directory.
by Alexandre Julliard
17 Mar '21
17 Mar '21
Module: wine Branch: master Commit: 31816a90c604f209387dda887a17ac9a8072a2a5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=31816a90c604f209387dda88…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Mar 17 11:49:16 2021 +0100 ntoskrnl: Load driver dependencies from the driver directory. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index a818a6e88b3..066e87cf977 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -3691,7 +3691,7 @@ static HMODULE load_driver( const WCHAR *driver_name, const UNICODE_STRING *keyn TRACE( "loading driver %s\n", wine_dbgstr_w(str) ); - module = LoadLibraryW( str ); + module = LoadLibraryExW( str, 0, LOAD_WITH_ALTERED_SEARCH_PATH ); if (module && load_image_notify_routine_count) {
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
117
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
Results per page:
10
25
50
100
200