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
June 2018
----- 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
1 participants
629 discussions
Start a n
N
ew thread
Hans Leidekker : webservices: Implement WsShutdownSessionChannel.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: 8355a96dd3d55e6253cbb281214ab8ba7eb2cd2e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8355a96dd3d55e6253cbb281…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 15:04:46 2018 +0200 webservices: Implement WsShutdownSessionChannel. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/channel.c | 98 +++++++++++++++++++++++++++++---------- dlls/webservices/tests/channel.c | 12 +++++ dlls/webservices/webservices.spec | 2 +- include/webservices.h | 1 + 4 files changed, 87 insertions(+), 26 deletions(-) diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c index 685e13d..6c7c8af 100644 --- a/dlls/webservices/channel.c +++ b/dlls/webservices/channel.c @@ -193,6 +193,7 @@ enum session_state { SESSION_STATE_UNINITIALIZED, SESSION_STATE_SETUP_COMPLETE, + SESSION_STATE_SHUTDOWN, }; struct channel @@ -664,6 +665,78 @@ HRESULT WINAPI WsOpenChannel( WS_CHANNEL *handle, const WS_ENDPOINT_ADDRESS *end return hr; } +enum frame_record_type +{ + FRAME_RECORD_TYPE_VERSION, + FRAME_RECORD_TYPE_MODE, + FRAME_RECORD_TYPE_VIA, + FRAME_RECORD_TYPE_KNOWN_ENCODING, + FRAME_RECORD_TYPE_EXTENSIBLE_ENCODING, + FRAME_RECORD_TYPE_UNSIZED_ENVELOPE, + FRAME_RECORD_TYPE_SIZED_ENVELOPE, + FRAME_RECORD_TYPE_END, + FRAME_RECORD_TYPE_FAULT, + FRAME_RECORD_TYPE_UPGRADE_REQUEST, + FRAME_RECORD_TYPE_UPGRADE_RESPONSE, + FRAME_RECORD_TYPE_PREAMBLE_ACK, + FRAME_RECORD_TYPE_PREAMBLE_END, +}; + +static HRESULT send_byte( SOCKET socket, BYTE byte ) +{ + int count = send( socket, (char *)&byte, 1, 0 ); + if (count < 0) return HRESULT_FROM_WIN32( WSAGetLastError() ); + if (count != 1) return WS_E_OTHER; + return S_OK; +} + +static HRESULT shutdown_session( struct channel *channel ) +{ + HRESULT hr; + + if (channel->state != WS_CHANNEL_STATE_OPEN || + (channel->type != WS_CHANNEL_TYPE_OUTPUT_SESSION && + channel->type != WS_CHANNEL_TYPE_DUPLEX_SESSION) || + channel->session_state >= SESSION_STATE_SHUTDOWN) return WS_E_INVALID_OPERATION; + + switch (channel->binding) + { + case WS_TCP_CHANNEL_BINDING: + if ((hr = send_byte( channel->u.tcp.socket, FRAME_RECORD_TYPE_END )) != S_OK) return hr; + channel->session_state = SESSION_STATE_SHUTDOWN; + return S_OK; + + default: + FIXME( "unhandled binding %u\n", channel->binding ); + return E_NOTIMPL; + } +} + +HRESULT WINAPI WsShutdownSessionChannel( WS_CHANNEL *handle, const WS_ASYNC_CONTEXT *ctx, WS_ERROR *error ) +{ + struct channel *channel = (struct channel *)handle; + HRESULT hr; + + TRACE( "%p %p %p\n", handle, ctx, error ); + if (error) FIXME( "ignoring error parameter\n" ); + if (ctx) FIXME( "ignoring ctx parameter\n" ); + + if (!channel) return E_INVALIDARG; + + EnterCriticalSection( &channel->cs ); + + if (channel->magic != CHANNEL_MAGIC) + { + LeaveCriticalSection( &channel->cs ); + return E_INVALIDARG; + } + + hr = shutdown_session( channel ); + + LeaveCriticalSection( &channel->cs ); + return hr; +} + static void close_channel( struct channel *channel ) { reset_channel( channel ); @@ -913,14 +986,6 @@ static HRESULT send_message_http( HINTERNET request, BYTE *data, ULONG len ) return S_OK; } -static HRESULT send_byte( SOCKET socket, BYTE byte ) -{ - int count = send( socket, (char *)&byte, 1, 0 ); - if (count < 0) return HRESULT_FROM_WIN32( WSAGetLastError() ); - if (count != 1) return WS_E_OTHER; - return S_OK; -} - static HRESULT send_bytes( SOCKET socket, BYTE *bytes, int len ) { int count = send( socket, (char *)bytes, len, 0 ); @@ -944,23 +1009,6 @@ static HRESULT send_size( SOCKET socket, ULONG size ) return E_INVALIDARG; } -enum frame_record_type -{ - FRAME_RECORD_TYPE_VERSION, - FRAME_RECORD_TYPE_MODE, - FRAME_RECORD_TYPE_VIA, - FRAME_RECORD_TYPE_KNOWN_ENCODING, - FRAME_RECORD_TYPE_EXTENSIBLE_ENCODING, - FRAME_RECORD_TYPE_UNSIZED_ENVELOPE, - FRAME_RECORD_TYPE_SIZED_ENVELOPE, - FRAME_RECORD_TYPE_END, - FRAME_RECORD_TYPE_FAULT, - FRAME_RECORD_TYPE_UPGRADE_REQUEST, - FRAME_RECORD_TYPE_UPGRADE_RESPONSE, - FRAME_RECORD_TYPE_PREAMBLE_ACK, - FRAME_RECORD_TYPE_PREAMBLE_END, -}; - static inline ULONG size_length( ULONG size ) { if (size < 0x80) return 1; diff --git a/dlls/webservices/tests/channel.c b/dlls/webservices/tests/channel.c index c995a08..db17893 100644 --- a/dlls/webservices/tests/channel.c +++ b/dlls/webservices/tests/channel.c @@ -496,6 +496,9 @@ static void test_message_read_write( const struct listener_info *info ) hr = WsOpenChannel( channel, &addr, NULL, NULL ); ok( hr == S_OK, "got %08x\n", hr ); + hr = WsShutdownSessionChannel( channel, NULL, NULL ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + hr = WsCreateMessageForChannel( channel, NULL, 0, &msg, NULL ); ok( hr == S_OK, "got %08x\n", hr ); @@ -627,6 +630,9 @@ static void test_duplex_session( const struct listener_info *info ) hr = WsCreateChannel( info->type, info->binding, NULL, 0, NULL, &channel, NULL ); ok( hr == S_OK, "got %08x\n", hr ); + hr = WsShutdownSessionChannel( channel, NULL, NULL ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + memset( &addr, 0, sizeof(addr) ); addr.url.length = wsprintfW( buf, fmt, info->port ); addr.url.chars = buf; @@ -655,6 +661,12 @@ static void test_duplex_session( const struct listener_info *info ) err = WaitForSingleObject( info->wait, 3000 ); ok( err == WAIT_OBJECT_0, "wait failed %u\n", err ); + hr = WsShutdownSessionChannel( channel, NULL, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + + hr = WsShutdownSessionChannel( channel, NULL, NULL ); + ok( hr == WS_E_INVALID_OPERATION, "got %08x\n", hr ); + hr = WsCloseChannel( channel, NULL, NULL ); ok( hr == S_OK, "got %08x\n", hr ); diff --git a/dlls/webservices/webservices.spec b/dlls/webservices/webservices.spec index 55f3e2e..8ba34b4 100644 --- a/dlls/webservices/webservices.spec +++ b/dlls/webservices/webservices.spec @@ -158,7 +158,7 @@ @ stdcall WsSetOutputToBuffer(ptr ptr ptr long ptr) @ stdcall WsSetReaderPosition(ptr ptr ptr) @ stdcall WsSetWriterPosition(ptr ptr ptr) -@ stub WsShutdownSessionChannel +@ stdcall WsShutdownSessionChannel(ptr ptr ptr) @ stdcall WsSkipNode(ptr ptr) @ stub WsStartReaderCanonicalization @ stub WsStartWriterCanonicalization diff --git a/include/webservices.h b/include/webservices.h index 1f823dd..928819f 100644 --- a/include/webservices.h +++ b/include/webservices.h @@ -1732,6 +1732,7 @@ HRESULT WINAPI WsSetOutputToBuffer(WS_XML_WRITER*, WS_XML_BUFFER*, const WS_XML_ ULONG, WS_ERROR*); HRESULT WINAPI WsSetReaderPosition(WS_XML_READER*, const WS_XML_NODE_POSITION*, WS_ERROR*); HRESULT WINAPI WsSetWriterPosition(WS_XML_WRITER*, const WS_XML_NODE_POSITION*, WS_ERROR*); +HRESULT WINAPI WsShutdownSessionChannel(WS_CHANNEL*, const WS_ASYNC_CONTEXT*, WS_ERROR*); HRESULT WINAPI WsSkipNode(WS_XML_READER*, WS_ERROR*); HRESULT WINAPI WsWriteArray(WS_XML_WRITER*, const WS_XML_STRING*, const WS_XML_STRING*, WS_VALUE_TYPE, const void*, ULONG, ULONG, ULONG, WS_ERROR*);
1
0
0
0
Hans Leidekker : webservices: Avoid accessing the old user buffer in WsSetOutput/ToBuffer.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: e222e88ac423ebe4e1c89b8486c2ff3b2d73e2bc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e222e88ac423ebe4e1c89b84…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 15:04:45 2018 +0200 webservices: Avoid accessing the old user buffer in WsSetOutput/ToBuffer. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/writer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c index 9cba4e6..33c1be7 100644 --- a/dlls/webservices/writer.c +++ b/dlls/webservices/writer.c @@ -39,7 +39,7 @@ static const struct prop_desc writer_props[] = { { sizeof(ULONG), FALSE }, /* WS_XML_WRITER_PROPERTY_MAX_DEPTH */ { sizeof(BOOL), FALSE }, /* WS_XML_WRITER_PROPERTY_ALLOW_FRAGMENT */ - { sizeof(ULONG), FALSE }, /* WS_XML_READER_PROPERTY_MAX_ATTRIBUTES */ + { sizeof(ULONG), FALSE }, /* WS_XML_WRITER_PROPERTY_MAX_ATTRIBUTES */ { sizeof(BOOL), FALSE }, /* WS_XML_WRITER_PROPERTY_WRITE_DECLARATION */ { sizeof(ULONG), FALSE }, /* WS_XML_WRITER_PROPERTY_INDENT */ { sizeof(ULONG), FALSE }, /* WS_XML_WRITER_PROPERTY_BUFFER_TRIM_SIZE */ @@ -85,6 +85,7 @@ struct writer WS_CHARSET output_charset; WS_XML_WRITER_OUTPUT_TYPE output_type; struct xmlbuf *output_buf; + BOOL output_buf_user; WS_HEAP *output_heap; const WS_XML_DICTIONARY *dict; BOOL dict_do_lookup; @@ -332,7 +333,7 @@ HRESULT WINAPI WsGetWriterProperty( WS_XML_WRITER *handle, WS_XML_WRITER_PROPERT static void set_output_buffer( struct writer *writer, struct xmlbuf *xmlbuf ) { /* free current buffer if it's ours */ - if (writer->output_buf && writer->output_buf->heap == writer->output_heap) + if (writer->output_buf && !writer->output_buf_user) { free_xmlbuf( writer->output_buf ); } @@ -419,6 +420,7 @@ HRESULT WINAPI WsSetOutput( WS_XML_WRITER *handle, const WS_XML_WRITER_ENCODING goto done; } set_output_buffer( writer, xmlbuf ); + writer->output_buf_user = FALSE; break; } default: @@ -472,6 +474,7 @@ HRESULT WINAPI WsSetOutputToBuffer( WS_XML_WRITER *handle, WS_XML_BUFFER *buffer writer->output_enc = xmlbuf->encoding; writer->output_charset = xmlbuf->charset; set_output_buffer( writer, xmlbuf ); + writer->output_buf_user = TRUE; if (!(node = alloc_node( WS_XML_NODE_TYPE_BOF ))) hr = E_OUTOFMEMORY; else write_insert_bof( writer, node );
1
0
0
0
Hans Leidekker : webservices: Avoid a warning from HeapDestroy.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: ab2f25d40c4e72b8f156af43e615c028bd268db4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ab2f25d40c4e72b8f156af43…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Jun 20 15:04:44 2018 +0200 webservices: Avoid a warning from HeapDestroy. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/webservices/heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/webservices/heap.c b/dlls/webservices/heap.c index 5e1a273..e44cf72 100644 --- a/dlls/webservices/heap.c +++ b/dlls/webservices/heap.c @@ -216,7 +216,7 @@ HRESULT WINAPI WsCreateHeap( SIZE_T max_size, SIZE_T trim_size, const WS_HEAP_PR static void reset_heap( struct heap *heap ) { - HeapDestroy( heap->handle ); + if (heap->handle) HeapDestroy( heap->handle ); heap->handle = NULL; heap->max_size = heap->allocated = 0; }
1
0
0
0
Józef Kucia : wined3d: Call wined3d_cs_emit_update_sub_resource() directly in buffer_init().
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: bb535b1a2d5a9164353d7d89db18f05526050043 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bb535b1a2d5a9164353d7d89…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 19 17:15:01 2018 +0200 wined3d: Call wined3d_cs_emit_update_sub_resource() directly in buffer_init(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/buffer.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 4b14d68..181be6b 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1325,6 +1325,8 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_format *format = wined3d_get_format(gl_info, format_id, usage); + struct wined3d_resource *resource = &buffer->resource; + struct wined3d_box box; BOOL dynamic_buffer_ok; HRESULT hr; @@ -1346,7 +1348,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device return E_INVALIDARG; } - if (FAILED(hr = resource_init(&buffer->resource, device, WINED3D_RTYPE_BUFFER, format, WINED3D_MULTISAMPLE_NONE, + if (FAILED(hr = resource_init(resource, device, WINED3D_RTYPE_BUFFER, format, WINED3D_MULTISAMPLE_NONE, 0, usage, access, size, 1, 1, size, parent, parent_ops, &buffer_resource_ops))) { WARN("Failed to initialize resource, hr %#x.\n", hr); @@ -1386,7 +1388,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device { TRACE("Not creating a BO because the buffer is not GPU accessible.\n"); } - else if (!dynamic_buffer_ok && (buffer->resource.usage & WINED3DUSAGE_DYNAMIC)) + else if (!dynamic_buffer_ok && (resource->usage & WINED3DUSAGE_DYNAMIC)) { TRACE("Not creating a BO because the buffer has dynamic usage and no GL support.\n"); } @@ -1398,16 +1400,19 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device if (!(buffer->maps = heap_alloc(sizeof(*buffer->maps)))) { ERR("Out of memory.\n"); - buffer_unload(&buffer->resource); - resource_cleanup(&buffer->resource); - wined3d_resource_wait_idle(&buffer->resource); + buffer_unload(resource); + resource_cleanup(resource); + wined3d_resource_wait_idle(resource); return E_OUTOFMEMORY; } buffer->maps_size = 1; if (data) - wined3d_device_update_sub_resource(device, &buffer->resource, - 0, NULL, data->data, data->row_pitch, data->slice_pitch, 0); + { + wined3d_box_set(&box, 0, 0, resource->size, 1, 0, 1); + wined3d_cs_emit_update_sub_resource(device->cs, resource, + 0, &box, data->data, data->row_pitch, data->slice_pitch); + } return WINED3D_OK; }
1
0
0
0
Józef Kucia : wined3d: Use WINED3D_LOCATION_DISCARDED before initializing buffers with data.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: 537007525a8909a2295bd7cd123f0eb6ce1b77cb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=537007525a8909a2295bd7cd…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 19 17:15:00 2018 +0200 wined3d: Use WINED3D_LOCATION_DISCARDED before initializing buffers with data. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index e06d156..4b14d68 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1354,7 +1354,7 @@ static HRESULT buffer_init(struct wined3d_buffer *buffer, struct wined3d_device } buffer->buffer_type_hint = buffer_type_hint_from_bind_flags(gl_info, bind_flags); buffer->bind_flags = bind_flags; - buffer->locations = WINED3D_LOCATION_SYSMEM; + buffer->locations = data ? WINED3D_LOCATION_DISCARDED : WINED3D_LOCATION_SYSMEM; if (!wined3d_resource_allocate_sysmem(&buffer->resource)) return E_OUTOFMEMORY;
1
0
0
0
Józef Kucia : wined3d: Reduce nesting in texture2d_load_sysmem().
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: ec04b2e382208f39d64904d78a3b3bcedcae0bec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ec04b2e382208f39d64904d7…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 19 17:14:59 2018 +0200 wined3d: Reduce nesting in texture2d_load_sysmem(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 5217033..5502d05 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -198,7 +198,6 @@ static void texture2d_blt_fbo(const struct wined3d_device *device, struct wined3 else wined3d_texture_prepare_location(dst_texture, dst_sub_resource_idx, context, dst_location); - if (src_location == WINED3D_LOCATION_DRAWABLE) { required_texture = src_texture; @@ -1655,21 +1654,18 @@ BOOL texture2d_load_sysmem(struct wined3d_texture *texture, unsigned int sub_res WINED3D_LOCATION_RB_RESOLVED, dst_location); return TRUE; } - else - { - if (sub_resource->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)) - wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); - /* Download the sub-resource to system memory. */ - if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) - { - wined3d_texture_bind_and_dirtify(texture, context, - !(sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)); - texture2d_download_data(texture, sub_resource_idx, context, dst_location); - ++texture->download_count; + if (sub_resource->locations & (WINED3D_LOCATION_RB_MULTISAMPLE | WINED3D_LOCATION_RB_RESOLVED)) + wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); - return TRUE; - } + /* Download the sub-resource to system memory. */ + if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) + { + wined3d_texture_bind_and_dirtify(texture, context, + !(sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)); + texture2d_download_data(texture, sub_resource_idx, context, dst_location); + ++texture->download_count; + return TRUE; } if (!(texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
1
0
0
0
Józef Kucia : d3d9/tests: Add test for depth stencil initialization.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: 14678ce73f5c2d8932d7bb4610ad1fecfd9bfc3e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=14678ce73f5c2d8932d7bb46…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 19 17:14:58 2018 +0200 d3d9/tests: Add test for depth stencil initialization. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/visual.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 95982e0..b36c189 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -211,6 +211,34 @@ static DWORD getPixelColor(IDirect3DDevice9 *device, UINT x, UINT y) return ret; } +#define check_rt_color(a, b) check_rt_color_(__LINE__, a, b) +static void check_rt_color_(unsigned int line, IDirect3DSurface9 *rt, D3DCOLOR expected_color) +{ + struct surface_readback rb; + D3DSURFACE_DESC desc; + unsigned int x, y; + D3DCOLOR color; + HRESULT hr; + + hr = IDirect3DSurface9_GetDesc(rt, &desc); + ok_(__FILE__, line)(hr == S_OK, "Failed to get surface desc, hr %#x.\n", hr); + + get_rt_readback(rt, &rb); + for (y = 0; y < desc.Height; ++y) + { + for (x = 0; x < desc.Width; ++x) + { + color = get_readback_color(&rb, x, y) & 0x00ffffff; + if (color != expected_color) + break; + } + if (color != expected_color) + break; + } + release_surface_readback(&rb); + ok_(__FILE__, line)(color == 0x000000ff, "Got unexpected color 0x%08x.\n", color); +} + static IDirect3DDevice9 *create_device(IDirect3D9 *d3d, HWND device_window, HWND focus_window, BOOL windowed) { D3DPRESENT_PARAMETERS present_parameters = {0}; @@ -21406,6 +21434,92 @@ done: DestroyWindow(window); } +static void test_depth_stencil_init(void) +{ + IDirect3DDevice9 *device; + IDirect3DSurface9 *ds[2]; + IDirect3DSurface9 *rt; + IDirect3D9 *d3d; + ULONG refcount; + unsigned int i; + HWND window; + HRESULT hr; + + static const struct + { + struct vec3 position; + } + quad[] = + { + {{-1.0f, -1.0f, 0.0f}}, + {{-1.0f, 1.0f, 0.0f}}, + {{ 1.0f, -1.0f, 0.0f}}, + {{ 1.0f, 1.0f, 0.0f}}, + }; + + window = create_window(); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create D3D device.\n"); + goto done; + } + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == S_OK, "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_TRUE); + ok(hr == S_OK, "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_LESSEQUAL); + ok(hr == S_OK, "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); + ok(hr == S_OK, "Failed to set color op, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TFACTOR); + ok(hr == S_OK, "Failed to set color arg, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); + ok(hr == S_OK, "Failed to set FVF, hr %#x.\n", hr); + + hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 640, 480, D3DFMT_D24S8, 0, 0, FALSE, &ds[0], NULL); + ok(hr == S_OK, "Failed to create depth stencil surface, hr %#x.\n", hr); + hr = IDirect3DDevice9_GetDepthStencilSurface(device, &ds[1]); + ok(hr == S_OK, "Failed to get depth stencil surface, hr %#x.\n", hr); + + for (i = 0; i < ARRAY_SIZE(ds); ++i) + { + hr = IDirect3DDevice9_SetDepthStencilSurface(device, ds[i]); + ok(hr == S_OK, "Failed to set depth stencil surface, hr %#x.\n", hr); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); + ok(hr == S_OK, "Failed to clear, hr %#x.\n", hr); + + hr = IDirect3DDevice9_BeginScene(device); + ok(hr == S_OK, "Failed to begin scene, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x000000ff); + ok(hr == S_OK, "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(hr == S_OK, "Failed to draw, hr %#x.\n", hr); + hr = IDirect3DDevice9_EndScene(device); + ok(hr == S_OK, "Failed to end scene, hr %#x.\n", hr); + + hr = IDirect3DDevice9_GetRenderTarget(device, 0, &rt); + ok(hr == S_OK, "Failed to get render target, hr %#x.\n", hr); + check_rt_color(rt, 0x000000ff); + IDirect3DSurface9_Release(rt); + + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "Failed to present, hr %#x.\n", hr); + + IDirect3DSurface9_Release(ds[i]); + } + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + static void test_texture_blending(void) { #define STATE_END() {0xffffffff, 0xffffffff} @@ -24037,6 +24151,7 @@ START_TEST(visual) test_flip(); test_uninitialized_varyings(); test_multisample_init(); + test_depth_stencil_init(); test_texture_blending(); test_color_clamping(); test_line_antialiasing_blending();
1
0
0
0
Józef Kucia : wined3d: Initialize depth/ stencil texture data.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: 5836b957e55c6ec3f720e995bb8a01ec295d7d38 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5836b957e55c6ec3f720e995…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 19 17:14:57 2018 +0200 wined3d: Initialize depth/stencil texture data. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 91c703c..c316906 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -2802,8 +2802,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc if (wined3d_texture_use_pbo(texture, gl_info)) texture->resource.map_binding = WINED3D_LOCATION_BUFFER; - if ((desc->resource_type != WINED3D_RTYPE_TEXTURE_3D - && !(texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)) + if (desc->resource_type != WINED3D_RTYPE_TEXTURE_3D || !wined3d_texture_use_pbo(texture, gl_info)) { if (!wined3d_resource_allocate_sysmem(&texture->resource)) @@ -2842,8 +2841,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc sub_resource = &texture->sub_resources[i]; sub_resource->locations = WINED3D_LOCATION_DISCARDED; - if (desc->resource_type != WINED3D_RTYPE_TEXTURE_3D - && !(texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)) + if (desc->resource_type != WINED3D_RTYPE_TEXTURE_3D) { wined3d_texture_validate_location(texture, i, WINED3D_LOCATION_SYSMEM); wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_SYSMEM);
1
0
0
0
Józef Kucia : d3d11: Introduce get_resource_properties() helper function.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: e3d485359d1a7c99180ea17e01592d43b3a5cce0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e3d485359d1a7c99180ea17e…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 19 17:14:56 2018 +0200 d3d11: Introduce get_resource_properties() helper function. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/view.c | 259 +++++++++++++++++++----------------------------------- 1 file changed, 90 insertions(+), 169 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e3d485359d1a7c99180e…
1
0
0
0
Zebediah Figura : winedbg: Provide a more helpful error message when unable to attach to a process.
by Alexandre Julliard
20 Jun '18
20 Jun '18
Module: wine Branch: master Commit: dc1f45b3aee00bda078aae686c32d772a36e00cf URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dc1f45b3aee00bda078aae68…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Tue Jun 19 14:04:52 2018 -0500 winedbg: Provide a more helpful error message when unable to attach to a process. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ar.po | 40 +++++++++++++++++++--------------------- po/bg.po | 38 ++++++++++++++++++-------------------- po/ca.po | 40 +++++++++++++++++++--------------------- po/cs.po | 40 +++++++++++++++++++--------------------- po/da.po | 40 +++++++++++++++++++--------------------- po/de.po | 40 +++++++++++++++++++--------------------- po/el.po | 38 ++++++++++++++++++-------------------- po/en.po | 42 +++++++++++++++++++++--------------------- po/en_US.po | 42 +++++++++++++++++++++--------------------- po/eo.po | 38 ++++++++++++++++++-------------------- po/es.po | 40 +++++++++++++++++++--------------------- po/fa.po | 38 ++++++++++++++++++-------------------- po/fi.po | 40 +++++++++++++++++++--------------------- po/fr.po | 40 +++++++++++++++++++--------------------- po/he.po | 38 ++++++++++++++++++-------------------- po/hi.po | 38 ++++++++++++++++++-------------------- po/hr.po | 40 +++++++++++++++++++--------------------- po/hu.po | 40 +++++++++++++++++++--------------------- po/it.po | 40 +++++++++++++++++++--------------------- po/ja.po | 40 +++++++++++++++++++--------------------- po/ko.po | 40 +++++++++++++++++++--------------------- po/lt.po | 40 +++++++++++++++++++--------------------- po/ml.po | 38 ++++++++++++++++++-------------------- po/nb_NO.po | 40 +++++++++++++++++++--------------------- po/nl.po | 40 +++++++++++++++++++--------------------- po/or.po | 38 ++++++++++++++++++-------------------- po/pa.po | 38 ++++++++++++++++++-------------------- po/pl.po | 40 +++++++++++++++++++--------------------- po/pt_BR.po | 40 +++++++++++++++++++--------------------- po/pt_PT.po | 40 +++++++++++++++++++--------------------- po/rm.po | 38 ++++++++++++++++++-------------------- po/ro.po | 40 +++++++++++++++++++--------------------- po/ru.po | 40 +++++++++++++++++++--------------------- po/sk.po | 38 ++++++++++++++++++-------------------- po/sl.po | 40 +++++++++++++++++++--------------------- po/sr_RS(a)cyrillic.po | 40 +++++++++++++++++++--------------------- po/sr_RS(a)latin.po | 40 +++++++++++++++++++--------------------- po/sv.po | 40 +++++++++++++++++++--------------------- po/te.po | 38 ++++++++++++++++++-------------------- po/th.po | 38 ++++++++++++++++++-------------------- po/tr.po | 40 +++++++++++++++++++--------------------- po/uk.po | 40 +++++++++++++++++++--------------------- po/wa.po | 38 ++++++++++++++++++-------------------- po/wine.pot | 38 ++++++++++++++++++-------------------- po/zh_CN.po | 40 +++++++++++++++++++--------------------- po/zh_TW.po | 40 +++++++++++++++++++--------------------- programs/winedbg/winedbg.rc | 5 +++-- 47 files changed, 866 insertions(+), 953 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=dc1f45b3aee00bda078a…
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
63
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
Results per page:
10
25
50
100
200