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 2017
----- 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
717 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Added support for oblique simulation in bitmap rendering mode.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: 2175cdc3060e63411f3a8cf7ac43a3c43a29e5c8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2175cdc3060e63411f3a8cf7a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 13 20:44:09 2017 +0300 dwrite: Added support for oblique simulation in bitmap rendering mode. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/freetype.c | 68 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/dlls/dwrite/freetype.c b/dlls/dwrite/freetype.c index 596e8a5..35a7ebf 100644 --- a/dlls/dwrite/freetype.c +++ b/dlls/dwrite/freetype.c @@ -74,6 +74,7 @@ MAKE_FUNCPTR(FT_Glyph_Transform); MAKE_FUNCPTR(FT_Init_FreeType); MAKE_FUNCPTR(FT_Library_Version); MAKE_FUNCPTR(FT_Load_Glyph); +MAKE_FUNCPTR(FT_Matrix_Multiply); MAKE_FUNCPTR(FT_New_Memory_Face); MAKE_FUNCPTR(FT_Outline_Copy); MAKE_FUNCPTR(FT_Outline_Decompose); @@ -194,6 +195,7 @@ BOOL init_freetype(void) LOAD_FUNCPTR(FT_Init_FreeType) LOAD_FUNCPTR(FT_Library_Version) LOAD_FUNCPTR(FT_Load_Glyph) + LOAD_FUNCPTR(FT_Matrix_Multiply) LOAD_FUNCPTR(FT_New_Memory_Face) LOAD_FUNCPTR(FT_Outline_Copy) LOAD_FUNCPTR(FT_Outline_Decompose) @@ -596,35 +598,61 @@ static BOOL is_face_scalable(IDWriteFontFace4 *fontface) return FALSE; } +static BOOL get_glyph_transform(struct dwrite_glyphbitmap *bitmap, FT_Matrix *ret) +{ + USHORT simulations = IDWriteFontFace4_GetSimulations(bitmap->fontface); + FT_Matrix m; + + ret->xx = 1 << 16; + ret->xy = 0; + ret->yx = 0; + ret->yy = 1 << 16; + + /* Some fonts provide mostly bitmaps and very few outlines, for example for .notdef. + Disable transform if that's the case. */ + if (!(is_face_scalable(bitmap->fontface) && (bitmap->m || + (simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE)))) + return FALSE; + + if (simulations & DWRITE_FONT_SIMULATIONS_OBLIQUE) { + m.xx = 1 << 16; + m.xy = (1 << 16) / 3; + m.yx = 0; + m.yy = 1 << 16; + pFT_Matrix_Multiply(&m, ret); + } + + if (bitmap->m) { + ft_matrix_from_dwrite_matrix(bitmap->m, &m); + pFT_Matrix_Multiply(&m, ret); + } + + return TRUE; +} + void freetype_get_glyph_bbox(struct dwrite_glyphbitmap *bitmap) { FTC_ImageTypeRec imagetype; FT_BBox bbox = { 0 }; + BOOL needs_transform; FT_Glyph glyph; + FT_Matrix m; EnterCriticalSection(&freetype_cs); - /* Some fonts provide mostly bitmaps and very few outlines, for example for .notdef, - disable transform if that's the case. */ - if (bitmap->m) { - if (!is_face_scalable(bitmap->fontface)) - bitmap->m = NULL; - } + needs_transform = get_glyph_transform(bitmap, &m); imagetype.face_id = bitmap->fontface; imagetype.width = 0; imagetype.height = bitmap->emsize; - imagetype.flags = bitmap->m ? FT_LOAD_NO_BITMAP : FT_LOAD_DEFAULT; + imagetype.flags = needs_transform ? FT_LOAD_NO_BITMAP : FT_LOAD_DEFAULT; if (pFTC_ImageCache_Lookup(image_cache, &imagetype, bitmap->index, &glyph, NULL) == 0) { - if (bitmap->m) { + if (needs_transform) { FT_Glyph glyph_copy; if (pFT_Glyph_Copy(glyph, &glyph_copy) == 0) { - FT_Matrix ft_matrix; - - ft_matrix_from_dwrite_matrix(bitmap->m, &ft_matrix); - pFT_Glyph_Transform(glyph_copy, &ft_matrix, NULL); + pFT_Glyph_Transform(glyph_copy, &m, NULL); pFT_Glyph_Get_CBox(glyph_copy, FT_GLYPH_BBOX_PIXELS, &bbox); pFT_Done_Glyph(glyph_copy); } @@ -759,30 +787,26 @@ static BOOL freetype_get_aa_glyph_bitmap(struct dwrite_glyphbitmap *bitmap, FT_G BOOL freetype_get_glyph_bitmap(struct dwrite_glyphbitmap *bitmap) { FTC_ImageTypeRec imagetype; + BOOL needs_transform; BOOL ret = FALSE; FT_Glyph glyph; + FT_Matrix m; EnterCriticalSection(&freetype_cs); - if (bitmap->m) { - if (!is_face_scalable(bitmap->fontface)) - bitmap->m = NULL; - } + needs_transform = get_glyph_transform(bitmap, &m); imagetype.face_id = bitmap->fontface; imagetype.width = 0; imagetype.height = bitmap->emsize; - imagetype.flags = bitmap->m ? FT_LOAD_NO_BITMAP : FT_LOAD_DEFAULT; + imagetype.flags = needs_transform ? FT_LOAD_NO_BITMAP : FT_LOAD_DEFAULT; if (pFTC_ImageCache_Lookup(image_cache, &imagetype, bitmap->index, &glyph, NULL) == 0) { FT_Glyph glyph_copy; - if (bitmap->m) { + if (needs_transform) { if (pFT_Glyph_Copy(glyph, &glyph_copy) == 0) { - FT_Matrix ft_matrix; - - ft_matrix_from_dwrite_matrix(bitmap->m, &ft_matrix); - pFT_Glyph_Transform(glyph_copy, &ft_matrix, NULL); + pFT_Glyph_Transform(glyph_copy, &m, NULL); glyph = glyph_copy; } }
1
0
0
0
Jacek Caban : wininet: Get rid of no longer needed get_avail_data from data stream implementations.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: 2952c637e34916e64402c56b8fa9bb5eb6cd586c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2952c637e34916e64402c56b8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 13 14:47:32 2017 +0100 wininet: Get rid of no longer needed get_avail_data from data stream implementations. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wininet/http.c | 42 ------------------------------------------ dlls/wininet/internet.h | 1 - dlls/wininet/netconnection.c | 26 -------------------------- 3 files changed, 69 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 40f91fb..fd58b1f 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -381,7 +381,6 @@ static WCHAR *get_host_header( http_request_t *req ) } struct data_stream_vtbl_t { - DWORD (*get_avail_data)(data_stream_t*,http_request_t*); BOOL (*end_of_data)(data_stream_t*,http_request_t*); DWORD (*read)(data_stream_t*,http_request_t*,BYTE*,DWORD,DWORD*,BOOL); BOOL (*drain_content)(data_stream_t*,http_request_t*); @@ -440,12 +439,6 @@ typedef struct { BOOL end_of_data; } gzip_stream_t; -static DWORD gzip_get_avail_data(data_stream_t *stream, http_request_t *req) -{ - /* Allow reading only from read buffer */ - return 0; -} - static BOOL gzip_end_of_data(data_stream_t *stream, http_request_t *req) { gzip_stream_t *gzip_stream = (gzip_stream_t*)stream; @@ -534,7 +527,6 @@ static void gzip_destroy(data_stream_t *stream) } static const data_stream_vtbl_t gzip_stream_vtbl = { - gzip_get_avail_data, gzip_end_of_data, gzip_read, gzip_drain_content, @@ -2614,18 +2606,6 @@ static DWORD refill_read_buffer(http_request_t *req, BOOL allow_blocking, DWORD return res; } -static DWORD netconn_get_avail_data(data_stream_t *stream, http_request_t *req) -{ - netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; - DWORD avail = 0; - - if(is_valid_netconn(req->netconn)) - NETCON_query_data_available(req->netconn, &avail); - return netconn_stream->content_length == ~0u - ? avail - : min(avail, netconn_stream->content_length-netconn_stream->content_read); -} - static BOOL netconn_end_of_data(data_stream_t *stream, http_request_t *req) { netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; @@ -2682,7 +2662,6 @@ static void netconn_destroy(data_stream_t *stream) } static const data_stream_vtbl_t netconn_stream_vtbl = { - netconn_get_avail_data, netconn_end_of_data, netconn_read, netconn_drain_content, @@ -2839,26 +2818,6 @@ static DWORD chunked_read(data_stream_t *stream, http_request_t *req, BYTE *buf, return ERROR_SUCCESS; } -static DWORD chunked_get_avail_data(data_stream_t *stream, http_request_t *req) -{ - chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; - DWORD avail = 0; - - if(chunked_stream->state != CHUNKED_STREAM_STATE_READING_CHUNK) { - DWORD res, read; - - /* try to process to the next chunk */ - res = chunked_read(stream, req, NULL, 0, &read, FALSE); - if(res != ERROR_SUCCESS || chunked_stream->state != CHUNKED_STREAM_STATE_READING_CHUNK) - return 0; - } - - if(is_valid_netconn(req->netconn) && chunked_stream->buf_size < chunked_stream->chunk_size) - NETCON_query_data_available(req->netconn, &avail); - - return min(avail + chunked_stream->buf_size, chunked_stream->chunk_size); -} - static BOOL chunked_drain_content(data_stream_t *stream, http_request_t *req) { chunked_stream_t *chunked_stream = (chunked_stream_t*)stream; @@ -2872,7 +2831,6 @@ static void chunked_destroy(data_stream_t *stream) } static const data_stream_vtbl_t chunked_stream_vtbl = { - chunked_get_avail_data, chunked_end_of_data, chunked_read, chunked_drain_content, diff --git a/dlls/wininet/internet.h b/dlls/wininet/internet.h index 6a49bf1..4cd1856 100644 --- a/dlls/wininet/internet.h +++ b/dlls/wininet/internet.h @@ -454,7 +454,6 @@ DWORD NETCON_secure_connect(netconn_t*,server_t*) DECLSPEC_HIDDEN; DWORD NETCON_send(netconn_t *connection, const void *msg, size_t len, int flags, int *sent /* out */) DECLSPEC_HIDDEN; DWORD NETCON_recv(netconn_t*,void*,size_t,BOOL,int*) DECLSPEC_HIDDEN; -BOOL NETCON_query_data_available(netconn_t *connection, DWORD *available) DECLSPEC_HIDDEN; BOOL NETCON_is_alive(netconn_t*) DECLSPEC_HIDDEN; LPCVOID NETCON_GetCert(netconn_t *connection) DECLSPEC_HIDDEN; int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN; diff --git a/dlls/wininet/netconnection.c b/dlls/wininet/netconnection.c index 63b84aa..bab046f 100644 --- a/dlls/wininet/netconnection.c +++ b/dlls/wininet/netconnection.c @@ -869,32 +869,6 @@ DWORD NETCON_recv(netconn_t *connection, void *buf, size_t len, BOOL blocking, i } } -/****************************************************************************** - * NETCON_query_data_available - * Returns the number of bytes of peeked data plus the number of bytes of - * queued, but unread data. - */ -BOOL NETCON_query_data_available(netconn_t *connection, DWORD *available) -{ - *available = 0; - - if(!connection->secure) - { - ULONG unread; - int retval = ioctlsocket(connection->socket, FIONREAD, &unread); - if (!retval) - { - TRACE("%d bytes of queued, but unread data\n", unread); - *available += unread; - } - } - else - { - *available = connection->peek_len; - } - return TRUE; -} - BOOL NETCON_is_alive(netconn_t *netconn) { int len;
1
0
0
0
Jacek Caban : wininet: Always use non-blocking reads in HTTP_ReceiveRequestData.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: 295291b4be81b01693f494be3b1f8a3370263f7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=295291b4be81b01693f494be3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Mar 13 14:47:19 2017 +0100 wininet: Always use non-blocking reads in HTTP_ReceiveRequestData. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wininet/http.c | 38 +++++++------------------------------- dlls/wininet/tests/http.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 31 deletions(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index 78ee9b1..40f91fb 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2614,21 +2614,6 @@ static DWORD refill_read_buffer(http_request_t *req, BOOL allow_blocking, DWORD return res; } -/* return the size of data available to be read immediately (the read section must be held) */ -static DWORD get_avail_data( http_request_t *req ) -{ - DWORD avail = req->read_size; - - /* - * Different Windows versions have different limits of returned data, but all - * of them return no more than centrain amount. We use READ_BUFFER_SIZE as a limit. - */ - if(avail < READ_BUFFER_SIZE) - avail += req->data_stream->vtbl->get_avail_data(req->data_stream, req); - - return min(avail, READ_BUFFER_SIZE); -} - static DWORD netconn_get_avail_data(data_stream_t *stream, http_request_t *req) { netconn_stream_t *netconn_stream = (netconn_stream_t*)stream; @@ -2978,21 +2963,17 @@ static void send_request_complete(http_request_t *req, DWORD_PTR result, DWORD e sizeof(INTERNET_ASYNC_RESULT)); } -static void HTTP_ReceiveRequestData(http_request_t *req, BOOL first_notif, DWORD *ret_size) +static void HTTP_ReceiveRequestData(http_request_t *req) { - DWORD res, read = 0, avail = 0; - BOOL allow_blocking; + DWORD res, read = 0; TRACE("%p\n", req); EnterCriticalSection( &req->read_section ); - allow_blocking = !first_notif || !req->read_size; - res = refill_read_buffer(req, allow_blocking, &read); - if(res == ERROR_SUCCESS) { - avail = get_avail_data(req); + res = refill_read_buffer(req, FALSE, &read); + if(res == ERROR_SUCCESS) read += req->read_size; - } LeaveCriticalSection( &req->read_section ); @@ -3006,12 +2987,7 @@ static void HTTP_ReceiveRequestData(http_request_t *req, BOOL first_notif, DWORD return; } - if(ret_size) - *ret_size = avail; - if(first_notif) - avail = 0; - - send_request_complete(req, req->session->hdr.dwInternalFlags & INET_OPENURL ? (DWORD_PTR)req->hdr.hInternet : 1, avail); + send_request_complete(req, req->session->hdr.dwInternalFlags & INET_OPENURL ? (DWORD_PTR)req->hdr.hInternet : 1, 0); } /* read data from the http connection (the read section must be held) */ @@ -5202,7 +5178,7 @@ lend: { if (res == ERROR_SUCCESS) { if(bEndRequest && request->contentLength && request->bytesWritten == request->bytesToWrite) - HTTP_ReceiveRequestData(request, TRUE, NULL); + HTTP_ReceiveRequestData(request); else send_request_complete(request, request->session->hdr.dwInternalFlags & INET_OPENURL ? (DWORD_PTR)request->hdr.hInternet : 1, 0); @@ -5309,7 +5285,7 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_ create_cache_entry(request); if (res == ERROR_SUCCESS && request->contentLength) - HTTP_ReceiveRequestData(request, TRUE, NULL); + HTTP_ReceiveRequestData(request); else send_request_complete(request, res == ERROR_SUCCESS, res); diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c index b8f4297..441a782 100644 --- a/dlls/wininet/tests/http.c +++ b/dlls/wininet/tests/http.c @@ -4995,6 +4995,21 @@ static void test_http_read(int port) close_async_handle(req.session, hCompleteEvent, 2); + open_read_test_request(port, &req, + "HTTP/1.1 200 OK\r\n" + "Server: winetest\r\n" + "Connection: close\r\n" + "\r\n"); + readex_expect_async(req.request, IRF_NO_WAIT, &ib, sizeof(buf), NULL); + send_response_ex_and_wait("123", TRUE, &ib, NULL, 0, 3); + readex_expect_sync_data(req.request, IRF_NO_WAIT, &ib, sizeof(buf), "123", 0); + + SET_EXPECT(INTERNET_STATUS_CLOSING_CONNECTION); + SET_EXPECT(INTERNET_STATUS_CONNECTION_CLOSED); + close_async_handle(req.session, hCompleteEvent, 2); + CHECK_NOTIFIED(INTERNET_STATUS_CLOSING_CONNECTION); + CHECK_NOTIFIED(INTERNET_STATUS_CONNECTION_CLOSED); + trace("Testing InternetQueryDataAvailable...\n"); open_read_test_request(port, &req,
1
0
0
0
Józef Kucia : wined3d: Introduce shader_glsl_load_program_resources() helper function.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: 23d28c451b5a425d395d15e48656f68e86968974 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23d28c451b5a425d395d15e48…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Mar 13 11:57:22 2017 +0100 wined3d: Introduce shader_glsl_load_program_resources() 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/wined3d/glsl_shader.c | 114 ++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 54 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=23d28c451b5a425d395d1…
1
0
0
0
Józef Kucia : wined3d: Move legacy texture image unit range allocation to wined3d_gl_limits_get_texture_unit_range ().
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: d89ee7aaaafb46c0e0067085b27b50c65a12fc94 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d89ee7aaaafb46c0e0067085b…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Mar 13 11:57:21 2017 +0100 wined3d: Move legacy texture image unit range allocation to wined3d_gl_limits_get_texture_unit_range(). 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/context.c | 18 ++++-------------- dlls/wined3d/glsl_shader.c | 23 +++++------------------ dlls/wined3d/utils.c | 24 +++++++++++++++++++++++- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index a423fac..8059461 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3385,23 +3385,13 @@ static void context_bind_shader_resources(struct wined3d_context *context, static void context_bind_graphics_shader_resources(struct wined3d_context *context, const struct wined3d_state *state) { - unsigned int i; + unsigned int i, base_idx, count; - static const struct + for (i = 0; i < WINED3D_SHADER_TYPE_GRAPHICS_COUNT; ++i) { - enum wined3d_shader_type type; - unsigned int base_idx; - unsigned int count; + wined3d_gl_limits_get_texture_unit_range(&context->gl_info->limits, i, &base_idx, &count); + context_bind_shader_resources(context, state, i, base_idx, count); } - shader_types[] = - { - {WINED3D_SHADER_TYPE_PIXEL, 0, MAX_FRAGMENT_SAMPLERS}, - {WINED3D_SHADER_TYPE_VERTEX, MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS}, - }; - - for (i = 0; i < ARRAY_SIZE(shader_types); ++i) - context_bind_shader_resources(context, state, shader_types[i].type, - shader_types[i].base_idx, shader_types[i].count); } static void context_load_unordered_access_resources(struct wined3d_context *context, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 16cf6b0..f82d861 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -592,26 +592,13 @@ static void shader_glsl_load_samplers(const struct wined3d_gl_info *gl_info, static void shader_glsl_load_graphics_samplers(const struct wined3d_gl_info *gl_info, struct shader_glsl_priv *priv, const DWORD *tex_unit_map, GLuint program_id) { - const char *prefix; - unsigned int i; - - static const struct - { - enum wined3d_shader_type type; - unsigned int base_idx; - unsigned int count; - } - sampler_info[] = - { - {WINED3D_SHADER_TYPE_PIXEL, 0, MAX_FRAGMENT_SAMPLERS}, - {WINED3D_SHADER_TYPE_VERTEX, MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS}, - }; + unsigned int i, base_idx, count; - for (i = 0; i < ARRAY_SIZE(sampler_info); ++i) + for (i = 0; i < WINED3D_SHADER_TYPE_GRAPHICS_COUNT; ++i) { - prefix = shader_glsl_get_prefix(sampler_info[i].type); - shader_glsl_load_samplers(gl_info, priv, prefix, - sampler_info[i].base_idx, sampler_info[i].count, tex_unit_map, program_id); + wined3d_gl_limits_get_texture_unit_range(&gl_info->limits, i, &base_idx, &count); + shader_glsl_load_samplers(gl_info, priv, shader_glsl_get_prefix(i), + base_idx, count, tex_unit_map, program_id); } } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 04317f1..b1cda46 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -5994,10 +5994,32 @@ void wined3d_gl_limits_get_uniform_block_range(const struct wined3d_gl_limits *g void wined3d_gl_limits_get_texture_unit_range(const struct wined3d_gl_limits *gl_limits, enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count) { + static const struct + { + enum wined3d_shader_type type; + unsigned int base_idx; + unsigned int count; + } + legacy_sampler_info[] = + { + {WINED3D_SHADER_TYPE_PIXEL, 0, MAX_FRAGMENT_SAMPLERS}, + {WINED3D_SHADER_TYPE_VERTEX, MAX_FRAGMENT_SAMPLERS, MAX_VERTEX_SAMPLERS}, + }; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(legacy_sampler_info); ++i) + { + if (legacy_sampler_info[i].type == shader_type) + { + *base = legacy_sampler_info[i].base_idx; + *count = legacy_sampler_info[i].count; + return; + } + } + if (shader_type != WINED3D_SHADER_TYPE_COMPUTE) { *base = *count = 0; - ERR("Unhandled shader type %#x.\n", shader_type); return; }
1
0
0
0
Józef Kucia : wined3d: Get rid of incorrect usage of "tex_unit_map".
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: 806479e432db28c887dfb96f5a09740efe2b7c77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=806479e432db28c887dfb96f5…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Mar 13 11:57:20 2017 +0100 wined3d: Get rid of incorrect usage of "tex_unit_map". 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/state.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index b73f4a8..51257f0 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3489,7 +3489,9 @@ static void sampler_texmatrix(struct wined3d_context *context, const struct wine TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); - if(!texture) return; + if (!texture) + return; + /* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates * wined3d_texture_apply_state_changes() multiplies the set matrix with a fixup matrix. Before the * scaling is reapplied or removed, the texture matrix has to be reapplied @@ -3499,17 +3501,16 @@ static void sampler_texmatrix(struct wined3d_context *context, const struct wine */ if (sampler < MAX_TEXTURES) { - const BOOL texIsPow2 = !(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT); + const BOOL tex_is_pow2 = !(texture->flags & WINED3D_TEXTURE_POW2_MAT_IDENT); - if (texIsPow2 || (context->lastWasPow2Texture & (1u << sampler))) + if (tex_is_pow2 || (context->lastWasPow2Texture & (1u << sampler))) { - if (texIsPow2) + if (tex_is_pow2) context->lastWasPow2Texture |= 1u << sampler; else context->lastWasPow2Texture &= ~(1u << sampler); - transform_texture(context, state, - STATE_TEXTURESTAGE(context->tex_unit_map[sampler], WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS)); + transform_texture(context, state, STATE_TEXTURESTAGE(sampler, WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS)); } } }
1
0
0
0
Józef Kucia : wined3d: Simplify computation of " num_textures_used" in ATI fragment pipeline.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: f2af535c0598ce036a168646c08fff0b2828004b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2af535c0598ce036a168646c…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Mar 13 11:57:19 2017 +0100 wined3d: Simplify computation of "num_textures_used" in ATI fragment pipeline. 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/ati_fragment_shader.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 341bd9b..c9af8e7 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1024,7 +1024,8 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined gen_ffp_frag_op(context, state, &settings, TRUE); desc = (const struct atifs_ffp_desc *)find_ffp_frag_shader(&priv->fragment_shaders, &settings); - if(!desc) { + if (!desc) + { struct atifs_ffp_desc *new_desc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*new_desc)); if (!new_desc) { @@ -1036,13 +1037,13 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined { if (settings.op[i].cop == WINED3D_TOP_DISABLE) break; - new_desc->num_textures_used = i + 1; + ++new_desc->num_textures_used; } new_desc->parent.settings = settings; new_desc->shader = gen_ati_shader(settings.op, gl_info, new_desc->constants); add_ffp_frag_shader(&priv->fragment_shaders, &new_desc->parent); - TRACE("Allocated fixed function replacement shader descriptor %p\n", new_desc); + TRACE("Allocated fixed function replacement shader descriptor %p.\n", new_desc); desc = new_desc; }
1
0
0
0
Nikolay Sivov : xmllite/reader: Reset reader nesting depth on error.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: 876de4a73d62cfb5e2806a8dfdff76d5c48a0614 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=876de4a73d62cfb5e2806a8df…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 13 12:27:55 2017 +0300 xmllite/reader: Reset reader nesting depth on error. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/reader.c | 1 + dlls/xmllite/tests/reader.c | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index 6379b70..41a6fb8 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -2847,6 +2847,7 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *nodetype) { This->state = XmlReadState_Error; This->nodetype = XmlNodeType_None; + This->depth = 0; This->error = hr; } } diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index d225ab3..8660bb8 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -2402,7 +2402,6 @@ static void test_max_element_depth(void) hr = IXmlReader_Read(reader, NULL); ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); -todo_wine TEST_DEPTH2(reader, 0, 2); TEST_READER_STATE(reader, XmlReadState_Error); @@ -2412,7 +2411,6 @@ todo_wine hr = IXmlReader_Read(reader, NULL); ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); -todo_wine TEST_DEPTH2(reader, 0, 2); TEST_READER_STATE(reader, XmlReadState_Error); IStream_Release(stream); @@ -2454,7 +2452,6 @@ todo_wine ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype); -todo_wine TEST_DEPTH2(reader, 0, 2); TEST_READER_STATE(reader, XmlReadState_Error);
1
0
0
0
Nikolay Sivov : xmllite/reader: Enter error state on parsing error.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: ec9e05c27cd14b148ac63ed0dde11615e3a1ccac URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ec9e05c27cd14b148ac63ed0d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 13 12:27:54 2017 +0300 xmllite/reader: Enter error state on parsing error. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xmllite/reader.c | 31 +++++++++++++++++++++++++------ dlls/xmllite/tests/reader.c | 23 +++++++++++++++-------- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index b5088e8..6379b70 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -264,6 +264,7 @@ typedef struct xmlreaderinput *input; IMalloc *imalloc; XmlReadState state; + HRESULT error; /* error set on XmlReadState_Error */ XmlReaderInternalState instate; XmlReaderResumeState resumestate; XmlNodeType nodetype; @@ -2821,19 +2822,37 @@ static HRESULT WINAPI xmlreader_Read(IXmlReader* iface, XmlNodeType *nodetype) { xmlreader *This = impl_from_IXmlReader(iface); XmlNodeType oldtype = This->nodetype; + XmlNodeType type; HRESULT hr; TRACE("(%p)->(%p)\n", This, nodetype); - if (This->state == XmlReadState_Closed) return S_FALSE; + if (!nodetype) + nodetype = &type; - hr = reader_parse_nextnode(This); - if (oldtype == XmlNodeType_None && This->nodetype != oldtype) - This->state = XmlReadState_Interactive; + switch (This->state) + { + case XmlReadState_Closed: + hr = S_FALSE; + break; + case XmlReadState_Error: + hr = This->error; + break; + default: + hr = reader_parse_nextnode(This); + if (SUCCEEDED(hr) && oldtype == XmlNodeType_None && This->nodetype != oldtype) + This->state = XmlReadState_Interactive; + + if (FAILED(hr)) + { + This->state = XmlReadState_Error; + This->nodetype = XmlNodeType_None; + This->error = hr; + } + } TRACE("node type %s\n", debugstr_nodetype(This->nodetype)); - if (nodetype) - *nodetype = This->nodetype; + *nodetype = This->nodetype; return hr; } diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c index e66b9e4..d225ab3 100644 --- a/dlls/xmllite/tests/reader.c +++ b/dlls/xmllite/tests/reader.c @@ -1559,8 +1559,8 @@ static void test_read_element(void) type = XmlNodeType_Element; hr = IXmlReader_Read(reader, &type); ok(hr == WC_E_ELEMENTMATCH, "got %08x\n", hr); -todo_wine ok(type == XmlNodeType_None, "got %d\n", type); + TEST_READER_STATE(reader, XmlReadState_Error); IStream_Release(stream); @@ -2369,6 +2369,7 @@ static void test_max_element_depth(void) "</c>" "</b>" "</a>"; + XmlNodeType nodetype; unsigned int count; IXmlReader *reader; IStream *stream; @@ -2401,20 +2402,19 @@ static void test_max_element_depth(void) hr = IXmlReader_Read(reader, NULL); ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); -todo_wine { +todo_wine TEST_DEPTH2(reader, 0, 2); TEST_READER_STATE(reader, XmlReadState_Error); -} + hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 10); ok(hr == S_OK, "got %08x\n", hr); hr = IXmlReader_Read(reader, NULL); -todo_wine { ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); +todo_wine TEST_DEPTH2(reader, 0, 2); TEST_READER_STATE(reader, XmlReadState_Error); -} IStream_Release(stream); /* test if stepping into attributes enforces depth limit too */ @@ -2444,13 +2444,20 @@ todo_wine { TEST_DEPTH(reader, 2); TEST_READER_STATE(reader, XmlReadState_Interactive); - hr = IXmlReader_Read(reader, NULL); + nodetype = 123; + hr = IXmlReader_Read(reader, &nodetype); ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); + ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype); -todo_wine { + nodetype = 123; + hr = IXmlReader_Read(reader, &nodetype); + ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr); + ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype); + +todo_wine TEST_DEPTH2(reader, 0, 2); TEST_READER_STATE(reader, XmlReadState_Error); -} + IStream_Release(stream); /* set max depth to 0, this disables depth limit */
1
0
0
0
Nikolay Sivov : comdlg32: Take nMaxFile into account when converting A->W.
by Alexandre Julliard
13 Mar '17
13 Mar '17
Module: wine Branch: master Commit: a44a6083784e6b78ef636e73548321cef06b381a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a44a6083784e6b78ef636e735…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Mar 12 21:18:40 2017 +0300 comdlg32: Take nMaxFile into account when converting A->W. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comdlg32/filedlg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 0c9f34a..305ac62 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -383,18 +383,26 @@ static void init_filedlg_infoW(OPENFILENAMEW *ofn, FileOpenDlgInfos *info) static void init_filedlg_infoA(OPENFILENAMEA *ofn, FileOpenDlgInfos *info) { OPENFILENAMEW ofnW; + int len; ofnW = *(OPENFILENAMEW *)ofn; ofnW.lpstrInitialDir = heap_strdupAtoW(ofn->lpstrInitialDir); - ofnW.lpstrFile = heap_strdupAtoW(ofn->lpstrFile); ofnW.lpstrDefExt = heap_strdupAtoW(ofn->lpstrDefExt); ofnW.lpstrTitle = heap_strdupAtoW(ofn->lpstrTitle); + if (ofn->lpstrFile) + { + len = MultiByteToWideChar(CP_ACP, 0, ofn->lpstrFile, ofn->nMaxFile, NULL, 0); + ofnW.lpstrFile = MemAlloc(len * sizeof(WCHAR)); + MultiByteToWideChar(CP_ACP, 0, ofn->lpstrFile, ofn->nMaxFile, ofnW.lpstrFile, len); + ofnW.nMaxFile = len; + } + if (ofn->lpstrFilter) { - int n, len; LPCSTR s; + int n; /* filter is a list... title\0ext\0......\0\0 */ s = ofn->lpstrFilter;
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
72
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
Results per page:
10
25
50
100
200