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
May 2019
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1019 discussions
Start a n
N
ew thread
Henri Verbeet : wined3d: Move the occlusion query fields from struct wined3d_context to struct wined3d_context_gl.
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: ce1c0ff1e9aa46b30cabb511f72c0cf5b2dfcae2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ce1c0ff1e9aa46b30cabb511…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 10 21:19:07 2019 +0430 wined3d: Move the occlusion query fields from struct wined3d_context to struct wined3d_context_gl. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 58 ++++++++++++++++++++++-------------------- dlls/wined3d/query.c | 20 +++++++-------- dlls/wined3d/wined3d_private.h | 20 ++++++++------- 3 files changed, 51 insertions(+), 47 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=ce1c0ff1e9aa46b30cab…
1
0
0
0
Henri Verbeet : wined3d: Move the "blit_vbo" field from struct wined3d_context to struct wined3d_context_gl.
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: de16768de7f08cc1677df6aac9b5c666732f958b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=de16768de7f08cc1677df6aa…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 10 21:19:06 2019 +0430 wined3d: Move the "blit_vbo" field from struct wined3d_context to struct wined3d_context_gl. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 12 ++++++------ dlls/wined3d/wined3d_private.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index c291c4c..443c6d5 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1444,9 +1444,6 @@ void wined3d_context_cleanup(struct wined3d_context *context) } } - if (context->blit_vbo) - GL_EXTCALL(glDeleteBuffers(1, &context->blit_vbo)); - checkGLcall("context cleanup"); } @@ -1494,6 +1491,9 @@ void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl) if (context_gl->dummy_arbfp_prog) GL_EXTCALL(glDeleteProgramsARB(1, &context_gl->dummy_arbfp_prog)); + if (context_gl->blit_vbo) + GL_EXTCALL(glDeleteBuffers(1, &context_gl->blit_vbo)); + checkGLcall("context cleanup"); } @@ -5630,9 +5630,9 @@ void context_draw_shaded_quad(struct wined3d_context *context, struct wined3d_te /* Draw a quad. */ if (gl_info->supported[ARB_VERTEX_BUFFER_OBJECT]) { - if (!context->blit_vbo) - GL_EXTCALL(glGenBuffers(1, &context->blit_vbo)); - GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, context->blit_vbo)); + if (!context_gl->blit_vbo) + GL_EXTCALL(glGenBuffers(1, &context_gl->blit_vbo)); + GL_EXTCALL(glBindBuffer(GL_ARRAY_BUFFER, context_gl->blit_vbo)); context_unload_vertex_data(context); context_unload_numbered_arrays(context); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 48b97d7..c308b31 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2013,8 +2013,6 @@ struct wined3d_context struct wined3d_fence *buffer_fences[MAX_ATTRIBS]; unsigned int buffer_fence_count; - GLuint blit_vbo; - unsigned int viewport_count; unsigned int scissor_rect_count; }; @@ -2033,6 +2031,8 @@ struct wined3d_context_gl GLenum *texture_type; + GLuint blit_vbo; + unsigned int tex_unit_map[WINED3D_MAX_COMBINED_SAMPLERS]; unsigned int rev_tex_unit_map[MAX_GL_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS];
1
0
0
0
Henri Verbeet : wined3d: Move the texture unit map from struct wined3d_context to struct wined3d_context_gl.
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: 3171193bcfcdc585fd869a31aaf5968df205bb49 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3171193bcfcdc585fd869a31…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 10 21:19:05 2019 +0430 wined3d: Move the texture unit map from struct wined3d_context to struct wined3d_context_gl. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 7 +++-- dlls/wined3d/ati_fragment_shader.c | 11 +++---- dlls/wined3d/context.c | 58 ++++++++++++++++++------------------ dlls/wined3d/nvidia_texture_shader.c | 13 +++++--- dlls/wined3d/state.c | 23 +++++++------- dlls/wined3d/texture.c | 4 +-- dlls/wined3d/utils.c | 4 +-- dlls/wined3d/view.c | 4 +-- dlls/wined3d/wined3d_private.h | 6 ++-- 9 files changed, 69 insertions(+), 61 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3171193bcfcdc585fd86…
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to draw_primitive_immediate_mode().
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: 045f9b51cb39914e2fd741e120d65242d1c6bfbd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=045f9b51cb39914e2fd741e1…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 10 21:19:04 2019 +0430 wined3d: Pass a wined3d_context_gl structure to draw_primitive_immediate_mode(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index f62ba27..13deb54 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -4508,14 +4508,14 @@ static unsigned int get_stride_idx(const void *idx_data, unsigned int idx_size, } /* Context activation is done by the caller. */ -static void draw_primitive_immediate_mode(struct wined3d_context *context, const struct wined3d_state *state, +static void draw_primitive_immediate_mode(struct wined3d_context_gl *context_gl, const struct wined3d_state *state, const struct wined3d_stream_info *si, const void *idx_data, unsigned int idx_size, int base_vertex_idx, unsigned int start_idx, unsigned int vertex_count, unsigned int instance_count) { const BYTE *position = NULL, *normal = NULL, *diffuse = NULL, *specular = NULL; - const struct wined3d_d3d_info *d3d_info = context->d3d_info; + const struct wined3d_d3d_info *d3d_info = context_gl->c.d3d_info; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; unsigned int coord_idx, stride_idx, texture_idx, vertex_idx; - const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_stream_info_element *element; const BYTE *tex_coords[WINED3DDP_MAXTEXCOORD]; unsigned int texture_unit, texture_stages; @@ -4542,7 +4542,7 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const /* Immediate mode drawing can't make use of indices in a VBO - get the * data from the index buffer. */ if (idx_size) - idx_data = wined3d_buffer_load_sysmem(state->index_buffer, context) + state->index_offset; + idx_data = wined3d_buffer_load_sysmem(state->index_buffer, &context_gl->c) + state->index_offset; ops = &d3d_info->ffp_attrib_ops; @@ -4578,7 +4578,7 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const else gl_info->gl_ops.gl.p_glNormal3f(0.0f, 0.0f, 0.0f); - untracked_material_count = context->num_untracked_materials; + untracked_material_count = context_gl->c.num_untracked_materials; if (si->use_map & (1u << WINED3D_FFP_DIFFUSE)) { element = &si->elements[WINED3D_FFP_DIFFUSE]; @@ -4636,7 +4636,7 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const if (!ps && !state->textures[texture_idx]) continue; - texture_unit = context->tex_unit_map[texture_idx]; + texture_unit = context_gl->c.tex_unit_map[texture_idx]; if (texture_unit == WINED3D_UNMAPPED_STAGE) continue; @@ -4690,7 +4690,8 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const wined3d_color_from_d3dcolor(&color, *(const DWORD *)ptr); for (i = 0; i < untracked_material_count; ++i) { - gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, context->untracked_materials[i], &color.r); + gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, + context_gl->c.untracked_materials[i], &color.r); } } } @@ -4713,7 +4714,7 @@ static void draw_primitive_immediate_mode(struct wined3d_context *context, const coord_idx = state->texture_states[texture_idx][WINED3D_TSS_TEXCOORD_INDEX]; ptr = tex_coords[coord_idx] + (stride_idx * si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].stride); ops->texcoord[si->elements[WINED3D_FFP_TEXCOORD0 + coord_idx].format->emit_idx]( - GL_TEXTURE0_ARB + context->tex_unit_map[texture_idx], ptr); + GL_TEXTURE0_ARB + context_gl->c.tex_unit_map[texture_idx], ptr); } if (position) @@ -5004,7 +5005,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s instance_count = context->instance_count; if (context->use_immediate_mode_draw || emulation) - draw_primitive_immediate_mode(context, state, stream_info, idx_data, + draw_primitive_immediate_mode(wined3d_context_gl(context), state, stream_info, idx_data, idx_size, parameters->u.direct.base_vertex_idx, parameters->u.direct.start_idx, parameters->u.direct.index_count, instance_count); else
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to context_update_tex_unit_map().
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: 48b0c209554977a38d011a6bedc5ff31a27a7f34 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=48b0c209554977a38d011a6b…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Fri May 10 21:19:03 2019 +0430 wined3d: Pass a wined3d_context_gl structure to context_update_tex_unit_map(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index a197604..f62ba27 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3435,15 +3435,15 @@ static void wined3d_context_gl_map_vsamplers(struct wined3d_context_gl *context_ } } -static void context_update_tex_unit_map(struct wined3d_context *context, const struct wined3d_state *state) +static void wined3d_context_gl_update_tex_unit_map(struct wined3d_context_gl *context_gl, + const struct wined3d_state *state) { - struct wined3d_context_gl *context_gl = wined3d_context_gl(context); - const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; BOOL vs = use_vs(state); BOOL ps = use_ps(state); if (!ps) - context_update_fixed_function_usage_map(context, state); + context_update_fixed_function_usage_map(&context_gl->c, state); /* Try to go for a 1:1 mapping of the samplers when possible. Pixel shaders * need a 1:1 map at the moment. @@ -3956,7 +3956,7 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, /* Preload resources before FBO setup. Texture preload in particular may * result in changes to the current FBO, due to using e.g. FBO blits for * updating a resource location. */ - context_update_tex_unit_map(context, state); + wined3d_context_gl_update_tex_unit_map(context_gl, state); context_preload_textures(context, state); context_load_shader_resources(context, state, ~(1u << WINED3D_SHADER_TYPE_COMPUTE)); context_load_unordered_access_resources(context, state->shader[WINED3D_SHADER_TYPE_PIXEL],
1
0
0
0
Nikolay Sivov : mf: Add support for async commands for media session.
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: a005e250f0598a44afd482be5a00445878853dbd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a005e250f0598a44afd482be…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri May 10 18:44:34 2019 +0300 mf: Add support for async commands for media session. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/Makefile.in | 2 +- dlls/mf/session.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++- dlls/mf/topology.c | 4 - include/mfidl.idl | 12 +++ 4 files changed, 217 insertions(+), 9 deletions(-) diff --git a/dlls/mf/Makefile.in b/dlls/mf/Makefile.in index ecedea6..d9c85c4 100644 --- a/dlls/mf/Makefile.in +++ b/dlls/mf/Makefile.in @@ -1,6 +1,6 @@ MODULE = mf.dll IMPORTLIB = mf -IMPORTS = mfplat mfuuid +IMPORTS = mfplat uuid mfuuid C_SRCS = \ main.c \ diff --git a/dlls/mf/session.c b/dlls/mf/session.c index a433a30..7923581 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -33,12 +33,33 @@ WINE_DEFAULT_DEBUG_CHANNEL(mfplat); +enum session_command +{ + SESSION_CLEAR_TOPOLOGIES, +}; + +struct session_op +{ + IUnknown IUnknown_iface; + LONG refcount; + enum session_command command; +}; + +struct queued_topology +{ + struct list entry; + IMFTopology *topology; +}; + struct media_session { IMFMediaSession IMFMediaSession_iface; IMFGetService IMFGetService_iface; + IMFAsyncCallback commands_callback; LONG refcount; IMFMediaEventQueue *event_queue; + struct list topologies; + CRITICAL_SECTION cs; }; struct clock_sink @@ -93,11 +114,21 @@ static inline struct media_session *impl_from_IMFMediaSession(IMFMediaSession *i return CONTAINING_RECORD(iface, struct media_session, IMFMediaSession_iface); } +static struct media_session *impl_from_commands_callback_IMFAsyncCallback(IMFAsyncCallback *iface) +{ + return CONTAINING_RECORD(iface, struct media_session, commands_callback); +} + static struct media_session *impl_from_IMFGetService(IMFGetService *iface) { return CONTAINING_RECORD(iface, struct media_session, IMFGetService_iface); } +static struct session_op *impl_op_from_IUnknown(IUnknown *iface) +{ + return CONTAINING_RECORD(iface, struct session_op, IUnknown_iface); +} + static struct presentation_clock *impl_from_IMFPresentationClock(IMFPresentationClock *iface) { return CONTAINING_RECORD(iface, struct presentation_clock, IMFPresentationClock_iface); @@ -128,6 +159,79 @@ static struct sink_notification *impl_from_IUnknown(IUnknown *iface) return CONTAINING_RECORD(iface, struct sink_notification, IUnknown_iface); } +static HRESULT WINAPI session_op_QueryInterface(IUnknown *iface, REFIID riid, void **obj) +{ + if (IsEqualIID(riid, &IID_IUnknown)) + { + *obj = iface; + IUnknown_AddRef(iface); + return S_OK; + } + + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI session_op_AddRef(IUnknown *iface) +{ + struct session_op *op = impl_op_from_IUnknown(iface); + ULONG refcount = InterlockedIncrement(&op->refcount); + + TRACE("%p, refcount %u.\n", iface, refcount); + + return refcount; +} + +static ULONG WINAPI session_op_Release(IUnknown *iface) +{ + struct session_op *op = impl_op_from_IUnknown(iface); + ULONG refcount = InterlockedDecrement(&op->refcount); + + TRACE("%p, refcount %u.\n", iface, refcount); + + if (!refcount) + { + heap_free(op); + } + + return refcount; +} + +static IUnknownVtbl session_op_vtbl = +{ + session_op_QueryInterface, + session_op_AddRef, + session_op_Release, +}; + +static HRESULT create_session_op(enum session_command command, IUnknown **ret) +{ + struct session_op *op; + + if (!(op = heap_alloc(sizeof(*op)))) + return E_OUTOFMEMORY; + + op->IUnknown_iface.lpVtbl = &session_op_vtbl; + op->refcount = 1; + op->command = command; + + *ret = &op->IUnknown_iface; + + return S_OK; +} + +static void session_clear_topologies(struct media_session *session) +{ + struct queued_topology *ptr, *next; + + LIST_FOR_EACH_ENTRY_SAFE(ptr, next, &session->topologies, struct queued_topology, entry) + { + list_remove(&ptr->entry); + IMFTopology_Release(ptr->topology); + heap_free(ptr); + } +} + static HRESULT WINAPI mfsession_QueryInterface(IMFMediaSession *iface, REFIID riid, void **out) { struct media_session *session = impl_from_IMFMediaSession(iface); @@ -173,8 +277,10 @@ static ULONG WINAPI mfsession_Release(IMFMediaSession *iface) if (!refcount) { + session_clear_topologies(session); if (session->event_queue) IMFMediaEventQueue_Release(session->event_queue); + DeleteCriticalSection(&session->cs); heap_free(session); } @@ -220,16 +326,44 @@ static HRESULT WINAPI mfsession_QueueEvent(IMFMediaSession *iface, MediaEventTyp static HRESULT WINAPI mfsession_SetTopology(IMFMediaSession *iface, DWORD flags, IMFTopology *topology) { - FIXME("(%p)->(%#x, %p)\n", iface, flags, topology); + struct media_session *session = impl_from_IMFMediaSession(iface); + struct queued_topology *queued_topology; - return E_NOTIMPL; + FIXME("%p, %#x, %p.\n", iface, flags, topology); + + if (!(queued_topology = heap_alloc(sizeof(*queued_topology)))) + return E_OUTOFMEMORY; + + queued_topology->topology = topology; + IMFTopology_AddRef(queued_topology->topology); + + EnterCriticalSection(&session->cs); + list_add_tail(&session->topologies, &queued_topology->entry); + LeaveCriticalSection(&session->cs); + + return S_OK; +} + +static HRESULT session_submit_command(struct media_session *session, IUnknown *op) +{ + return MFPutWorkItem(MFASYNC_CALLBACK_QUEUE_STANDARD, &session->commands_callback, op); } static HRESULT WINAPI mfsession_ClearTopologies(IMFMediaSession *iface) { - FIXME("(%p)\n", iface); + struct media_session *session = impl_from_IMFMediaSession(iface); + IUnknown *op; + HRESULT hr; - return E_NOTIMPL; + TRACE("%p.\n", iface); + + if (FAILED(hr = create_session_op(SESSION_CLEAR_TOPOLOGIES, &op))) + return hr; + + hr = session_submit_command(session, op); + IUnknown_Release(op); + + return hr; } static HRESULT WINAPI mfsession_Start(IMFMediaSession *iface, const GUID *format, const PROPVARIANT *start) @@ -346,6 +480,69 @@ static const IMFGetServiceVtbl session_get_service_vtbl = session_get_service_GetService, }; +static HRESULT WINAPI session_commands_callback_QueryInterface(IMFAsyncCallback *iface, REFIID riid, void **obj) +{ + if (IsEqualIID(riid, &IID_IMFAsyncCallback) || + IsEqualIID(riid, &IID_IUnknown)) + { + *obj = iface; + IMFAsyncCallback_AddRef(iface); + return S_OK; + } + + WARN("Unsupported %s.\n", debugstr_guid(riid)); + *obj = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI session_commands_callback_AddRef(IMFAsyncCallback *iface) +{ + struct media_session *session = impl_from_commands_callback_IMFAsyncCallback(iface); + return IMFMediaSession_AddRef(&session->IMFMediaSession_iface); +} + +static ULONG WINAPI session_commands_callback_Release(IMFAsyncCallback *iface) +{ + struct media_session *session = impl_from_commands_callback_IMFAsyncCallback(iface); + return IMFMediaSession_Release(&session->IMFMediaSession_iface); +} + +static HRESULT WINAPI session_commands_callback_GetParameters(IMFAsyncCallback *iface, DWORD *flags, DWORD *queue) +{ + return E_NOTIMPL; +} + +static HRESULT WINAPI session_commands_callback_Invoke(IMFAsyncCallback *iface, IMFAsyncResult *result) +{ + struct session_op *op = impl_op_from_IUnknown(IMFAsyncResult_GetStateNoAddRef(result)); + struct media_session *session = impl_from_commands_callback_IMFAsyncCallback(iface); + + switch (op->command) + { + case SESSION_CLEAR_TOPOLOGIES: + EnterCriticalSection(&session->cs); + session_clear_topologies(session); + LeaveCriticalSection(&session->cs); + + IMFMediaEventQueue_QueueEventParamVar(session->event_queue, MESessionTopologiesCleared, &GUID_NULL, + S_OK, NULL); + break; + default: + ; + } + + return S_OK; +} + +static const IMFAsyncCallbackVtbl session_commands_callback_vtbl = +{ + session_commands_callback_QueryInterface, + session_commands_callback_AddRef, + session_commands_callback_Release, + session_commands_callback_GetParameters, + session_commands_callback_Invoke, +}; + /*********************************************************************** * MFCreateMediaSession (mf.@) */ @@ -365,12 +562,15 @@ HRESULT WINAPI MFCreateMediaSession(IMFAttributes *config, IMFMediaSession **ses object->IMFMediaSession_iface.lpVtbl = &mfmediasessionvtbl; object->IMFGetService_iface.lpVtbl = &session_get_service_vtbl; + object->commands_callback.lpVtbl = &session_commands_callback_vtbl; object->refcount = 1; if (FAILED(hr = MFCreateEventQueue(&object->event_queue))) { IMFMediaSession_Release(&object->IMFMediaSession_iface); return hr; } + list_init(&object->topologies); + InitializeCriticalSection(&object->cs); *session = &object->IMFMediaSession_iface; diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c index e10bc8b..1d72d8b 100644 --- a/dlls/mf/topology.c +++ b/dlls/mf/topology.c @@ -26,10 +26,6 @@ #include "windef.h" #include "winbase.h" -#include "initguid.h" -#include "ole2.h" -#include "ocidl.h" - #undef INITGUID #include <guiddef.h> #include "mfapi.h" diff --git a/include/mfidl.idl b/include/mfidl.idl index 702434a..5db737e 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -64,6 +64,18 @@ typedef enum _MFCLOCK_CHARACTERISTICS_FLAGS MFCLOCK_CHARACTERISTICS_FLAG_IS_SYSTEM_CLOCK = 0x00000008, } MFCLOCK_CHARACTERISTICS_FLAGS; +typedef enum MFSESSION_SETTOPOLOGY_FLAGS +{ + MFSESSION_SETTOPOLOGY_IMMEDIATE = 0x00000001, + MFSESSION_SETTOPOLOGY_NORESOLUTION = 0x00000002, + MFSESSION_SETTOPOLOGY_CLEAR_CURRENT = 0x00000004, +} MFSESSION_SETTOPOLOGY_FLAGS; + +typedef enum MFSESSION_GETFULLTOPOLOGY_FLAGS +{ + MFSESSION_GETFULLTOPOLOGY_CURRENT = 0x00000001, +} MFSESSION_GETFULLTOPOLOGY_FLAGS; + [ object, uuid(2eb1e945-18b8-4139-9b1a-d5d584818530),
1
0
0
0
Nikolay Sivov : mf: Add stubs to create audio renderer sink.
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: 12a02e98a52f1c7d2c491e91391c8b31cbf5e7ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=12a02e98a52f1c7d2c491e91…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri May 10 18:44:33 2019 +0300 mf: Add stubs to create audio renderer sink. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/Makefile.in | 1 + dlls/mf/main.c | 2 +- dlls/mf/mf.spec | 4 +-- dlls/mf/mf_private.h | 2 +- dlls/mf/samplegrabber.c | 4 +-- dlls/mf/sar.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 83 insertions(+), 6 deletions(-) diff --git a/dlls/mf/Makefile.in b/dlls/mf/Makefile.in index 2eb9b34..ecedea6 100644 --- a/dlls/mf/Makefile.in +++ b/dlls/mf/Makefile.in @@ -5,6 +5,7 @@ IMPORTS = mfplat mfuuid C_SRCS = \ main.c \ samplegrabber.c \ + sar.c \ session.c \ topology.c diff --git a/dlls/mf/main.c b/dlls/mf/main.c index c2e5eb4..b5b4b0e 100644 --- a/dlls/mf/main.c +++ b/dlls/mf/main.c @@ -392,7 +392,7 @@ static HRESULT WINAPI activate_object_ActivateObject(IMFActivate *iface, REFIID if (!activate->object) { - if (FAILED(hr = activate->funcs->create_object(activate->context, &object))) + if (FAILED(hr = activate->funcs->create_object((IMFAttributes *)iface, activate->context, &object))) return hr; if (!InterlockedCompareExchangePointer((void **)&activate->object, object, NULL)) diff --git a/dlls/mf/mf.spec b/dlls/mf/mf.spec index 6131495..6e64404 100644 --- a/dlls/mf/mf.spec +++ b/dlls/mf/mf.spec @@ -23,8 +23,8 @@ @ stub MFCreateASFStreamingMediaSinkActivate @ stub MFCreateAggregateSource @ stub MFCreateAppSourceProxy -@ stub MFCreateAudioRenderer -@ stub MFCreateAudioRendererActivate +@ stdcall MFCreateAudioRenderer(ptr ptr) +@ stdcall MFCreateAudioRendererActivate(ptr) @ stub MFCreateByteCacheFile @ stub MFCreateCacheManager @ stub MFCreateCredentialCache diff --git a/dlls/mf/mf_private.h b/dlls/mf/mf_private.h index 45a3834..0b7d1c6 100644 --- a/dlls/mf/mf_private.h +++ b/dlls/mf/mf_private.h @@ -49,7 +49,7 @@ static inline BOOL mf_array_reserve(void **elements, size_t *capacity, size_t co struct activate_funcs { - HRESULT (*create_object)(void *context, IUnknown **object); + HRESULT (*create_object)(IMFAttributes *attributes, void *context, IUnknown **object); void (*free_private)(void *context); }; diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c index 1ffa3ba..7b35364 100644 --- a/dlls/mf/samplegrabber.c +++ b/dlls/mf/samplegrabber.c @@ -40,9 +40,9 @@ static void sample_grabber_free_private(void *user_context) heap_free(context); } -static HRESULT sample_grabber_create_object(void *user_context, IUnknown **obj) +static HRESULT sample_grabber_create_object(IMFAttributes *attributes, void *user_context, IUnknown **obj) { - FIXME("%p, %p.\n", user_context, obj); + FIXME("%p, %p, %p.\n", attributes, user_context, obj); return E_NOTIMPL; } diff --git a/dlls/mf/sar.c b/dlls/mf/sar.c new file mode 100644 index 0000000..c0c1803 --- /dev/null +++ b/dlls/mf/sar.c @@ -0,0 +1,76 @@ +/* + * Copyright 2019 Nikolay Sivov for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS + +#include "mfidl.h" +#include "mf_private.h" + +#include "wine/debug.h" +#include "wine/heap.h" + +WINE_DEFAULT_DEBUG_CHANNEL(mfplat); + +static HRESULT sar_create_object(IMFAttributes *attributes, void *user_context, IUnknown **obj) +{ + FIXME("%p, %p, %p.\n", attributes, user_context, obj); + + return E_NOTIMPL; +} + +static void sar_free_private(void *user_context) +{ +} + +static const struct activate_funcs sar_activate_funcs = +{ + sar_create_object, + sar_free_private, +}; + +/*********************************************************************** + * MFCreateAudioRendererActivate (mf.@) + */ +HRESULT WINAPI MFCreateAudioRendererActivate(IMFActivate **activate) +{ + TRACE("%p.\n", activate); + + if (!activate) + return E_POINTER; + + return create_activation_object(NULL, &sar_activate_funcs, activate); +} + +/*********************************************************************** + * MFCreateAudioRenderer (mf.@) + */ +HRESULT WINAPI MFCreateAudioRenderer(IMFAttributes *attributes, IMFMediaSink **sink) +{ + IUnknown *object; + HRESULT hr; + + TRACE("%p, %p.\n", attributes, sink); + + if (SUCCEEDED(hr = sar_create_object(attributes, NULL, &object))) + { + hr = IUnknown_QueryInterface(object, &IID_IMFMediaSink, (void **)sink); + IUnknown_Release(object); + } + + return hr; +}
1
0
0
0
Martin Storsjo : msvcrt: Hook up _setjmpex for arm64 as well.
by Alexandre Julliard
13 May '19
13 May '19
Module: wine Branch: master Commit: 869e0a63606917e8a43278102dd3af619c767b28 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=869e0a63606917e8a4327810…
Author: Martin Storsjo <martin(a)martin.st> Date: Fri May 10 13:49:33 2019 +0300 msvcrt: Hook up _setjmpex for arm64 as well. Signed-off-by: Martin Storsjo <martin(a)martin.st> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/msvcrt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 7958a7a..952de55 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -902,7 +902,7 @@ @ cdecl _seterrormode(long) @ cdecl -arch=i386,x86_64,arm,arm64 -norelay _setjmp(ptr) MSVCRT__setjmp @ cdecl -arch=i386 -norelay _setjmp3(ptr long) MSVCRT__setjmp3 -@ cdecl -arch=x86_64,arm -norelay _setjmpex(ptr ptr) MSVCRT__setjmpex +@ cdecl -arch=x86_64,arm,arm64 -norelay _setjmpex(ptr ptr) MSVCRT__setjmpex @ cdecl _setmaxstdio(long) MSVCRT__setmaxstdio @ cdecl _setmbcp(long) @ cdecl _setmode(long long) MSVCRT__setmode
1
0
0
0
Józef Kucia : vkd3d: Trace queue in vkd3d_queue_update_sequence_number().
by Alexandre Julliard
13 May '19
13 May '19
Module: vkd3d Branch: master Commit: 0e93657b4b94008b5461398f9b91769a33c44f33 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=0e93657b4b94008b5461398…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri May 10 14:15:23 2019 +0200 vkd3d: Trace queue in vkd3d_queue_update_sequence_number(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 606c5bb..e4221c9 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -152,7 +152,8 @@ static void vkd3d_queue_update_sequence_number(struct vkd3d_queue *queue, completed_sequence_number = queue->completed_sequence_number; queue->completed_sequence_number = max(sequence_number, queue->completed_sequence_number); - TRACE("Sequence number %"PRIu64" -> %"PRIu64".\n", completed_sequence_number, queue->completed_sequence_number); + TRACE("Queue %p sequence number %"PRIu64" -> %"PRIu64".\n", + queue, completed_sequence_number, queue->completed_sequence_number); for (i = 0; i < queue->semaphore_count; ++i) {
1
0
0
0
Józef Kucia : vkd3d: Introduce vkd3d_application_info.
by Alexandre Julliard
13 May '19
13 May '19
Module: vkd3d Branch: master Commit: 08e2e583b5a167851867f1070f46d6ba998ec60c URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=08e2e583b5a167851867f10…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri May 10 14:15:21 2019 +0200 vkd3d: Introduce vkd3d_application_info. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d.h | 14 ++++++++++++++ libs/vkd3d/device.c | 39 ++++++++++++++++++++++++++++++++++++--- tests/vkd3d_api.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+), 3 deletions(-) diff --git a/include/vkd3d.h b/include/vkd3d.h index 24cb34e..b78076e 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -43,6 +43,7 @@ enum vkd3d_structure_type VKD3D_STRUCTURE_TYPE_OPTIONAL_INSTANCE_EXTENSIONS_INFO, VKD3D_STRUCTURE_TYPE_OPTIONAL_DEVICE_EXTENSIONS_INFO, + VKD3D_STRUCTURE_TYPE_APPLICATION_INFO, VKD3D_FORCE_32_BIT_ENUM(VKD3D_STRUCTURE_TYPE), }; @@ -83,6 +84,19 @@ struct vkd3d_optional_instance_extensions_info uint32_t extension_count; }; +/* Extends vkd3d_instance_create_info. */ +struct vkd3d_application_info +{ + enum vkd3d_structure_type type; + const void *next; + + const char *application_name; + uint32_t application_version; + + const char *engine_name; /* "vkd3d" if NULL */ + uint32_t engine_version; /* vkd3d version if engine_name is NULL */ +}; + struct vkd3d_device_create_info { enum vkd3d_structure_type type; diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index a107e1e..ae8893d 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -18,6 +18,8 @@ #include "vkd3d_private.h" +#include <ctype.h> + #ifdef HAVE_DLFCN_H #include <dlfcn.h> @@ -104,6 +106,25 @@ static void *vk_find_struct_(struct vk_struct *chain, VkStructureType sType) return NULL; } +static uint32_t vkd3d_get_vk_version(void) +{ + const char *ptr = PACKAGE_VERSION; + int major, minor; + + major = atoi(ptr); + + while (isdigit(*ptr)) + ++ptr; + if (*ptr == '.') + ++ptr; + + minor = atoi(ptr); + + TRACE("Version %d.%d.\n", major, minor); + + return VK_MAKE_VERSION(major, minor, 0); +} + struct vkd3d_optional_extension_info { const char *extension_name; @@ -459,6 +480,7 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, { const struct vkd3d_vk_global_procs *vk_global_procs = &instance->vk_global_procs; const struct vkd3d_optional_instance_extensions_info *optional_extensions; + const struct vkd3d_application_info *vkd3d_application_info; bool *user_extension_supported = NULL; VkApplicationInfo application_info; VkInstanceCreateInfo instance_info; @@ -509,12 +531,23 @@ static HRESULT vkd3d_instance_init(struct vkd3d_instance *instance, application_info.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; application_info.pNext = NULL; - application_info.pApplicationName = PACKAGE_NAME; + application_info.pApplicationName = NULL; application_info.applicationVersion = 0; - application_info.pEngineName = NULL; - application_info.engineVersion = 0; + application_info.pEngineName = PACKAGE_NAME; + application_info.engineVersion = vkd3d_get_vk_version(); application_info.apiVersion = VK_API_VERSION_1_0; + if ((vkd3d_application_info = vkd3d_find_struct(create_info->next, APPLICATION_INFO))) + { + application_info.pApplicationName = vkd3d_application_info->application_name; + application_info.applicationVersion = vkd3d_application_info->application_version; + if (vkd3d_application_info->engine_name) + { + application_info.pEngineName = vkd3d_application_info->engine_name; + application_info.engineVersion = vkd3d_application_info->engine_version; + } + } + if (!(extensions = vkd3d_calloc(extension_count, sizeof(*extensions)))) { if (instance->libvulkan) diff --git a/tests/vkd3d_api.c b/tests/vkd3d_api.c index 14d0914..5acec56 100644 --- a/tests/vkd3d_api.c +++ b/tests/vkd3d_api.c @@ -1052,6 +1052,49 @@ static void test_formats(void) } } +static void test_application_info(void) +{ + struct vkd3d_instance_create_info create_info; + struct vkd3d_application_info app_info; + struct vkd3d_instance *instance; + ULONG refcount; + HRESULT hr; + + app_info.type = VKD3D_STRUCTURE_TYPE_APPLICATION_INFO; + app_info.next = NULL; + app_info.engine_name = NULL; + app_info.engine_version = 0; + app_info.application_name = NULL; + app_info.application_version = 0; + + create_info = instance_default_create_info; + create_info.next = &app_info; + hr = vkd3d_create_instance(&create_info, &instance); + ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + refcount = vkd3d_instance_decref(instance); + ok(!refcount, "Instance has %u references left.\n", refcount); + + app_info.application_name = "vkd3d_api_tests"; + app_info.application_version = 0xdeadbeef; + hr = vkd3d_create_instance(&create_info, &instance); + ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + refcount = vkd3d_instance_decref(instance); + ok(!refcount, "Instance has %u references left.\n", refcount); + + app_info.engine_name = "engine_name"; + hr = vkd3d_create_instance(&create_info, &instance); + ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + refcount = vkd3d_instance_decref(instance); + ok(!refcount, "Instance has %u references left.\n", refcount); + + app_info.engine_name = "engine_name"; + app_info.engine_version = 2; + hr = vkd3d_create_instance(&create_info, &instance); + ok(hr == S_OK, "Failed to create instance, hr %#x.\n", hr); + refcount = vkd3d_instance_decref(instance); + ok(!refcount, "Instance has %u references left.\n", refcount); +} + static bool have_d3d12_device(void) { ID3D12Device *device; @@ -1083,4 +1126,5 @@ START_TEST(vkd3d_api) run_test(test_external_resource_map); run_test(test_external_resource_present_state); run_test(test_formats); + run_test(test_application_info); }
1
0
0
0
← Newer
1
...
70
71
72
73
74
75
76
...
102
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
Results per page:
10
25
50
100
200