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
January 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
499 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Validate 'CBLC' data before using it.
by Alexandre Julliard
29 Jan '19
29 Jan '19
Module: wine Branch: master Commit: e6967c513d0dab398bdd0c216bb5366ca465047c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6967c513d0dab398bdd0c21…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 29 10:06:43 2019 +0300 dwrite: Validate 'CBLC' data before using it. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 3 +++ dlls/dwrite/font.c | 2 +- dlls/dwrite/opentype.c | 63 ++++++++++++++++++++++++-------------------- dlls/dwrite/tests/font.c | 2 +- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 3251e66..2d20b41 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -216,6 +216,9 @@ struct dwrite_fonttable BOOL exists; }; +extern const void* get_fontface_table(IDWriteFontFace4 *fontface, UINT32 tag, + struct dwrite_fonttable *table) DECLSPEC_HIDDEN; + extern HRESULT opentype_analyze_font(IDWriteFontFileStream*,BOOL*,DWRITE_FONT_FILE_TYPE*,DWRITE_FONT_FACE_TYPE*,UINT32*) DECLSPEC_HIDDEN; extern HRESULT opentype_get_font_table(struct file_stream_desc*,UINT32,const void**,void**,UINT32*,BOOL*) DECLSPEC_HIDDEN; extern HRESULT opentype_cmap_get_unicode_ranges(const struct dwrite_fonttable *table, unsigned int max_count, diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index bb04df6..372578e 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -338,7 +338,7 @@ static HRESULT set_cached_glyph_metrics(struct dwrite_fontface *fontface, UINT16 return S_OK; } -static const void* get_fontface_table(IDWriteFontFace4 *fontface, UINT32 tag, struct dwrite_fonttable *table) +const void* get_fontface_table(IDWriteFontFace4 *fontface, UINT32 tag, struct dwrite_fonttable *table) { HRESULT hr; diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 82491dc..261d00c 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -268,17 +268,19 @@ typedef struct { WORD numGlyphs; } maxp; -typedef struct { - WORD majorVersion; - WORD minorVersion; - DWORD numSizes; -} CBLCHeader; +struct cblc_header +{ + WORD major_version; + WORD minor_version; + DWORD num_sizes; +}; typedef struct { BYTE res[12]; } sbitLineMetrics; -typedef struct { +struct cblc_bitmapsize_table +{ DWORD indexSubTableArrayOffset; DWORD indexTablesSize; DWORD numberofIndexSubTables; @@ -289,9 +291,9 @@ typedef struct { WORD endGlyphIndex; BYTE ppemX; BYTE ppemY; - BYTE bitDepth; + BYTE bit_depth; BYTE flags; -} CBLCBitmapSizeTable; +}; struct gasp_range { @@ -2284,36 +2286,39 @@ static DWORD opentype_get_sbix_formats(IDWriteFontFace4 *fontface) return ret; } -static UINT32 opentype_get_cblc_formats(IDWriteFontFace4 *fontface) +static unsigned int opentype_get_cblc_formats(IDWriteFontFace4 *fontface) { - CBLCBitmapSizeTable *sizes; - UINT32 num_sizes, size, s; - BOOL exists = FALSE; - CBLCHeader *header; - UINT32 ret = 0; - void *context; - HRESULT hr; + const unsigned int format_mask = DWRITE_GLYPH_IMAGE_FORMATS_PNG | + DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8; + const struct cblc_bitmapsize_table *sizes; + struct dwrite_fonttable cblc = { 0 }; + unsigned int num_sizes, i, ret = 0; + const struct cblc_header *header; - if (FAILED(hr = IDWriteFontFace4_TryGetFontTable(fontface, MS_CBLC_TAG, (const void **)&header, &size, - &context, &exists))) + cblc.exists = TRUE; + if (!get_fontface_table(fontface, MS_CBLC_TAG, &cblc)) return 0; - if (!exists) - return 0; + num_sizes = table_read_be_dword(&cblc, FIELD_OFFSET(struct cblc_header, num_sizes)); + sizes = table_read_ensure(&cblc, sizeof(*header), num_sizes * sizeof(*sizes)); - num_sizes = GET_BE_DWORD(header->numSizes); - sizes = (CBLCBitmapSizeTable *)(header + 1); + if (sizes) + { + for (i = 0; i < num_sizes; ++i) + { + BYTE bpp = sizes[i].bit_depth; - for (s = 0; s < num_sizes; s++) { - BYTE bpp = sizes->bitDepth; + if ((ret & format_mask) == format_mask) + break; - if (bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8) - ret |= DWRITE_GLYPH_IMAGE_FORMATS_PNG; - else if (bpp == 32) - ret |= DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8; + if (bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8) + ret |= DWRITE_GLYPH_IMAGE_FORMATS_PNG; + else if (bpp == 32) + ret |= DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8; + } } - IDWriteFontFace4_ReleaseFontTable(fontface, context); + IDWriteFontFace4_ReleaseFontTable(fontface, cblc.context); return ret; } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 3e736c8..309c0a2 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -8755,7 +8755,7 @@ static DWORD get_cblc_formats(IDWriteFontFace4 *fontface) sizes = (CBLCBitmapSizeTable *)(header + 1); for (s = 0; s < num_sizes; s++) { - BYTE bpp = sizes->bitDepth; + BYTE bpp = sizes[s].bitDepth; if (bpp == 1 || bpp == 2 || bpp == 4 || bpp == 8) ret |= DWRITE_GLYPH_IMAGE_FORMATS_PNG;
1
0
0
0
Nikolay Sivov : dwrite: Validate 'COLR' data before using it.
by Alexandre Julliard
29 Jan '19
29 Jan '19
Module: wine Branch: master Commit: 1ee968500348e2dcce6e1439bd47dffb5250d789 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ee968500348e2dcce6e1439…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Jan 29 10:06:42 2019 +0300 dwrite: Validate 'COLR' data before using it. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/dwrite_private.h | 6 ++- dlls/dwrite/font.c | 4 +- dlls/dwrite/opentype.c | 105 +++++++++++++++++++++++++------------------ 3 files changed, 67 insertions(+), 48 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index 6eac1f4..3251e66 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -245,8 +245,10 @@ struct dwrite_colorglyph { UINT16 palette_index; }; -extern HRESULT opentype_get_colr_glyph(const void*,UINT16,struct dwrite_colorglyph*) DECLSPEC_HIDDEN; -extern void opentype_colr_next_glyph(const void*,struct dwrite_colorglyph*) DECLSPEC_HIDDEN; +extern HRESULT opentype_get_colr_glyph(const struct dwrite_fonttable *table, UINT16 glyph, + struct dwrite_colorglyph *color_glyph) DECLSPEC_HIDDEN; +extern void opentype_colr_next_glyph(const struct dwrite_fonttable *table, + struct dwrite_colorglyph *color_glyph) DECLSPEC_HIDDEN; enum gasp_flags { GASP_GRIDFIT = 0x0001, diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 2c51674..bb04df6 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -5649,7 +5649,7 @@ static BOOL colorglyphenum_build_color_run(struct dwrite_colorglyphenum *glyphen /* offsets are relative to glyph origin, nothing to fix up */ if (glyphenum->color_offsets) glyphenum->color_offsets[index] = glyphenum->offsets[g]; - opentype_colr_next_glyph(glyphenum->colr.data, glyphenum->glyphs + g); + opentype_colr_next_glyph(&glyphenum->colr, glyphenum->glyphs + g); if (index) glyphenum->color_advances[index-1] += advance_adj; colorrun->glyphRun.glyphCount++; @@ -5755,7 +5755,7 @@ HRESULT create_colorglyphenum(float originX, float originY, const DWRITE_GLYPH_R has_colored_glyph = FALSE; colorglyphenum->has_regular_glyphs = FALSE; for (i = 0; i < run->glyphCount; i++) { - if (opentype_get_colr_glyph(colorglyphenum->colr.data, run->glyphIndices[i], colorglyphenum->glyphs + i) == S_OK) { + if (opentype_get_colr_glyph(&colorglyphenum->colr, run->glyphIndices[i], colorglyphenum->glyphs + i) == S_OK) { colorglyphenum->max_layer_num = max(colorglyphenum->max_layer_num, colorglyphenum->glyphs[i].num_layers); has_colored_glyph = TRUE; } diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index 647ac99..82491dc 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -862,26 +862,26 @@ struct cpal_color_record }; /* COLR table */ -struct COLR_Header +struct colr_header { USHORT version; - USHORT numBaseGlyphRecords; - ULONG offsetBaseGlyphRecord; - ULONG offsetLayerRecord; - USHORT numLayerRecords; + USHORT num_baseglyph_records; + ULONG offset_baseglyph_records; + ULONG offset_layer_records; + USHORT num_layer_records; }; -struct COLR_BaseGlyphRecord +struct colr_baseglyph_record { - USHORT GID; - USHORT firstLayerIndex; - USHORT numLayers; + USHORT glyph; + USHORT first_layer_index; + USHORT num_layers; }; -struct COLR_LayerRecord +struct colr_layer_record { - USHORT GID; - USHORT paletteIndex; + USHORT glyph; + USHORT palette_index; }; static const void *table_read_ensure(const struct dwrite_fonttable *table, unsigned int offset, unsigned int size) @@ -2050,8 +2050,8 @@ HRESULT opentype_get_cpal_entries(const struct dwrite_fonttable *cpal, unsigned static int colr_compare_gid(const void *g, const void *r) { - const struct COLR_BaseGlyphRecord *record = r; - UINT16 glyph = *(UINT16*)g, GID = GET_BE_WORD(record->GID); + const struct colr_baseglyph_record *record = r; + UINT16 glyph = *(UINT16*)g, GID = GET_BE_WORD(record->glyph); int ret = 0; if (glyph > GID) @@ -2062,51 +2062,68 @@ static int colr_compare_gid(const void *g, const void *r) return ret; } -HRESULT opentype_get_colr_glyph(const void *colr, UINT16 glyph, struct dwrite_colorglyph *ret) -{ - const struct COLR_BaseGlyphRecord *record; - const struct COLR_Header *header = colr; - const struct COLR_LayerRecord *layer; - DWORD layerrecordoffset = GET_BE_DWORD(header->offsetLayerRecord); - DWORD baserecordoffset = GET_BE_DWORD(header->offsetBaseGlyphRecord); - WORD numbaserecords = GET_BE_WORD(header->numBaseGlyphRecords); - - record = bsearch(&glyph, (BYTE*)colr + baserecordoffset, numbaserecords, sizeof(struct COLR_BaseGlyphRecord), - colr_compare_gid); - if (!record) { - ret->layer = 0; - ret->first_layer = 0; - ret->num_layers = 0; - ret->glyph = glyph; - ret->palette_index = 0xffff; +HRESULT opentype_get_colr_glyph(const struct dwrite_fonttable *colr, UINT16 glyph, struct dwrite_colorglyph *ret) +{ + unsigned int num_baseglyph_records, offset_baseglyph_records; + const struct colr_baseglyph_record *record; + const struct colr_layer_record *layer; + const struct colr_header *header; + + memset(ret, 0, sizeof(*ret)); + ret->glyph = glyph; + ret->palette_index = 0xffff; + + header = table_read_ensure(colr, 0, sizeof(*header)); + if (!header) + return S_FALSE; + + num_baseglyph_records = GET_BE_WORD(header->num_baseglyph_records); + offset_baseglyph_records = GET_BE_DWORD(header->offset_baseglyph_records); + if (!table_read_ensure(colr, offset_baseglyph_records, num_baseglyph_records * sizeof(*record))) + { return S_FALSE; } - ret->layer = 0; - ret->first_layer = GET_BE_WORD(record->firstLayerIndex); - ret->num_layers = GET_BE_WORD(record->numLayers); + record = bsearch(&glyph, colr->data + offset_baseglyph_records, num_baseglyph_records, + sizeof(*record), colr_compare_gid); + if (!record) + return S_FALSE; + + ret->first_layer = GET_BE_WORD(record->first_layer_index); + ret->num_layers = GET_BE_WORD(record->num_layers); - layer = (struct COLR_LayerRecord*)((BYTE*)colr + layerrecordoffset) + ret->first_layer + ret->layer; - ret->glyph = GET_BE_WORD(layer->GID); - ret->palette_index = GET_BE_WORD(layer->paletteIndex); + if ((layer = table_read_ensure(colr, GET_BE_DWORD(header->offset_layer_records), + (ret->first_layer + ret->layer) * sizeof(*layer)))) + { + layer += ret->first_layer + ret->layer; + ret->glyph = GET_BE_WORD(layer->glyph); + ret->palette_index = GET_BE_WORD(layer->palette_index); + } return S_OK; } -void opentype_colr_next_glyph(const void *colr, struct dwrite_colorglyph *glyph) +void opentype_colr_next_glyph(const struct dwrite_fonttable *colr, struct dwrite_colorglyph *glyph) { - const struct COLR_Header *header = colr; - const struct COLR_LayerRecord *layer; - DWORD layerrecordoffset = GET_BE_DWORD(header->offsetLayerRecord); + const struct colr_layer_record *layer; + const struct colr_header *header; /* iterated all the way through */ if (glyph->layer == glyph->num_layers) return; + if (!(header = table_read_ensure(colr, 0, sizeof(*header)))) + return; + glyph->layer++; - layer = (struct COLR_LayerRecord*)((BYTE*)colr + layerrecordoffset) + glyph->first_layer + glyph->layer; - glyph->glyph = GET_BE_WORD(layer->GID); - glyph->palette_index = GET_BE_WORD(layer->paletteIndex); + + if ((layer = table_read_ensure(colr, GET_BE_DWORD(header->offset_layer_records), + (glyph->first_layer + glyph->layer) * sizeof(*layer)))) + { + layer += glyph->first_layer + glyph->layer; + glyph->glyph = GET_BE_WORD(layer->glyph); + glyph->palette_index = GET_BE_WORD(layer->palette_index); + } } BOOL opentype_has_vertical_variants(IDWriteFontFace4 *fontface)
1
0
0
0
Dmitry Timoshkov : wininet: Make GetUrlCacheConfigInfo() return actual dwQuota and dwCacheSize.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: ca29ac4650f7f9a96cfaa75a7919ef007306cbbb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ca29ac4650f7f9a96cfaa75a…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Jan 28 09:49:09 2019 +0800 wininet: Make GetUrlCacheConfigInfo() return actual dwQuota and dwCacheSize. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wininet/urlcache.c | 71 ++++++++++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c index 4d422c9..4971fcd 100644 --- a/dlls/wininet/urlcache.c +++ b/dlls/wininet/urlcache.c @@ -3762,33 +3762,10 @@ BOOL WINAPI SetUrlCacheEntryGroupW(LPCWSTR lpszUrlName, DWORD dwFlags, return FALSE; } -/*********************************************************************** - * GetUrlCacheConfigInfoW (WININET.@) - */ -BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD size, DWORD flags) +static cache_container *find_container(DWORD flags) { cache_container *container; - FIXME("(%p, %p, %x): semi-stub\n", info, size, flags); - - if (!info) - { - INTERNET_SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - info->dwContainer = 0; - info->dwQuota = 0x3e800; /* FIXME */ - info->dwReserved4 = 0; - info->fPerUser = TRUE; - info->dwSyncMode = 0; - info->dwNumCachePaths = 1; - info->dwNormalUsage = 0; - info->dwExemptUsage = 0; - - info->u.s.CachePath[0] = 0; - info->u.s.dwCacheSize = 0x3e800; /* FIXME */ - LIST_FOR_EACH_ENTRY(container, &UrlContainers, cache_container, entry) { switch (flags & (CACHE_CONFIG_CONTENT_PATHS_FC | CACHE_CONFIG_COOKIES_PATHS_FC | CACHE_CONFIG_HISTORY_PATHS_FC)) @@ -3796,17 +3773,17 @@ BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD s case 0: case CACHE_CONFIG_CONTENT_PATHS_FC: if (container->default_entry_type == NORMAL_CACHE_ENTRY) - lstrcpynW(info->u.s.CachePath, container->path, MAX_PATH); + return container; break; case CACHE_CONFIG_COOKIES_PATHS_FC: if (container->default_entry_type == COOKIE_CACHE_ENTRY) - lstrcpynW(info->u.s.CachePath, container->path, MAX_PATH); + return container; break; case CACHE_CONFIG_HISTORY_PATHS_FC: if (container->default_entry_type == URLHISTORY_CACHE_ENTRY) - lstrcpynW(info->u.s.CachePath, container->path, MAX_PATH); + return container; break; default: @@ -3815,6 +3792,45 @@ BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD s } } + return NULL; +} + +/*********************************************************************** + * GetUrlCacheConfigInfoW (WININET.@) + */ +BOOL WINAPI GetUrlCacheConfigInfoW(LPINTERNET_CACHE_CONFIG_INFOW info, LPDWORD size, DWORD flags) +{ + cache_container *container; + DWORD error; + + FIXME("(%p, %p, %x): semi-stub\n", info, size, flags); + + if (!info || !(container = find_container(flags))) + { + INTERNET_SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + error = cache_container_open_index(container, MIN_BLOCK_NO); + if (error != ERROR_SUCCESS) + { + INTERNET_SetLastError(error); + return FALSE; + } + + info->dwContainer = 0; + info->dwQuota = FILE_SIZE(MAX_BLOCK_NO) / 1024; + info->dwReserved4 = 0; + info->fPerUser = TRUE; + info->dwSyncMode = 0; + info->dwNumCachePaths = 1; + info->dwNormalUsage = 0; + info->dwExemptUsage = 0; + info->u.s.dwCacheSize = container->file_size / 1024; + lstrcpynW(info->u.s.CachePath, container->path, MAX_PATH); + + cache_container_close_index(container); + TRACE("CachePath %s\n", debugstr_w(info->u.s.CachePath)); return TRUE; @@ -3847,7 +3863,6 @@ BOOL WINAPI GetUrlCacheConfigInfoA(LPINTERNET_CACHE_CONFIG_INFOA info, LPDWORD s info->dwNumCachePaths = infoW.dwNumCachePaths; info->dwNormalUsage = infoW.dwNormalUsage; info->dwExemptUsage = infoW.dwExemptUsage; - info->u.s.dwCacheSize = infoW.u.s.dwCacheSize; WideCharToMultiByte(CP_ACP, 0, infoW.u.s.CachePath, -1, info->u.s.CachePath, MAX_PATH, NULL, NULL);
1
0
0
0
Jacek Caban : services: Associate notify handle with service handle instead of service entry.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 8a2347baffb64f6d2b2901e5a87c926e498671d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8a2347baffb64f6d2b2901e5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 28 15:54:00 2019 +0100 services: Associate notify handle with service handle instead of service entry. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/service.c | 2 -- programs/services/rpc.c | 68 +++++++++++++++++++++---------------------- programs/services/services.h | 4 --- 3 files changed, 34 insertions(+), 40 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index 1552791..e4ff7d7 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -2383,7 +2383,6 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) /* it's possible to have multiple notifications using different service handles */ dr = pNotifyServiceStatusChangeW(svc2, SERVICE_NOTIFY_STOPPED, &data2.notify); - todo_wine ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW gave wrong result: %u\n", dr); /* stop service and receive notifiction */ @@ -2394,7 +2393,6 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) dr2 = SleepEx(100, TRUE); ok(dr == WAIT_IO_COMPLETION || dr2 == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); ok(data.was_called == TRUE, "APC wasn't called\n"); - todo_wine ok(data2.was_called == TRUE, "APC wasn't called\n"); /* test cancelation: create notify on svc that will block until service diff --git a/programs/services/rpc.c b/programs/services/rpc.c index 623e1fa..8299dbf 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -75,23 +75,24 @@ struct sc_manager_handle /* service control manager handle */ struct scmdatabase *db; }; -struct sc_service_handle /* service handle */ -{ - struct sc_handle hdr; - struct list entry; - struct service_entry *service_entry; -}; - struct sc_notify_handle { struct sc_handle hdr; - struct sc_service_handle *service; HANDLE event; DWORD notify_mask; LONG ref; SC_RPC_NOTIFY_PARAMS_LIST *params_list; }; +struct sc_service_handle /* service handle */ +{ + struct sc_handle hdr; + struct list entry; + BOOL status_notified; + struct service_entry *service_entry; + struct sc_notify_handle *notify; +}; + static void sc_notify_retain(struct sc_notify_handle *notify) { InterlockedIncrement(¬ify->ref); @@ -313,12 +314,10 @@ static void SC_RPC_HANDLE_destroy(SC_RPC_HANDLE handle) struct sc_service_handle *service = (struct sc_service_handle *)hdr; service_lock(service->service_entry); list_remove(&service->entry); - if (service->service_entry->notify && - service->service_entry->notify->service == service) + if (service->notify) { - SetEvent(service->service_entry->notify->event); - sc_notify_release(service->service_entry->notify); - service->service_entry->notify = NULL; + SetEvent(service->notify->event); + sc_notify_release(service->notify); } service_unlock(service->service_entry); release_service(service->service_entry); @@ -432,6 +431,8 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi service->hdr.type = SC_HTYPE_SERVICE; service->hdr.access = dwDesiredAccess; + service->notify = NULL; + service->status_notified = FALSE; RtlMapGenericMask(&service->hdr.access, &g_svc_generic); service_lock(entry); @@ -835,7 +836,7 @@ static void fill_status_process(SERVICE_STATUS_PROCESS *status, struct service_e status->dwServiceFlags = 0; } -static void fill_notify(struct sc_notify_handle *notify) +static void fill_notify(struct sc_notify_handle *notify, struct service_entry *service) { SC_RPC_NOTIFY_PARAMS_LIST *list; SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *cparams; @@ -848,7 +849,7 @@ static void fill_notify(struct sc_notify_handle *notify) cparams = (SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *)(list + 1); cparams->dwNotifyMask = notify->notify_mask; - fill_status_process(&cparams->ServiceStatus, notify->service->service_entry); + fill_status_process(&cparams->ServiceStatus, service); cparams->dwNotificationStatus = ERROR_SUCCESS; cparams->dwNotificationTriggered = 1 << (cparams->ServiceStatus.dwCurrentState - SERVICE_STOPPED); cparams->pszServiceNames = NULL; @@ -867,7 +868,7 @@ DWORD __cdecl svcctl_SetServiceStatus( SC_RPC_HANDLE hServiceStatus, LPSERVICE_STATUS lpServiceStatus) { - struct sc_service_handle *service; + struct sc_service_handle *service, *service_handle; struct process_entry *process; DWORD err, mask; @@ -895,17 +896,19 @@ DWORD __cdecl svcctl_SetServiceStatus( } mask = 1 << (service->service_entry->status.dwCurrentState - SERVICE_STOPPED); - if (service->service_entry->notify && - (service->service_entry->notify->notify_mask & mask)) + LIST_FOR_EACH_ENTRY(service_handle, &service->service_entry->handles, struct sc_service_handle, entry) { - struct sc_notify_handle *notify = service->service_entry->notify; - fill_notify(notify); - service->service_entry->notify = NULL; - sc_notify_release(notify); - service->service_entry->status_notified = TRUE; + struct sc_notify_handle *notify = service_handle->notify; + if (notify && (notify->notify_mask & mask)) + { + fill_notify(notify, service->service_entry); + sc_notify_release(notify); + service_handle->notify = NULL; + service_handle->status_notified = TRUE; + } + else + service_handle->status_notified = FALSE; } - else - service->service_entry->status_notified = FALSE; service_unlock(service->service_entry); @@ -1736,32 +1739,29 @@ DWORD __cdecl svcctl_NotifyServiceStatusChange( notify->hdr.type = SC_HTYPE_NOTIFY; notify->hdr.access = 0; - notify->service = service; - notify->event = CreateEventW(NULL, TRUE, FALSE, NULL); notify->notify_mask = params.u.params->dwNotifyMask; service_lock(service->service_entry); - if (service->service_entry->notify) + if (service->notify) { service_unlock(service->service_entry); - HeapFree(GetProcessHeap(), 0, notify); + sc_notify_release(notify); return ERROR_ALREADY_REGISTERED; } mask = 1 << (service->service_entry->status.dwCurrentState - SERVICE_STOPPED); - if (!service->service_entry->status_notified && - (notify->notify_mask & mask)) + if (!service->status_notified && (notify->notify_mask & mask)) { - fill_notify(notify); - service->service_entry->status_notified = TRUE; + fill_notify(notify, service->service_entry); + service->status_notified = TRUE; } else { sc_notify_retain(notify); - service->service_entry->notify = notify; + service->notify = notify; } sc_notify_retain(notify); diff --git a/programs/services/services.h b/programs/services/services.h index c78f71c..e1481d9 100644 --- a/programs/services/services.h +++ b/programs/services/services.h @@ -45,8 +45,6 @@ struct process_entry HANDLE overlapped_event; }; -struct sc_notify_handle; - struct service_entry { struct list entry; @@ -65,8 +63,6 @@ struct service_entry BOOL force_shutdown; BOOL marked_for_delete; BOOL is_wow64; - BOOL status_notified; - struct sc_notify_handle *notify; struct list handles; };
1
0
0
0
Jacek Caban : services: Store a list of service handles in service_entry.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: ac3f571e56bc31b7b23686fc19cc804133769a83 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ac3f571e56bc31b7b23686fc…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 28 15:52:24 2019 +0100 services: Store a list of service handles in service_entry. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/services/rpc.c | 6 ++++++ programs/services/services.c | 3 +++ programs/services/services.h | 1 + 3 files changed, 10 insertions(+) diff --git a/programs/services/rpc.c b/programs/services/rpc.c index efbcd76..623e1fa 100644 --- a/programs/services/rpc.c +++ b/programs/services/rpc.c @@ -78,6 +78,7 @@ struct sc_manager_handle /* service control manager handle */ struct sc_service_handle /* service handle */ { struct sc_handle hdr; + struct list entry; struct service_entry *service_entry; }; @@ -311,6 +312,7 @@ static void SC_RPC_HANDLE_destroy(SC_RPC_HANDLE handle) { struct sc_service_handle *service = (struct sc_service_handle *)hdr; service_lock(service->service_entry); + list_remove(&service->entry); if (service->service_entry->notify && service->service_entry->notify->service == service) { @@ -431,7 +433,11 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi service->hdr.type = SC_HTYPE_SERVICE; service->hdr.access = dwDesiredAccess; RtlMapGenericMask(&service->hdr.access, &g_svc_generic); + + service_lock(entry); service->service_entry = entry; + list_add_tail(&entry->handles, &service->entry); + service_unlock(entry); *phService = &service->hdr; return ERROR_SUCCESS; diff --git a/programs/services/services.c b/programs/services/services.c index 3de46bd..fe605ac 100644 --- a/programs/services/services.c +++ b/programs/services/services.c @@ -21,6 +21,7 @@ #define WIN32_LEAN_AND_MEAN #include <stdarg.h> +#include <assert.h> #include <windows.h> #include <winsvc.h> #include <rpc.h> @@ -114,6 +115,7 @@ DWORD service_create(LPCWSTR name, struct service_entry **entry) if (!*entry) return ERROR_NOT_ENOUGH_SERVER_MEMORY; (*entry)->name = strdupW(name); + list_init(&(*entry)->handles); if (!(*entry)->name) { HeapFree(GetProcessHeap(), 0, *entry); @@ -136,6 +138,7 @@ DWORD service_create(LPCWSTR name, struct service_entry **entry) void free_service_entry(struct service_entry *entry) { + assert(list_empty(&entry->handles)); CloseHandle(entry->status_changed_event); HeapFree(GetProcessHeap(), 0, entry->name); HeapFree(GetProcessHeap(), 0, entry->config.lpBinaryPathName); diff --git a/programs/services/services.h b/programs/services/services.h index 5a79c35..c78f71c 100644 --- a/programs/services/services.h +++ b/programs/services/services.h @@ -67,6 +67,7 @@ struct service_entry BOOL is_wow64; BOOL status_notified; struct sc_notify_handle *notify; + struct list handles; }; extern struct scmdatabase *active_database;
1
0
0
0
Jacek Caban : advapi32/tests: Add test using NotifyServiceStatusChange on different handles of the same service.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 9084b9761d7e4088f5aaa9e9aca0e13b033e0c1d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9084b9761d7e4088f5aaa9e9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jan 28 15:52:06 2019 +0100 advapi32/tests: Add test using NotifyServiceStatusChange on different handles of the same service. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/service.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c index cc48347..1552791 100644 --- a/dlls/advapi32/tests/service.c +++ b/dlls/advapi32/tests/service.c @@ -2350,7 +2350,7 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) ok(dr == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); ok(data.was_called == TRUE, "APC wasn't called\n"); - /* cannot register two notifications */ + /* cannot register two notifications on the same handle */ data.phase = PHASE_STOPPED; data.was_called = FALSE; @@ -2373,13 +2373,29 @@ static void test_servicenotify(SC_HANDLE scm_handle, const char *servicename) (dr == ERROR_ALREADY_REGISTERED && dr2 == 0), "Got wrong SleepEx result: %u\n", dr); ok(data.was_called == FALSE, "APC should not have been called\n"); + memset(&data2.notify, 0, sizeof(data2.notify)); + data2.notify.dwVersion = SERVICE_NOTIFY_STATUS_CHANGE; + data2.notify.pfnNotifyCallback = ¬ify_cb; + data2.notify.pContext = &data; + data2.svc = svc2; + data2.phase = PHASE_STOPPED; + data2.was_called = FALSE; + + /* it's possible to have multiple notifications using different service handles */ + dr = pNotifyServiceStatusChangeW(svc2, SERVICE_NOTIFY_STOPPED, &data2.notify); + todo_wine + ok(dr == ERROR_SUCCESS, "NotifyServiceStatusChangeW gave wrong result: %u\n", dr); + /* stop service and receive notifiction */ br = ControlService(svc, SERVICE_CONTROL_STOP, &status); ok(br, "ControlService failed: %u\n", GetLastError()); dr = SleepEx(100, TRUE); - ok(dr == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); + dr2 = SleepEx(100, TRUE); + ok(dr == WAIT_IO_COMPLETION || dr2 == WAIT_IO_COMPLETION, "Got wrong SleepEx result: %u\n", dr); ok(data.was_called == TRUE, "APC wasn't called\n"); + todo_wine + ok(data2.was_called == TRUE, "APC wasn't called\n"); /* test cancelation: create notify on svc that will block until service * start; close svc; start service on svc2; verify that notification does
1
0
0
0
David Adam : d3dx9/tests: Add more tests for D3DXMatrixTransformation().
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 956d7356e0559a07aac68bcaf73a5005e0600fad URL:
https://source.winehq.org/git/wine.git/?a=commit;h=956d7356e0559a07aac68bca…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Mon Jan 28 19:40:03 2019 +0100 d3dx9/tests: Add more tests for D3DXMatrixTransformation(). Most of those new tests were written by Rico Schüller. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33456
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/tests/math.c | 705 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 705 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=956d7356e0559a07aac6…
1
0
0
0
Andrey Gusev : d3dcompiler: Add support for two other versions of ID3D11ShaderReflection.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: d52b53d151cc2862bf3396298916da693d80198f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d52b53d151cc2862bf339629…
Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Mon Jan 28 19:40:02 2019 +0100 d3dcompiler: Add support for two other versions of ID3D11ShaderReflection. Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/reflection.c | 9 +++++++++ include/d3d11shader.h | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 5a59c64..b36631b 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -665,6 +665,14 @@ static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetThreadGroupSize( return 0; } +static UINT64 STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetRequiresFlags( + ID3D11ShaderReflection *iface) +{ + FIXME("iface %p stub!\n", iface); + + return 0; +} + static const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl = { /* IUnknown methods */ @@ -690,6 +698,7 @@ static const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtb d3dcompiler_shader_reflection_GetNumInterfaceSlots, d3dcompiler_shader_reflection_GetMinFeatureLevel, d3dcompiler_shader_reflection_GetThreadGroupSize, + d3dcompiler_shader_reflection_GetRequiresFlags, }; /* ID3D11ShaderReflectionConstantBuffer methods */ diff --git a/include/d3d11shader.h b/include/d3d11shader.h index f9c3b95..479020a 100644 --- a/include/d3d11shader.h +++ b/include/d3d11shader.h @@ -174,7 +174,13 @@ DECLARE_INTERFACE(ID3D11ShaderReflectionConstantBuffer) }; #undef INTERFACE +#if D3D_COMPILER_VERSION <= 42 +DEFINE_GUID(IID_ID3D11ShaderReflection, 0x17f27486, 0xa342, 0x4d10, 0x88, 0x42, 0xab, 0x08, 0x74, 0xe7, 0xf6, 0x70); +#elif D3D_COMPILER_VERSION == 43 DEFINE_GUID(IID_ID3D11ShaderReflection, 0x0a233719, 0x3960, 0x4578, 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1); +#else +DEFINE_GUID(IID_ID3D11ShaderReflection, 0x8d536ca1, 0x0cca, 0x4956, 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84); +#endif #define INTERFACE ID3D11ShaderReflection DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown) @@ -202,6 +208,7 @@ DECLARE_INTERFACE_(ID3D11ShaderReflection, IUnknown) STDMETHOD_(UINT, GetNumInterfaceSlots)(THIS) PURE; STDMETHOD(GetMinFeatureLevel)(THIS_ enum D3D_FEATURE_LEVEL *level) PURE; STDMETHOD_(UINT, GetThreadGroupSize)(THIS_ UINT *sizex, UINT *sizey, UINT *sizez) PURE; + STDMETHOD_(UINT64, GetRequiresFlags)(THIS) PURE; }; #undef INTERFACE
1
0
0
0
Nikolay Sivov : d3dx9: Use wincodecs directly without initializing COM system.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 77c3761ad4e557f9fa311299e77746bf225a575a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=77c3761ad4e557f9fa311299…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Jan 28 15:51:46 2019 +0300 d3dx9: Use wincodecs directly without initializing COM system. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_24/Makefile.in | 1 + dlls/d3dx9_25/Makefile.in | 1 + dlls/d3dx9_26/Makefile.in | 1 + dlls/d3dx9_27/Makefile.in | 1 + dlls/d3dx9_28/Makefile.in | 1 + dlls/d3dx9_29/Makefile.in | 1 + dlls/d3dx9_30/Makefile.in | 1 + dlls/d3dx9_31/Makefile.in | 1 + dlls/d3dx9_32/Makefile.in | 1 + dlls/d3dx9_33/Makefile.in | 1 + dlls/d3dx9_34/Makefile.in | 1 + dlls/d3dx9_35/Makefile.in | 1 + dlls/d3dx9_36/Makefile.in | 1 + dlls/d3dx9_36/surface.c | 37 +++++++++++++------------------------ dlls/d3dx9_37/Makefile.in | 1 + dlls/d3dx9_38/Makefile.in | 1 + dlls/d3dx9_39/Makefile.in | 1 + dlls/d3dx9_40/Makefile.in | 1 + dlls/d3dx9_41/Makefile.in | 1 + dlls/d3dx9_42/Makefile.in | 1 + dlls/d3dx9_43/Makefile.in | 1 + 21 files changed, 33 insertions(+), 24 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=77c3761ad4e557f9fa31…
1
0
0
0
Matteo Bruni : ddraw: Drop map read access from the internal buffers used for user-pointer draws.
by Alexandre Julliard
28 Jan '19
28 Jan '19
Module: wine Branch: master Commit: 3c87df0bc06761be4fa12ff8f64674b5c078311c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3c87df0bc06761be4fa12ff8…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Jan 25 18:15:08 2019 +0100 ddraw: Drop map read access from the internal buffers used for user-pointer draws. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/device.c | 4 ++-- dlls/ddraw/executebuffer.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 48803f8..4b58b75 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -3471,7 +3471,7 @@ static HRESULT d3d_device_prepare_vertex_buffer(struct d3d_device *device, UINT desc.byte_width = size; desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY; desc.bind_flags = WINED3D_BIND_VERTEX_BUFFER; - desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; desc.structure_byte_stride = 0; @@ -3663,7 +3663,7 @@ static HRESULT d3d_device_prepare_index_buffer(struct d3d_device *device, UINT m desc.byte_width = size; desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL; desc.bind_flags = WINED3D_BIND_INDEX_BUFFER; - desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; desc.structure_byte_stride = 0; diff --git a/dlls/ddraw/executebuffer.c b/dlls/ddraw/executebuffer.c index 2ba29a7..4b4af63 100644 --- a/dlls/ddraw/executebuffer.c +++ b/dlls/ddraw/executebuffer.c @@ -131,8 +131,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer, desc.byte_width = new_size * sizeof(*indices); desc.usage = WINED3DUSAGE_DYNAMIC | WINED3DUSAGE_WRITEONLY | WINED3DUSAGE_STATICDECL; desc.bind_flags = WINED3D_BIND_INDEX_BUFFER; - desc.access = WINED3D_RESOURCE_ACCESS_GPU - | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; desc.misc_flags = 0; desc.structure_byte_stride = 0; @@ -639,7 +638,7 @@ static HRESULT WINAPI d3d_execute_buffer_SetExecuteData(IDirect3DExecuteBuffer * desc.byte_width = new_size * sizeof(D3DTLVERTEX); desc.usage = WINED3DUSAGE_STATICDECL; - desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W; + desc.access = WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_MAP_W; if (FAILED(hr = wined3d_buffer_create(buffer->d3ddev->wined3d_device, &desc, NULL, NULL, &ddraw_null_wined3d_parent_ops, &dst_buffer)))
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
50
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
Results per page:
10
25
50
100
200