winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2024
----- 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
613 discussions
Start a n
N
ew thread
Rémi Bernon : winemac: Blend alpha with NtGdiAlphaBlend instead of window opacity.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 3581a96052957ae68fb8827ca651c00845762e3a URL:
https://gitlab.winehq.org/wine/wine/-/commit/3581a96052957ae68fb8827ca651c0…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue May 28 19:19:30 2024 +0200 winemac: Blend alpha with NtGdiAlphaBlend instead of window opacity. This seems equivalent but makes the code similar to other drivers. --- dlls/winemac.drv/window.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 4a6ea1585ac..882c3f743bf 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1871,7 +1871,6 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, struct window_surface *surface; struct macdrv_win_data *data; BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, 0 }; - BYTE alpha; RECT rect, src_rect; HDC hdc; BOOL ret = FALSE; @@ -1914,16 +1913,6 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, return TRUE; } - if (info->dwFlags & ULW_ALPHA) - { - /* Apply SourceConstantAlpha via window alpha, not blend. */ - alpha = info->pblend->SourceConstantAlpha; - blend = *info->pblend; - blend.SourceConstantAlpha = 0xff; - } - else - alpha = 0xff; - if (!(hdc = NtGdiCreateCompatibleDC(0))) goto done; window_surface_lock(surface); NtGdiSelectBitmap(hdc, surface->color_bitmap); @@ -1934,6 +1923,7 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints(info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP); + if (info->dwFlags & ULW_ALPHA) blend = *info->pblend; if (!(ret = NtGdiAlphaBlend(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, @@ -1948,7 +1938,7 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, if ((data = get_win_data(hwnd))) { /* The ULW flags are a superset of the LWA flags. */ - sync_window_opacity(data, info->crKey, alpha, TRUE, info->dwFlags); + sync_window_opacity(data, info->crKey, 255, TRUE, info->dwFlags); release_win_data(data); }
1
0
0
0
Rémi Bernon : winemac: Use the surface bitmap directly in UpdateLayeredWindow.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: f545d424955ccdb189f0d21091b119ac78069a79 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f545d424955ccdb189f0d21091b119…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 31 10:28:23 2024 +0200 winemac: Use the surface bitmap directly in UpdateLayeredWindow. --- dlls/winemac.drv/window.c | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 98fbc075237..4a6ea1585ac 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1872,12 +1872,8 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, struct macdrv_win_data *data; BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, 0 }; BYTE alpha; - char buffer[FIELD_OFFSET(BITMAPINFO, bmiColors[256])]; - BITMAPINFO *bmi = (BITMAPINFO *)buffer; - void *src_bits, *dst_bits; RECT rect, src_rect; - HDC hdc = 0; - HBITMAP dib; + HDC hdc; BOOL ret = FALSE; if (!(data = get_win_data(hwnd))) return FALSE; @@ -1928,20 +1924,11 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, else alpha = 0xff; - dst_bits = surface->funcs->get_info(surface, bmi); - - if (!(dib = NtGdiCreateDIBSection(info->hdcDst, NULL, 0, bmi, DIB_RGB_COLORS, - 0, 0, 0, &src_bits))) goto done; if (!(hdc = NtGdiCreateCompatibleDC(0))) goto done; + window_surface_lock(surface); + NtGdiSelectBitmap(hdc, surface->color_bitmap); - NtGdiSelectBitmap(hdc, dib); - if (info->prcDirty) - { - intersect_rect(&rect, &rect, info->prcDirty); - window_surface_lock(surface); - memcpy(src_bits, dst_bits, bmi->bmiHeader.biSizeImage); - window_surface_unlock(surface); - } + if (info->prcDirty) intersect_rect(&rect, &rect, info->prcDirty); NtGdiPatBlt(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS); src_rect = rect; if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); @@ -1952,28 +1939,21 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, *(DWORD *)&blend, 0))) goto done; + if (ret) add_bounds_rect( &surface->bounds, &rect ); + + NtGdiDeleteObjectApp( hdc ); + window_surface_unlock( surface ); + window_surface_flush( surface ); if ((data = get_win_data(hwnd))) { - if (surface == data->surface) - { - window_surface_lock(surface); - memcpy(dst_bits, src_bits, bmi->bmiHeader.biSizeImage); - add_bounds_rect(&surface->bounds, &rect); - window_surface_unlock(surface); - window_surface_flush(surface); - } - /* The ULW flags are a superset of the LWA flags. */ sync_window_opacity(data, info->crKey, alpha, TRUE, info->dwFlags); - release_win_data(data); } done: window_surface_release(surface); - if (hdc) NtGdiDeleteObjectApp(hdc); - if (dib) NtGdiDeleteObjectApp(dib); return ret; }
1
0
0
0
Rémi Bernon : winemac: Always clear UpdateLayeredWindow target rectangle.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 521cb41c6a310adb41cff86840ef348bdf34745a URL:
https://gitlab.winehq.org/wine/wine/-/commit/521cb41c6a310adb41cff86840ef34…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Jun 2 12:32:18 2024 +0200 winemac: Always clear UpdateLayeredWindow target rectangle. --- dlls/winemac.drv/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 0bc3bf62add..98fbc075237 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1941,8 +1941,8 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, window_surface_lock(surface); memcpy(src_bits, dst_bits, bmi->bmiHeader.biSizeImage); window_surface_unlock(surface); - NtGdiPatBlt(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS); } + NtGdiPatBlt(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS); src_rect = rect; if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints(info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP);
1
0
0
0
Rémi Bernon : wineandroid: Use the surface bitmap directly in UpdateLayeredWindow.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 0b7b9adf33c976c558e120c5c27480c0cdc25545 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0b7b9adf33c976c558e120c5c27480…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri May 31 10:28:03 2024 +0200 wineandroid: Use the surface bitmap directly in UpdateLayeredWindow. --- dlls/wineandroid.drv/window.c | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 1512934dfa7..235663af52e 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1392,12 +1392,8 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info struct android_win_data *data; BLENDFUNCTION blend = { AC_SRC_OVER, 0, 255, 0 }; COLORREF color_key = (info->dwFlags & ULW_COLORKEY) ? info->crKey : CLR_INVALID; - char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; - BITMAPINFO *bmi = (BITMAPINFO *)buffer; - void *src_bits, *dst_bits; RECT rect, src_rect; - HDC hdc = 0; - HBITMAP dib; + HDC hdc; BOOL ret = FALSE; if (!(data = get_win_data( hwnd ))) return FALSE; @@ -1430,21 +1426,11 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info return TRUE; } - dst_bits = surface->funcs->get_info( surface, bmi ); - - if (!(dib = NtGdiCreateDIBSection( info->hdcDst, NULL, 0, bmi, DIB_RGB_COLORS, 0, 0, 0, &src_bits ))) - goto done; if (!(hdc = NtGdiCreateCompatibleDC( 0 ))) goto done; - - NtGdiSelectBitmap( hdc, dib ); - window_surface_lock( surface ); + NtGdiSelectBitmap( hdc, surface->color_bitmap ); - if (info->prcDirty) - { - intersect_rect( &rect, &rect, info->prcDirty ); - memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage ); - } + if (info->prcDirty) intersect_rect( &rect, &rect, info->prcDirty ); NtGdiPatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS ); src_rect = rect; if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); @@ -1455,19 +1441,14 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, *(DWORD *)&blend, 0 ); - if (ret) - { - memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); - add_bounds_rect( &surface->bounds, &rect ); - } + if (ret) add_bounds_rect( &surface->bounds, &rect ); + NtGdiDeleteObjectApp( hdc ); window_surface_unlock( surface ); window_surface_flush( surface ); done: window_surface_release( surface ); - if (hdc) NtGdiDeleteObjectApp( hdc ); - if (dib) NtGdiDeleteObjectApp( dib ); return ret; }
1
0
0
0
Rémi Bernon : wineandroid: Always clear UpdateLayeredWindow target rectangle.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: b2f2aaa4911545e4eb6225f8ad472eecefca589f URL:
https://gitlab.winehq.org/wine/wine/-/commit/b2f2aaa4911545e4eb6225f8ad472e…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Jun 2 12:32:07 2024 +0200 wineandroid: Always clear UpdateLayeredWindow target rectangle. --- dlls/wineandroid.drv/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index 19900c7e509..1512934dfa7 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1444,8 +1444,8 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info { intersect_rect( &rect, &rect, info->prcDirty ); memcpy( src_bits, dst_bits, bmi->bmiHeader.biSizeImage ); - NtGdiPatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS ); } + NtGdiPatBlt( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, BLACKNESS ); src_rect = rect; if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP );
1
0
0
0
Elizabeth Figura : wined3d: Default diffuse to 1.0 in the vertex shader.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 95999accf6c1ece887788bf6f827a34288744fba URL:
https://gitlab.winehq.org/wine/wine/-/commit/95999accf6c1ece887788bf6f827a3…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Sat May 4 13:35:04 2024 -0500 wined3d: Default diffuse to 1.0 in the vertex shader. --- dlls/d3d9/tests/visual.c | 10 ++++------ dlls/wined3d/context_gl.c | 19 ++----------------- dlls/wined3d/glsl_shader.c | 5 ++++- dlls/wined3d/utils.c | 2 ++ dlls/wined3d/wined3d_gl.h | 3 +-- dlls/wined3d/wined3d_private.h | 3 ++- 6 files changed, 15 insertions(+), 27 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index b74836d79c4..e924588630e 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -26083,10 +26083,9 @@ static void test_color_vertex(void) ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); colour = getPixelColor(device, 320, 240); - todo_wine_if (i == 13 || i == 14 || i == 19) - ok(color_match(colour, tests[i].result, 1), - "Expected colour 0x%08x for test %u, got 0x%08x.\n", - tests[i].result, i, colour); + ok(color_match(colour, tests[i].result, 1), + "Expected colour 0x%08x for test %u, got 0x%08x.\n", + tests[i].result, i, colour); } refcount = IDirect3DDevice9_Release(device); @@ -28516,8 +28515,7 @@ static void test_default_diffuse(void) ok(hr == S_OK, "Got hr %#lx.\n", hr); colour = getPixelColor(device, 320, 240); - todo_wine_if (j == 2) - ok(colour == vs_tests[j].expect_colour, "Got unexpected colour %08x.\n", colour); + ok(colour == vs_tests[j].expect_colour, "Got unexpected colour %08x.\n", colour); winetest_pop_context(); } diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 49d54d49e33..75f94678e14 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -4938,23 +4938,8 @@ static void wined3d_context_gl_load_numbered_arrays(struct wined3d_context_gl *c { if (context->numbered_array_mask & (1u << i)) wined3d_context_gl_unload_numbered_array(context_gl, i); - if (!use_vs(state) && i == WINED3D_FFP_DIFFUSE) - { - if (!(context_gl->default_attrib_value_set & (1u << i)) || !context_gl->diffuse_attrib_to_1) - { - GL_EXTCALL(glVertexAttrib4f(i, 1.0f, 1.0f, 1.0f, 1.0f)); - context_gl->diffuse_attrib_to_1 = 1; - } - } - else - { - if (!(context_gl->default_attrib_value_set & (1u << i))) - { - GL_EXTCALL(glVertexAttrib4f(i, 0.0f, 0.0f, 0.0f, 0.0f)); - if (i == WINED3D_FFP_DIFFUSE) - context_gl->diffuse_attrib_to_1 = 0; - } - } + if (!(context_gl->default_attrib_value_set & (1u << i))) + GL_EXTCALL(glVertexAttrib4f(i, 0.0f, 0.0f, 0.0f, 0.0f)); context_gl->default_attrib_value_set |= 1u << i; continue; } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 4e7655186bf..b4bfbe1c55b 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8937,7 +8937,10 @@ static void shader_glsl_ffp_vertex_lighting(struct wined3d_string_buffer *buffer if (!settings->lighting) { - shader_addline(buffer, "ffp_varying_diffuse = ffp_attrib_diffuse;\n"); + if (settings->diffuse) + shader_addline(buffer, "ffp_varying_diffuse = ffp_attrib_diffuse;\n"); + else + shader_addline(buffer, "ffp_varying_diffuse = vec4(1.0);\n"); shader_addline(buffer, "ffp_varying_specular = ffp_attrib_specular;\n"); return; } diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index e0519942e1a..8c90908ec76 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6577,6 +6577,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, settings->transformed = 1; settings->point_size = state->primitive_type == WINED3D_PT_POINTLIST; settings->per_vertex_point_size = vdecl->point_size; + settings->diffuse = vdecl->diffuse; if (!state->render_states[WINED3D_RS_FOGENABLE]) settings->fog_mode = WINED3D_FFP_VS_FOG_OFF; else if (state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) @@ -6619,6 +6620,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, settings->clipping = state->render_states[WINED3D_RS_CLIPPING] && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; + settings->diffuse = vdecl->diffuse; settings->normal = vdecl->normal; settings->normalize = settings->normal && state->render_states[WINED3D_RS_NORMALIZENORMALS]; settings->lighting = !!state->render_states[WINED3D_RS_LIGHTING]; diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 561de235379..ac875ce1fe7 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -608,12 +608,11 @@ struct wined3d_context_gl uint32_t dc_is_private : 1; uint32_t dc_has_format : 1; /* Only meaningful for private DCs. */ uint32_t fog_enabled : 1; - uint32_t diffuse_attrib_to_1 : 1; uint32_t rebind_fbo : 1; uint32_t needs_set : 1; uint32_t internal_format_set : 1; uint32_t valid : 1; - uint32_t padding : 24; + uint32_t padding : 25; uint32_t default_attrib_value_set; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 63e05239ac0..abdb97f9d9f 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2725,7 +2725,8 @@ struct wined3d_ffp_vs_settings DWORD ortho_fog : 1; DWORD flatshading : 1; DWORD specular_enable : 1; - DWORD padding : 17; + DWORD diffuse : 1; + DWORD padding : 16; DWORD swizzle_map; /* MAX_ATTRIBS, 32 */
1
0
0
0
Elizabeth Figura : wined3d: Just check the vertex declaration for texcoord usage.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: c825c885d389643114ce8c7d900e4bfc6d9828a7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/c825c885d389643114ce8c7d900e4b…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri May 3 17:28:06 2024 -0500 wined3d: Just check the vertex declaration for texcoord usage. Do not check the stream info. This would make a difference if the usage was included in the vertex declaration but the corresponding stream is not bound; however, in that case we supply a default stream containing zero, which provides the same behaviour as if the usage is not included in the vertex declaration. --- dlls/wined3d/utils.c | 7 +++---- dlls/wined3d/vertexdeclaration.c | 2 ++ dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 7d2bef8b7cc..e0519942e1a 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6507,11 +6507,10 @@ void wined3d_ffp_get_fs_settings(const struct wined3d_context *context, } else { - const struct wined3d_stream_info *si = &context->stream_info; unsigned int coord_idx = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; if ((state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX] >> WINED3D_FFP_TCI_SHIFT) & WINED3D_FFP_TCI_MASK - || (coord_idx < WINED3D_MAX_FFP_TEXTURES && (si->use_map & (1u << (WINED3D_FFP_TEXCOORD0 + coord_idx))))) + || (coord_idx < WINED3D_MAX_FFP_TEXTURES && (state->vertex_declaration->texcoords & (1u << coord_idx)))) settings->texcoords_initialized |= 1u << i; } } @@ -6588,7 +6587,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i) { coord_idx = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; - if (coord_idx < WINED3D_MAX_FFP_TEXTURES && (si->use_map & (1u << (WINED3D_FFP_TEXCOORD0 + coord_idx)))) + if (coord_idx < WINED3D_MAX_FFP_TEXTURES && (vdecl->texcoords & (1u << coord_idx))) settings->texcoords |= 1u << i; settings->texgen[i] = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; } @@ -6638,7 +6637,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i) { coord_idx = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; - if (coord_idx < WINED3D_MAX_FFP_TEXTURES && (si->use_map & (1u << (WINED3D_FFP_TEXCOORD0 + coord_idx)))) + if (coord_idx < WINED3D_MAX_FFP_TEXTURES && (vdecl->texcoords & (1u << coord_idx))) settings->texcoords |= 1u << i; settings->texgen[i] = state->texture_states[i][WINED3D_TSS_TEXCOORD_INDEX]; } diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index f2df8979089..7d74d9c385e 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -228,6 +228,8 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara declaration->specular = true; else if (e->usage == WINED3D_DECL_USAGE_NORMAL) declaration->normal = true; + else if (e->usage == WINED3D_DECL_USAGE_TEXCOORD) + declaration->texcoords |= (1u << e->usage_idx); /* Find the streams used in the declaration. The vertex buffers have * to be loaded when drawing, but filter tessellation pseudo streams. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 14a91875014..63e05239ac0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3496,6 +3496,7 @@ struct wined3d_vertex_declaration bool diffuse; bool specular; bool normal; + uint8_t texcoords; }; bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info,
1
0
0
0
Elizabeth Figura : wined3d: Just check the vertex declaration for normal usage.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 89a71df48ee6943d390c515e2408a25ac3fcceb0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/89a71df48ee6943d390c515e2408a2…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri May 3 17:14:34 2024 -0500 wined3d: Just check the vertex declaration for normal usage. Do not check the stream info. This would make a difference if the usage was included in the vertex declaration but the corresponding stream is not bound. However, in that case we supply a default stream containing zero, which provides the same behaviour as if the normal usage is not included in the vertex declaration. --- dlls/wined3d/glsl_shader.c | 2 +- dlls/wined3d/utils.c | 2 +- dlls/wined3d/vertexdeclaration.c | 2 ++ dlls/wined3d/wined3d_private.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 0fbff8e4597..4e7655186bf 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11759,13 +11759,13 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, const struct wined3d_vertex_declaration *vdecl = state->vertex_declaration; struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context_gl->gl_info; - BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL)); const BOOL legacy_clip_planes = needs_legacy_glsl_syntax(gl_info); BOOL transformed = context->stream_info.position_transformed; BOOL wasrhw = context->last_was_rhw; bool point_size = vdecl->point_size; bool specular = vdecl->specular; bool diffuse = vdecl->diffuse; + bool normal = vdecl->normal; unsigned int i; context->last_was_rhw = transformed; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index df502af247f..7d2bef8b7cc 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6620,7 +6620,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, settings->clipping = state->render_states[WINED3D_RS_CLIPPING] && state->render_states[WINED3D_RS_CLIPPLANEENABLE]; - settings->normal = !!(si->use_map & (1u << WINED3D_FFP_NORMAL)); + settings->normal = vdecl->normal; settings->normalize = settings->normal && state->render_states[WINED3D_RS_NORMALIZENORMALS]; settings->lighting = !!state->render_states[WINED3D_RS_LIGHTING]; settings->localviewer = !!state->render_states[WINED3D_RS_LOCALVIEWER]; diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index 9affc604f13..f2df8979089 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -226,6 +226,8 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara declaration->diffuse = true; else if (e->usage == WINED3D_DECL_USAGE_COLOR && e->usage_idx == 1) declaration->specular = true; + else if (e->usage == WINED3D_DECL_USAGE_NORMAL) + declaration->normal = true; /* Find the streams used in the declaration. The vertex buffers have * to be loaded when drawing, but filter tessellation pseudo streams. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a1a981d5a4c..14a91875014 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3495,6 +3495,7 @@ struct wined3d_vertex_declaration bool point_size; bool diffuse; bool specular; + bool normal; }; bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info,
1
0
0
0
Elizabeth Figura : wined3d: Just check the vertex declaration for colour usage.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: 4929e519323c41cc32aa01434980ba1316fcfac7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4929e519323c41cc32aa01434980ba…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri May 3 16:57:18 2024 -0500 wined3d: Just check the vertex declaration for colour usage. Do not check the stream info. In practice, this amounts to a difference if the usage is included in the vertex declaration but the corresponding stream is not bound; however, tests show that in this case we should supply a default colour of zero. --- dlls/d3d9/tests/visual.c | 2 +- dlls/wined3d/device.c | 2 +- dlls/wined3d/glsl_shader.c | 4 ++-- dlls/wined3d/utils.c | 2 +- dlls/wined3d/vertexdeclaration.c | 4 ++++ dlls/wined3d/wined3d_private.h | 23 +++++++++++++---------- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 4b8a7a994b3..b74836d79c4 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -26083,7 +26083,7 @@ static void test_color_vertex(void) ok(SUCCEEDED(hr), "Failed to end scene, hr %#lx.\n", hr); colour = getPixelColor(device, 320, 240); - todo_wine_if (i == 13 || i == 14 || i == 16 || i == 18 || i == 19) + todo_wine_if (i == 13 || i == 14 || i == 19) ok(color_match(colour, tests[i].result, 1), "Expected colour 0x%08x for test %u, got 0x%08x.\n", tests[i].result, i, colour); diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 12786f4a068..c0648f2aace 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3383,7 +3383,7 @@ static HRESULT process_vertices_strided(const struct wined3d_device *device, DWO lighting = state->render_states[WINED3D_RS_LIGHTING] && (dst_fvf & (WINED3DFVF_DIFFUSE | WINED3DFVF_SPECULAR)); wined3d_get_material_colour_source(&diffuse_source, &emissive_source, - &ambient_source, &specular_source, state, stream_info); + &ambient_source, &specular_source, state); output_colour_format = wined3d_get_format(device->adapter, WINED3DFMT_B8G8R8A8_UNORM, 0); material_specular_state_colour = state->render_states[WINED3D_RS_SPECULARENABLE] ? &state->material.specular : &black; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index ae618266d79..0fbff8e4597 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11759,13 +11759,13 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, const struct wined3d_vertex_declaration *vdecl = state->vertex_declaration; struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context_gl->gl_info; - BOOL specular = !!(context->stream_info.use_map & (1u << WINED3D_FFP_SPECULAR)); - BOOL diffuse = !!(context->stream_info.use_map & (1u << WINED3D_FFP_DIFFUSE)); BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL)); const BOOL legacy_clip_planes = needs_legacy_glsl_syntax(gl_info); BOOL transformed = context->stream_info.position_transformed; BOOL wasrhw = context->last_was_rhw; bool point_size = vdecl->point_size; + bool specular = vdecl->specular; + bool diffuse = vdecl->diffuse; unsigned int i; context->last_was_rhw = transformed; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 98b58cbeb06..df502af247f 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6629,7 +6629,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, settings->per_vertex_point_size = vdecl->point_size; wined3d_get_material_colour_source(&diffuse_source, &emissive_source, - &ambient_source, &specular_source, state, si); + &ambient_source, &specular_source, state); settings->diffuse_source = diffuse_source; settings->emissive_source = emissive_source; settings->ambient_source = ambient_source; diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index d86b6afc41c..9affc604f13 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -222,6 +222,10 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara declaration->position_transformed = true; else if (e->usage == WINED3D_DECL_USAGE_PSIZE) declaration->point_size = true; + else if (e->usage == WINED3D_DECL_USAGE_COLOR && !e->usage_idx) + declaration->diffuse = true; + else if (e->usage == WINED3D_DECL_USAGE_COLOR && e->usage_idx == 1) + declaration->specular = true; /* Find the streams used in the declaration. The vertex buffers have * to be loaded when drawing, but filter tessellation pseudo streams. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ff192c1b3f4..a1a981d5a4c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3493,6 +3493,8 @@ struct wined3d_vertex_declaration bool position_transformed; bool point_size; + bool diffuse; + bool specular; }; bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info, @@ -4625,21 +4627,22 @@ static inline void wined3d_not_from_cs(const struct wined3d_cs *cs) assert(cs->thread_id != GetCurrentThreadId()); } -static inline enum wined3d_material_color_source validate_material_colour_source(WORD use_map, - enum wined3d_material_color_source source) +static inline enum wined3d_material_color_source validate_material_colour_source( + const struct wined3d_vertex_declaration *vdecl, enum wined3d_material_color_source source) { - if (source == WINED3D_MCS_COLOR1 && use_map & (1u << WINED3D_FFP_DIFFUSE)) + if (source == WINED3D_MCS_COLOR1 && vdecl->diffuse) return source; - if (source == WINED3D_MCS_COLOR2 && use_map & (1u << WINED3D_FFP_SPECULAR)) + if (source == WINED3D_MCS_COLOR2 && vdecl->specular) return source; return WINED3D_MCS_MATERIAL; } static inline void wined3d_get_material_colour_source(enum wined3d_material_color_source *diffuse, enum wined3d_material_color_source *emissive, enum wined3d_material_color_source *ambient, - enum wined3d_material_color_source *specular, const struct wined3d_state *state, - const struct wined3d_stream_info *si) + enum wined3d_material_color_source *specular, const struct wined3d_state *state) { + const struct wined3d_vertex_declaration *vdecl = state->vertex_declaration; + if (!state->render_states[WINED3D_RS_LIGHTING]) { *diffuse = WINED3D_MCS_COLOR1; @@ -4656,10 +4659,10 @@ static inline void wined3d_get_material_colour_source(enum wined3d_material_colo return; } - *diffuse = validate_material_colour_source(si->use_map, state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE]); - *emissive = validate_material_colour_source(si->use_map, state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE]); - *ambient = validate_material_colour_source(si->use_map, state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE]); - *specular = validate_material_colour_source(si->use_map, state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE]); + *diffuse = validate_material_colour_source(vdecl, state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE]); + *emissive = validate_material_colour_source(vdecl, state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE]); + *ambient = validate_material_colour_source(vdecl, state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE]); + *specular = validate_material_colour_source(vdecl, state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE]); } static inline void wined3d_vec4_transform(struct wined3d_vec4 *dst,
1
0
0
0
Elizabeth Figura : wined3d: Just check the vertex declaration for point size usage.
by Alexandre Julliard
05 Jun '24
05 Jun '24
Module: wine Branch: master Commit: db63c8be29fdadf95e4ce2788f5b39e58b0cfe86 URL:
https://gitlab.winehq.org/wine/wine/-/commit/db63c8be29fdadf95e4ce2788f5b39…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri May 3 16:42:42 2024 -0500 wined3d: Just check the vertex declaration for point size usage. Do not check the stream info. In practice, this amounts to a difference if the usage is included in the vertex declaration but the corresponding stream is not bound. The just-added tests show that in this case it is correct to use per-vertex point size with a default size of one, rather than treating this case as equivalent to if the usage was not specified in the vertex declaration. --- dlls/d3d9/tests/visual.c | 19 ++++++++----------- dlls/wined3d/glsl_shader.c | 3 ++- dlls/wined3d/utils.c | 5 +++-- dlls/wined3d/vertexdeclaration.c | 4 +++- dlls/wined3d/wined3d_private.h | 3 ++- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index d1020339db0..4b8a7a994b3 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12332,17 +12332,14 @@ static void test_pointsize(void) ok(color != 0xff00ffff, "Got unexpected color 0x%08x at (64, 64).\n", color); } - todo_wine_if (j == 10 || (j == 11 && i == 10)) - { - color = get_readback_color(&rb, 63, 64); - ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (63, 64).\n", color); - color = get_readback_color(&rb, 65, 64); - ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (65, 64).\n", color); - color = get_readback_color(&rb, 64, 63); - ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (64, 63).\n", color); - color = get_readback_color(&rb, 64, 65); - ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (64, 65).\n", color); - } + color = get_readback_color(&rb, 63, 64); + ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (63, 64).\n", color); + color = get_readback_color(&rb, 65, 64); + ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (65, 64).\n", color); + color = get_readback_color(&rb, 64, 63); + ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (64, 63).\n", color); + color = get_readback_color(&rb, 64, 65); + ok(color == 0xff00ffff, "Got unexpected color 0x%08x at (64, 65).\n", color); } else { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 463dbf47fd6..ae618266d79 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -11756,15 +11756,16 @@ static void glsl_vertex_pipe_shader(struct wined3d_context *context, static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { + const struct wined3d_vertex_declaration *vdecl = state->vertex_declaration; struct wined3d_context_gl *context_gl = wined3d_context_gl(context); const struct wined3d_gl_info *gl_info = context_gl->gl_info; BOOL specular = !!(context->stream_info.use_map & (1u << WINED3D_FFP_SPECULAR)); - BOOL point_size = !!(context->stream_info.use_map & (1u << WINED3D_FFP_PSIZE)); BOOL diffuse = !!(context->stream_info.use_map & (1u << WINED3D_FFP_DIFFUSE)); BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL)); const BOOL legacy_clip_planes = needs_legacy_glsl_syntax(gl_info); BOOL transformed = context->stream_info.position_transformed; BOOL wasrhw = context->last_was_rhw; + bool point_size = vdecl->point_size; unsigned int i; context->last_was_rhw = transformed; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index a1c5a00d51f..98b58cbeb06 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -6566,6 +6566,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_ffp_vs_settings *settings) { enum wined3d_material_color_source diffuse_source, emissive_source, ambient_source, specular_source; + const struct wined3d_vertex_declaration *vdecl = state->vertex_declaration; const struct wined3d_stream_info *si = &context->stream_info; const struct wined3d_d3d_info *d3d_info = context->d3d_info; unsigned int coord_idx, i; @@ -6576,7 +6577,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, { settings->transformed = 1; settings->point_size = state->primitive_type == WINED3D_PT_POINTLIST; - settings->per_vertex_point_size = !!(si->use_map & 1u << WINED3D_FFP_PSIZE); + settings->per_vertex_point_size = vdecl->point_size; if (!state->render_states[WINED3D_RS_FOGENABLE]) settings->fog_mode = WINED3D_FFP_VS_FOG_OFF; else if (state->render_states[WINED3D_RS_FOGTABLEMODE] != WINED3D_FOG_NONE) @@ -6625,7 +6626,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, settings->localviewer = !!state->render_states[WINED3D_RS_LOCALVIEWER]; settings->specular_enable = !!state->render_states[WINED3D_RS_SPECULARENABLE]; settings->point_size = state->primitive_type == WINED3D_PT_POINTLIST; - settings->per_vertex_point_size = !!(si->use_map & 1u << WINED3D_FFP_PSIZE); + settings->per_vertex_point_size = vdecl->point_size; wined3d_get_material_colour_source(&diffuse_source, &emissive_source, &ambient_source, &specular_source, state, si); diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index c48c621bd11..d86b6afc41c 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -219,7 +219,9 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara alignment = 4; if (e->usage == WINED3D_DECL_USAGE_POSITIONT) - declaration->position_transformed = TRUE; + declaration->position_transformed = true; + else if (e->usage == WINED3D_DECL_USAGE_PSIZE) + declaration->point_size = true; /* Find the streams used in the declaration. The vertex buffers have * to be loaded when drawing, but filter tessellation pseudo streams. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 85badd3b2c3..ff192c1b3f4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3491,7 +3491,8 @@ struct wined3d_vertex_declaration struct wined3d_vertex_declaration_element *elements; unsigned int element_count; - BOOL position_transformed; + bool position_transformed; + bool point_size; }; bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info,
1
0
0
0
← Newer
1
...
51
52
53
54
55
56
57
...
62
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
Results per page:
10
25
50
100
200