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
November 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
1 participants
895 discussions
Start a n
N
ew thread
Paul Gofman : ddraw/tests: Also test format conversion alpha for sysmem textures.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: 84b3d6be0ad9d8e11ec242ddaa8d241a64076cc3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=84b3d6be0ad9d8e11ec242dd…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Wed Nov 13 21:16:23 2019 +0330 ddraw/tests: Also test format conversion alpha for sysmem textures. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw7.c | 144 +++++++++++++++++++++++++++++----------------- 1 file changed, 92 insertions(+), 52 deletions(-) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 7f2c3e9751..2cd3b516f1 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -16539,6 +16539,7 @@ static void test_surface_format_conversion_alpha(void) const char *name; unsigned int block_size, x_blocks, y_blocks; DWORD support_flag; + BOOL broken_software_blit; } formats[] = { @@ -16561,7 +16562,10 @@ static void test_surface_format_conversion_alpha(void) sizeof(DDPIXELFORMAT), DDPF_RGB, 0, {16}, {0x0000f800}, {0x000007e0}, {0x0000001f}, {0x00000000} }, - "R5G6B5", 2, 4, 4, + "R5G6B5", 2, 4, 4, 0, TRUE, + /* Looks broken for sysmem texture convertions on Windows (at + * least with hardware device), the result is either error from + * _Blt() or a copy of the source data without any conversion. */ }, { { @@ -16600,6 +16604,18 @@ static void test_surface_format_conversion_alpha(void) }, }; + static const struct + { + DWORD src_caps, dst_caps; + } + test_caps[] = + { + {DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY, DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY}, + {DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY, DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY}, + {DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY, DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY}, + {DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY, DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY}, + }; + static const struct { enum test_format_id src_format; @@ -16636,11 +16652,12 @@ static void test_surface_format_conversion_alpha(void) const struct test_format *src_format, *dst_format; IDirectDrawSurface7 *src_surf, *dst_surf; DDSURFACEDESC2 surface_desc, lock; - unsigned int i, x, y, pitch; + unsigned int i, j, x, y, pitch; IDirect3DDevice7 *device; DWORD supported_fmts; IDirectDraw7 *ddraw; ULONG refcount; + BOOL is_wine; HWND window; BOOL passed; HRESULT hr; @@ -16662,12 +16679,13 @@ static void test_surface_format_conversion_alpha(void) &supported_fmts); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + is_wine = !strcmp(winetest_platform, "wine"); + memset(&surface_desc, 0, sizeof(surface_desc)); surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; surface_desc.dwWidth = 4; surface_desc.dwHeight = 4; - surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY; for (i = 0; i < ARRAY_SIZE(tests); ++i) { @@ -16685,63 +16703,85 @@ static void test_surface_format_conversion_alpha(void) continue; } - U4(surface_desc).ddpfPixelFormat = src_format->fmt; - hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surf, NULL); - ok(hr == DD_OK, "Test %u, got unexpected hr %#x.\n", i, hr); - - U4(surface_desc).ddpfPixelFormat = dst_format->fmt; - hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surf, NULL); - ok(hr == DD_OK, "Test %u, got unexpected hr %#x.\n", i, hr); + for (j = 0; j < ARRAY_SIZE(test_caps); ++j) + { + if (!is_wine && ((test_caps[j].src_caps | test_caps[j].dst_caps) & DDSCAPS_SYSTEMMEMORY) + && (src_format->broken_software_blit || dst_format->broken_software_blit)) + continue; - memset(&lock, 0, sizeof(lock)); - lock.dwSize = sizeof(lock); - hr = IDirectDrawSurface7_Lock(src_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - pitch = U1(lock).lPitch; - for (y = 0; y < src_format->y_blocks; ++y) - memcpy((BYTE*)lock.lpSurface + y * pitch, - (BYTE *)tests[i].src_data + y * src_format->x_blocks * src_format->block_size, - src_format->block_size * src_format->x_blocks); - hr = IDirectDrawSurface7_Unlock(src_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + U4(surface_desc).ddpfPixelFormat = src_format->fmt; + surface_desc.ddsCaps.dwCaps = test_caps[j].src_caps; + hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surf, NULL); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", j, i, hr); + + U4(surface_desc).ddpfPixelFormat = dst_format->fmt; + surface_desc.ddsCaps.dwCaps = test_caps[j].dst_caps; + hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &dst_surf, NULL); + ok(hr == DD_OK, "Test (%u, %u), got unexpected hr %#x.\n", j, i, hr); + + memset(&lock, 0, sizeof(lock)); + lock.dwSize = sizeof(lock); + hr = IDirectDrawSurface7_Lock(src_surf, NULL, &lock, 0, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + pitch = U1(lock).lPitch; + for (y = 0; y < src_format->y_blocks; ++y) + { + memcpy((BYTE *)lock.lpSurface + y * pitch, + (BYTE *)tests[i].src_data + y * src_format->x_blocks * src_format->block_size, + src_format->block_size * src_format->x_blocks); + } + hr = IDirectDrawSurface7_Unlock(src_surf, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - hr = IDirectDrawSurface7_Blt(dst_surf, NULL, src_surf, NULL, DDBLT_WAIT, NULL); - ok(hr == DD_OK, "Test %s -> %s, got unexpected hr %#x.\n", - src_format->name, dst_format->name, hr); + hr = IDirectDrawSurface7_Blt(dst_surf, NULL, src_surf, NULL, DDBLT_WAIT, NULL); + if (!is_wine && FAILED(hr)) + { + /* Some software blits are rejected on Windows. */ + IDirectDrawSurface7_Release(dst_surf); + IDirectDrawSurface7_Release(src_surf); + skip("Skipping test (%u, %u), cannot blit %s -> %s, hr %#x.\n", j, i, + src_format->name, dst_format->name, hr); + continue; + } + ok(hr == DD_OK, "Test (%u, %s -> %s), got unexpected hr %#x.\n", j, + src_format->name, dst_format->name, hr); - memset(&lock, 0, sizeof(lock)); - lock.dwSize = sizeof(lock); - hr = IDirectDrawSurface7_Lock(dst_surf, NULL, &lock, 0, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - pitch = U1(lock).lPitch; + memset(&lock, 0, sizeof(lock)); + lock.dwSize = sizeof(lock); + hr = IDirectDrawSurface7_Lock(dst_surf, NULL, &lock, 0, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + pitch = U1(lock).lPitch; - for (y = 0; y < dst_format->y_blocks; ++y) - { - const void *expected_data = tests[i].expected_data; + for (y = 0; y < dst_format->y_blocks; ++y) + { + const void *expected_data = tests[i].expected_data; - passed = !memcmp((BYTE*)lock.lpSurface + y * pitch, - (BYTE *)expected_data + y * dst_format->x_blocks * dst_format->block_size, - dst_format->block_size * dst_format->x_blocks); - todo_wine_if(tests[i].todo) - ok(passed, "Test %s -> %s, row %u, unexpected surface data.\n", - src_format->name, dst_format->name, y); + passed = !memcmp((BYTE*)lock.lpSurface + y * pitch, + (BYTE *)expected_data + y * dst_format->x_blocks * dst_format->block_size, + dst_format->block_size * dst_format->x_blocks); + todo_wine_if(tests[i].todo) + ok(passed, "Test (%u, %s -> %s), row %u, unexpected surface data.\n", j, + src_format->name, dst_format->name, y); - if (!passed && !(!strcmp(winetest_platform, "wine") && tests[i].todo)) - { - for (x = 0; x < dst_format->x_blocks * dst_format->block_size / 4; ++x) - trace("Test %u, x %u, y %u, got 0x%08x, expected 0x%08x.\n", i, x, y, - *(unsigned int *)((BYTE *)lock.lpSurface + y * pitch + x * 4), - *(unsigned int *)((BYTE *)expected_data + y * dst_format->x_blocks - * dst_format->block_size + x * 4)); + if (!passed && !(is_wine && tests[i].todo)) + { + for (x = 0; x < dst_format->x_blocks * dst_format->block_size / 4; ++x) + { + trace("Test (%u, %u), x %u, y %u, got 0x%08x, expected 0x%08x.\n", j, i, x, y, + *(unsigned int *)((BYTE *)lock.lpSurface + y * pitch + x * 4), + *(unsigned int *)((BYTE *)expected_data + y * dst_format->x_blocks + * dst_format->block_size + x * 4)); + } + } + if (!passed) + break; } - if (!passed) - break; - } - hr = IDirectDrawSurface7_Unlock(dst_surf, NULL); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirectDrawSurface7_Unlock(dst_surf, NULL); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - IDirectDrawSurface7_Release(dst_surf); - IDirectDrawSurface7_Release(src_surf); + IDirectDrawSurface7_Release(dst_surf); + IDirectDrawSurface7_Release(src_surf); + } } IDirect3DDevice7_Release(device);
1
0
0
0
Paul Gofman : wined3d: Fixup alpha component in wined3d_texture_gl_upload_data().
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: e2dfb91093c8cd49f6ca8b11beeab596b2045440 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e2dfb91093c8cd49f6ca8b11…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Wed Nov 13 21:16:22 2019 +0330 wined3d: Fixup alpha component in wined3d_texture_gl_upload_data(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=35194
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=25486
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw7.c | 6 ++-- dlls/wined3d/texture.c | 89 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 89 insertions(+), 6 deletions(-) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 1592d2e081..7f2c3e9751 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -16621,11 +16621,11 @@ static void test_surface_format_conversion_alpha(void) {FMT_R5G5B5X1, r5g5b5x1_data, FMT_R5G5B5A1, r5g5b5x1_data, TRUE}, {FMT_R5G5B5A1, r5g5b5a1_data, FMT_R5G6B5, r5g6b5_data}, {FMT_RGBA, rgba_data, FMT_DXT1, dxt1_data}, - {FMT_RGBX, rgbx_data, FMT_DXT1, dxt1_data, TRUE}, + {FMT_RGBX, rgbx_data, FMT_DXT1, dxt1_data}, {FMT_RGBA, rgba_data, FMT_DXT2, dxt2_data}, - {FMT_RGBX, rgbx_data, FMT_DXT2, dxt2_data, TRUE}, + {FMT_RGBX, rgbx_data, FMT_DXT2, dxt2_data}, {FMT_RGBA, rgba_data, FMT_DXT3, dxt2_data}, - {FMT_RGBX, rgbx_data, FMT_DXT3, dxt2_data, TRUE}, + {FMT_RGBX, rgbx_data, FMT_DXT3, dxt2_data}, {FMT_DXT1, dxt1_data, FMT_DXT2, dxt2_data}, {FMT_DXT1, dxt1_data, FMT_RGBA, rgba_data}, {FMT_DXT1, dxt1_data, FMT_RGBX, rgba_data}, diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 8d3c25cf15..d4d90c280a 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1963,6 +1963,79 @@ static void wined3d_texture_gl_upload_bo(const struct wined3d_format *src_format } } +static const struct d3dfmt_alpha_fixup +{ + enum wined3d_format_id format_id, conv_format_id; +} +formats_src_alpha_fixup[] = +{ + {WINED3DFMT_B8G8R8X8_UNORM, WINED3DFMT_B8G8R8A8_UNORM}, + {WINED3DFMT_B5G5R5X1_UNORM, WINED3DFMT_B5G5R5A1_UNORM}, + {WINED3DFMT_B4G4R4X4_UNORM, WINED3DFMT_B4G4R4A4_UNORM}, +}; + +static enum wined3d_format_id wined3d_get_alpha_fixup_format(enum wined3d_format_id format_id, + const struct wined3d_format *dst_format) +{ + unsigned int i; + + if (!(dst_format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_COMPRESSED) + && !dst_format->alpha_size) + return WINED3DFMT_UNKNOWN; + + for (i = 0; i < ARRAY_SIZE(formats_src_alpha_fixup); ++i) + { + if (formats_src_alpha_fixup[i].format_id == format_id) + return formats_src_alpha_fixup[i].conv_format_id; + } + + return WINED3DFMT_UNKNOWN; +} + +static void wined3d_fixup_alpha(const struct wined3d_format *format, const uint8_t *src, + unsigned int src_row_pitch, uint8_t *dst, unsigned int dst_row_pitch, + unsigned int width, unsigned int height) +{ + unsigned int byte_count, alpha_mask; + unsigned int x, y; + + byte_count = format->byte_count; + alpha_mask = ((1u << format->alpha_size) - 1) << format->alpha_offset; + + switch (byte_count) + { + case 2: + for (y = 0; y < height; ++y) + { + const uint16_t *src_row = (const uint16_t *)&src[y * src_row_pitch]; + uint16_t *dst_row = (uint16_t *)&dst[y * dst_row_pitch]; + + for (x = 0; x < width; ++x) + { + dst_row[x] = src_row[x] | alpha_mask; + } + } + break; + + case 4: + for (y = 0; y < height; ++y) + { + const uint32_t *src_row = (const uint32_t *)&src[y * src_row_pitch]; + uint32_t *dst_row = (uint32_t *)&dst[y * dst_row_pitch]; + + for (x = 0; x < width; ++x) + { + dst_row[x] = src_row[x] | alpha_mask; + } + } + break; + + default: + ERR("Unsupported byte count %u.\n", byte_count); + break; + } +} + static void wined3d_texture_gl_upload_data(struct wined3d_context *context, const struct wined3d_const_bo_address *src_bo_addr, const struct wined3d_format *src_format, const struct wined3d_box *src_box, unsigned int src_row_pitch, unsigned int src_slice_pitch, @@ -1970,17 +2043,17 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z) { struct wined3d_context_gl *context_gl = wined3d_context_gl(context); + enum wined3d_format_id alpha_fixup_format_id = WINED3DFMT_UNKNOWN; const struct wined3d_gl_info *gl_info = context_gl->gl_info; unsigned int update_w = src_box->right - src_box->left; unsigned int update_h = src_box->bottom - src_box->top; unsigned int update_d = src_box->back - src_box->front; struct wined3d_bo_address bo; unsigned int level; + BOOL srgb = FALSE; BOOL decompress; GLenum target; - BOOL srgb = FALSE; - TRACE("context %p, src_bo_addr %s, src_format %s, src_box %s, src_row_pitch %u, src_slice_pitch %u, " "dst_texture %p, dst_sub_resource_idx %u, dst_location %s, dst_x %u, dst_y %u, dst_z %u.\n", context, debug_const_bo_address(src_bo_addr), debug_d3dformat(src_format->id), debug_box(src_box), @@ -2046,7 +2119,9 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, decompress = (dst_texture->resource.format_flags & WINED3DFMT_FLAG_DECOMPRESS) || (src_format->decompress && src_format->id != dst_texture->resource.format->id); - if (src_format->upload || decompress) + if (src_format->upload || decompress + || (alpha_fixup_format_id = wined3d_get_alpha_fixup_format(src_format->id, + dst_texture->resource.format)) != WINED3DFMT_UNKNOWN) { const struct wined3d_format *compressed_format = src_format; unsigned int dst_row_pitch, dst_slice_pitch; @@ -2059,6 +2134,11 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, { src_format = wined3d_resource_get_decompress_format(&dst_texture->resource); } + else if (alpha_fixup_format_id != WINED3DFMT_UNKNOWN) + { + src_format = wined3d_get_format(context->device->adapter, alpha_fixup_format_id, 0); + assert(!!src_format); + } else { if (dst_texture->resource.format_flags & WINED3DFMT_FLAG_BLOCKS) @@ -2085,6 +2165,9 @@ static void wined3d_texture_gl_upload_data(struct wined3d_context *context, if (decompress) compressed_format->decompress(src_mem, converted_mem, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch, update_w, update_h, 1); + else if (alpha_fixup_format_id != WINED3DFMT_UNKNOWN) + wined3d_fixup_alpha(src_format, src_mem, src_row_pitch, converted_mem, dst_row_pitch, + update_w, update_h); else src_format->upload(src_mem, converted_mem, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch, update_w, update_h, 1);
1
0
0
0
Michael Stefaniuc : d3dx9: Remove redundant NULL check before heap_free().
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: a0a5c64bd5d4240d8a7a9913c77730458262d450 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a0a5c64bd5d4240d8a7a9913…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Fri Nov 8 21:07:10 2019 +0100 d3dx9: Remove redundant NULL check before heap_free(). Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/effect.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index e69a1fd1f8..ad81cb68cb 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -580,9 +580,7 @@ static void free_parameter(struct d3dx_parameter *param, BOOL element, BOOL chil HeapFree(GetProcessHeap(), 0, param->members); } - if (param->full_name) - heap_free(param->full_name); - + heap_free(param->full_name); free_parameter_data(param, child); /* only the parent has to release name and semantic */
1
0
0
0
Connor McAdams : d3dcompiler: Partially implement ID3D10ShaderReflectionVariable.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: 98e240c6a6bf7aa7735017f508d26f4191115a09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=98e240c6a6bf7aa7735017f5…
Author: Connor McAdams <conmanx360(a)gmail.com> Date: Wed Nov 13 16:27:27 2019 +0100 d3dcompiler: Partially implement ID3D10ShaderReflectionVariable. Signed-off-by: Connor McAdams <conmanx360(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 | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 7cfea141c4..a79439a3fe 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1353,6 +1353,7 @@ static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_ DWORD offset; v->ID3D11ShaderReflectionVariable_iface.lpVtbl = &d3dcompiler_shader_reflection_variable_vtbl; + v->ID3D10ShaderReflectionVariable_iface.lpVtbl = &d3d10_shader_reflection_variable_vtbl; v->constant_buffer = cb; read_dword(&ptr, &offset); @@ -2095,6 +2096,53 @@ static const struct ID3D10ShaderReflectionConstantBufferVtbl d3d10_shader_reflec d3d10_shader_reflection_constant_buffer_GetVariableByName, }; +static inline struct d3dcompiler_shader_reflection_variable *impl_from_ID3D10ShaderReflectionVariable(ID3D10ShaderReflectionVariable *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_variable, ID3D10ShaderReflectionVariable_iface); +} + +static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_variable_GetDesc(ID3D10ShaderReflectionVariable *iface, + D3D10_SHADER_VARIABLE_DESC *desc) +{ + struct d3dcompiler_shader_reflection_variable *var = impl_from_ID3D10ShaderReflectionVariable(iface); + + TRACE("iface %p, desc %p.\n", iface, desc); + + if (var == &null_variable) + { + WARN("Null variable specified.\n"); + return E_FAIL; + } + + if (!desc) + { + WARN("Invalid argument specified.\n"); + return E_FAIL; + } + + desc->Name = var->name; + desc->StartOffset = var->start_offset; + desc->Size = var->size; + desc->uFlags = var->flags; + desc->DefaultValue = var->default_value; + + return S_OK; +} + +static ID3D10ShaderReflectionType * STDMETHODCALLTYPE d3d10_shader_reflection_variable_GetType( + ID3D10ShaderReflectionVariable *iface) +{ + FIXME("iface %p stub!\n", iface); + + return &null_type.ID3D10ShaderReflectionType_iface; +} + +static const struct ID3D10ShaderReflectionVariableVtbl d3d10_shader_reflection_variable_vtbl = +{ + d3d10_shader_reflection_variable_GetDesc, + d3d10_shader_reflection_variable_GetType, +}; + HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector) { struct d3dcompiler_shader_reflection *object;
1
0
0
0
Connor McAdams : d3dcompiler: Implement d3d10 GetConstantBufferByName().
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: e5b2ee6fd81bcb8415a730b05f2f65167ec88577 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e5b2ee6fd81bcb8415a730b0…
Author: Connor McAdams <conmanx360(a)gmail.com> Date: Wed Nov 13 16:27:26 2019 +0100 d3dcompiler: Implement d3d10 GetConstantBufferByName(). Signed-off-by: Connor McAdams <conmanx360(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 | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index a88c444eaa..7cfea141c4 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1943,9 +1943,31 @@ static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_sha static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByName( ID3D10ShaderReflection *iface, const char *name) { - FIXME("iface %p, name %s stub!\n", iface, debugstr_a(name)); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface); + unsigned int i; - return NULL; + TRACE("iface %p, name %s.\n", iface, debugstr_a(name)); + + if (!name) + { + WARN("Invalid argument specified.\n"); + return &null_constant_buffer.ID3D10ShaderReflectionConstantBuffer_iface; + } + + for (i = 0; i < reflection->constant_buffer_count; ++i) + { + struct d3dcompiler_shader_reflection_constant_buffer *d = &reflection->constant_buffers[i]; + + if (!strcmp(d->name, name)) + { + TRACE("Returning ID3D10ShaderReflectionConstantBuffer %p.\n", d); + return &d->ID3D10ShaderReflectionConstantBuffer_iface; + } + } + + WARN("Invalid name specified.\n"); + + return &null_constant_buffer.ID3D10ShaderReflectionConstantBuffer_iface; } static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc(ID3D10ShaderReflection *iface,
1
0
0
0
Connor McAdams : d3dcompiler: Implement d3d10 GetConstantBufferByIndex().
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: 13a5a3cadcca4914f63268ab7a7c1cfb2382e332 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=13a5a3cadcca4914f63268ab…
Author: Connor McAdams <conmanx360(a)gmail.com> Date: Wed Nov 13 16:27:25 2019 +0100 d3dcompiler: Implement d3d10 GetConstantBufferByIndex(). Signed-off-by: Connor McAdams <conmanx360(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 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 6bad13e3a0..a88c444eaa 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1927,9 +1927,17 @@ static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetDesc(ID3D10ShaderRef static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByIndex( ID3D10ShaderReflection *iface, UINT index) { - FIXME("iface %p, index %u stub!\n", iface, index); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface); - return NULL; + TRACE("iface %p, index %u.\n", iface, index); + + if (index >= reflection->constant_buffer_count) + { + WARN("Invalid argument specified.\n"); + return &null_constant_buffer.ID3D10ShaderReflectionConstantBuffer_iface; + } + + return &reflection->constant_buffers[index].ID3D10ShaderReflectionConstantBuffer_iface; } static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_shader_reflection_GetConstantBufferByName(
1
0
0
0
Connor McAdams : d3dcompiler: Partially implement ID3D10ShaderReflectionConstantBuffer.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: 14002a796d658479aa8353fe5a960b10e01430cb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=14002a796d658479aa8353fe…
Author: Connor McAdams <conmanx360(a)gmail.com> Date: Wed Nov 13 16:27:24 2019 +0100 d3dcompiler: Partially implement ID3D10ShaderReflectionConstantBuffer. Signed-off-by: Connor McAdams <conmanx360(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 | 87 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 83 insertions(+), 4 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 02210df7d5..6bad13e3a0 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -44,6 +44,7 @@ struct d3dcompiler_shader_signature struct d3dcompiler_shader_reflection_type { ID3D11ShaderReflectionType ID3D11ShaderReflectionType_iface; + ID3D10ShaderReflectionType ID3D10ShaderReflectionType_iface; DWORD id; struct wine_rb_entry entry; @@ -65,6 +66,7 @@ struct d3dcompiler_shader_reflection_type_member struct d3dcompiler_shader_reflection_variable { ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable_iface; + ID3D10ShaderReflectionVariable ID3D10ShaderReflectionVariable_iface; struct d3dcompiler_shader_reflection_constant_buffer *constant_buffer; struct d3dcompiler_shader_reflection_type *type; @@ -79,6 +81,7 @@ struct d3dcompiler_shader_reflection_variable struct d3dcompiler_shader_reflection_constant_buffer { ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer_iface; + ID3D10ShaderReflectionConstantBuffer ID3D10ShaderReflectionConstantBuffer_iface; struct d3dcompiler_shader_reflection *reflection; @@ -147,11 +150,28 @@ static const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_ static const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl; static const struct ID3D11ShaderReflectionTypeVtbl d3dcompiler_shader_reflection_type_vtbl; +static const struct ID3D10ShaderReflectionConstantBufferVtbl d3d10_shader_reflection_constant_buffer_vtbl; +static const struct ID3D10ShaderReflectionVariableVtbl d3d10_shader_reflection_variable_vtbl; +static const struct ID3D10ShaderReflectionTypeVtbl d3d10_shader_reflection_type_vtbl; + /* null objects - needed for invalid calls */ -static struct d3dcompiler_shader_reflection_constant_buffer null_constant_buffer = {{&d3dcompiler_shader_reflection_constant_buffer_vtbl}}; -static struct d3dcompiler_shader_reflection_type null_type = {{&d3dcompiler_shader_reflection_type_vtbl}}; -static struct d3dcompiler_shader_reflection_variable null_variable = {{&d3dcompiler_shader_reflection_variable_vtbl}, - &null_constant_buffer, &null_type}; +static struct d3dcompiler_shader_reflection_constant_buffer null_constant_buffer = +{ + {&d3dcompiler_shader_reflection_constant_buffer_vtbl}, + {&d3d10_shader_reflection_constant_buffer_vtbl} +}; +static struct d3dcompiler_shader_reflection_type null_type = +{ + {&d3dcompiler_shader_reflection_type_vtbl}, + {&d3d10_shader_reflection_type_vtbl} +}; +static struct d3dcompiler_shader_reflection_variable null_variable = +{ + {&d3dcompiler_shader_reflection_variable_vtbl}, + {&d3d10_shader_reflection_variable_vtbl}, + &null_constant_buffer, + &null_type +}; static BOOL copy_name(const char *ptr, char **name) { @@ -1507,6 +1527,7 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c struct d3dcompiler_shader_reflection_constant_buffer *cb = &constant_buffers[i]; cb->ID3D11ShaderReflectionConstantBuffer_iface.lpVtbl = &d3dcompiler_shader_reflection_constant_buffer_vtbl; + cb->ID3D10ShaderReflectionConstantBuffer_iface.lpVtbl = &d3d10_shader_reflection_constant_buffer_vtbl; cb->reflection = r; read_dword(&ptr, &offset); @@ -1986,6 +2007,64 @@ static const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl = d3d10_shader_reflection_GetOutputParameterDesc, }; +static inline struct d3dcompiler_shader_reflection_constant_buffer *impl_from_ID3D10ShaderReflectionConstantBuffer( + ID3D10ShaderReflectionConstantBuffer *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_constant_buffer, + ID3D10ShaderReflectionConstantBuffer_iface); +} + +static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetDesc( + ID3D10ShaderReflectionConstantBuffer *iface, D3D10_SHADER_BUFFER_DESC *desc) +{ + struct d3dcompiler_shader_reflection_constant_buffer *cb = impl_from_ID3D10ShaderReflectionConstantBuffer(iface); + + TRACE("iface %p, desc %p.\n", iface, desc); + + if (cb == &null_constant_buffer) + { + WARN("Null constant buffer specified.\n"); + return E_FAIL; + } + + if (!desc) + { + WARN("Invalid argument specified.\n"); + return E_FAIL; + } + + desc->Name = cb->name; + desc->Type = cb->type; + desc->Variables = cb->variable_count; + desc->Size = cb->size; + desc->uFlags = cb->flags; + + return S_OK; +} + +static ID3D10ShaderReflectionVariable * STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetVariableByIndex( + ID3D10ShaderReflectionConstantBuffer *iface, UINT index) +{ + FIXME("iface %p, index %d stub!\n", iface, index); + + return &null_variable.ID3D10ShaderReflectionVariable_iface; +} + +static ID3D10ShaderReflectionVariable * STDMETHODCALLTYPE d3d10_shader_reflection_constant_buffer_GetVariableByName( + ID3D10ShaderReflectionConstantBuffer *iface, const char *name) +{ + FIXME("iface %p, name %s stub!\n", iface, name); + + return &null_variable.ID3D10ShaderReflectionVariable_iface; +} + +static const struct ID3D10ShaderReflectionConstantBufferVtbl d3d10_shader_reflection_constant_buffer_vtbl = +{ + d3d10_shader_reflection_constant_buffer_GetDesc, + d3d10_shader_reflection_constant_buffer_GetVariableByIndex, + d3d10_shader_reflection_constant_buffer_GetVariableByName, +}; + HRESULT WINAPI D3D10ReflectShader(const void *data, SIZE_T data_size, ID3D10ShaderReflection **reflector) { struct d3dcompiler_shader_reflection *object;
1
0
0
0
Connor McAdams : d3dcompiler: Implement d3d10 reflection GetResourceBindingDesc() method.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: 6b6f8d5c2f59d17b37f6e17c9ccf84d5a6096719 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b6f8d5c2f59d17b37f6e17c…
Author: Connor McAdams <conmanx360(a)gmail.com> Date: Wed Nov 13 16:27:23 2019 +0100 d3dcompiler: Implement d3d10 reflection GetResourceBindingDesc() method. Signed-off-by: Connor McAdams <conmanx360(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 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 7a27811482..02210df7d5 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1922,9 +1922,19 @@ static struct ID3D10ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3d10_sha static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc(ID3D10ShaderReflection *iface, UINT index, D3D10_SHADER_INPUT_BIND_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface); - return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p.\n", iface, index, desc); + + if (!desc || index >= reflection->bound_resource_count) + { + WARN("Invalid argument specified.\n"); + return E_INVALIDARG; + } + + memcpy(desc, &reflection->bound_resources[index], sizeof(*desc)); + + return S_OK; } static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetInputParameterDesc(ID3D10ShaderReflection *iface,
1
0
0
0
Connor McAdams : d3dcompiler: Implement d3d10 reflection Get{Input, Output}ParameterDesc() methods.
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: d8ff297052f26ffd27b8d8caa2eabd5fbaec4409 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d8ff297052f26ffd27b8d8ca…
Author: Connor McAdams <conmanx360(a)gmail.com> Date: Wed Nov 13 16:27:22 2019 +0100 d3dcompiler: Implement d3d10 reflection Get{Input, Output}ParameterDesc() methods. Signed-off-by: Connor McAdams <conmanx360(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 | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index f480c72986..7a27811482 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1930,17 +1930,37 @@ static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetResourceBindingDesc( static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetInputParameterDesc(ID3D10ShaderReflection *iface, UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface); - return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p.\n", iface, index, desc); + + if (!desc || !reflection->isgn || index >= reflection->isgn->element_count) + { + WARN("Invalid argument specified.\n"); + return E_INVALIDARG; + } + + memcpy(desc, &reflection->isgn->elements[index], sizeof(*desc)); + + return S_OK; } static HRESULT STDMETHODCALLTYPE d3d10_shader_reflection_GetOutputParameterDesc(ID3D10ShaderReflection *iface, UINT index, D3D10_SIGNATURE_PARAMETER_DESC *desc) { - FIXME("iface %p, index %u, desc %p stub!\n", iface, index, desc); + struct d3dcompiler_shader_reflection *reflection = impl_from_ID3D10ShaderReflection(iface); - return E_NOTIMPL; + TRACE("iface %p, index %u, desc %p.\n", iface, index, desc); + + if (!desc || !reflection->osgn || index >= reflection->osgn->element_count) + { + WARN("Invalid argument specified.\n"); + return E_INVALIDARG; + } + + memcpy(desc, &reflection->osgn->elements[index], sizeof(*desc)); + + return S_OK; } static const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl =
1
0
0
0
Zebediah Figura : d3d9: Handle stateblocks in d3d9_device_SetStreamSourceFreq().
by Alexandre Julliard
13 Nov '19
13 Nov '19
Module: wine Branch: master Commit: eed2f485a62b69ec6ccaafb3764e3f8299753bf0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eed2f485a62b69ec6ccaafb3…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Nov 11 19:56:02 2019 -0600 d3d9: Handle stateblocks in d3d9_device_SetStreamSourceFreq(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index a0653d2a42..df1996bf85 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3689,7 +3689,9 @@ static HRESULT WINAPI d3d9_device_SetStreamSourceFreq(IDirect3DDevice9Ex *iface, TRACE("iface %p, stream_idx %u, freq %u.\n", iface, stream_idx, freq); wined3d_mutex_lock(); - hr = wined3d_device_set_stream_source_freq(device->wined3d_device, stream_idx, freq); + hr = wined3d_stateblock_set_stream_source_freq(device->update_state, stream_idx, freq); + if (SUCCEEDED(hr) && !device->recording) + hr = wined3d_device_set_stream_source_freq(device->wined3d_device, stream_idx, freq); wined3d_mutex_unlock(); return hr;
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200