winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2016
----- 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
722 discussions
Start a n
N
ew thread
Nikolay Sivov : dwrite: Update to IDWriteFontCollection1.
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 962f16e94b3d8bdc50d944c1f451fad2cf60c12f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=962f16e94b3d8bdc50d944c1f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 8 22:46:53 2016 +0300 dwrite: Update to IDWriteFontCollection1. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 77 ++++++++++++++++++++++++++++++------------------ dlls/dwrite/tests/font.c | 26 ++++++++++++++++ 2 files changed, 75 insertions(+), 28 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=962f16e94b3d8bdc50d94…
1
0
0
0
Nikolay Sivov : dwrite: Implement IDWriteFontFamily1::GetFont().
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: cf3e92994d286e287cd9effa63ee1d99ccdab44d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf3e92994d286e287cd9effa6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 8 22:46:52 2016 +0300 dwrite: Implement IDWriteFontFamily1::GetFont(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 24 ++++++++++++++++-------- dlls/dwrite/tests/font.c | 6 +----- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 76321bb..edfde6f 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1541,7 +1541,7 @@ static const IDWriteFont3Vtbl dwritefontvtbl = { dwritefont3_GetLocality }; -static HRESULT create_font(struct dwrite_font_data *data, IDWriteFontFamily1 *family, IDWriteFont **font) +static HRESULT create_font(struct dwrite_font_data *data, IDWriteFontFamily1 *family, IDWriteFont3 **font) { struct dwrite_font *This; *font = NULL; @@ -1557,7 +1557,7 @@ static HRESULT create_font(struct dwrite_font_data *data, IDWriteFontFamily1 *fa This->data = data; InterlockedIncrement(&This->data->ref); - *font = (IDWriteFont*)&This->IDWriteFont3_iface; + *font = &This->IDWriteFont3_iface; return S_OK; } @@ -1635,7 +1635,7 @@ static HRESULT WINAPI dwritefontlist_GetFont(IDWriteFontList *iface, UINT32 inde if (index >= This->font_count) return E_INVALIDARG; - return create_font(This->fonts[index], This->family, font); + return create_font(This->fonts[index], This->family, (IDWriteFont3**)font); } static const IDWriteFontListVtbl dwritefontlistvtbl = { @@ -1723,7 +1723,7 @@ static HRESULT WINAPI dwritefontfamily_GetFont(IDWriteFontFamily1 *iface, UINT32 if (index >= This->data->font_count) return E_INVALIDARG; - return create_font(This->data->fonts[index], iface, font); + return create_font(This->data->fonts[index], iface, (IDWriteFont3**)font); } static HRESULT WINAPI dwritefontfamily_GetFamilyNames(IDWriteFontFamily1 *iface, IDWriteLocalizedStrings **names) @@ -1796,7 +1796,7 @@ static HRESULT WINAPI dwritefontfamily_GetFirstMatchingFont(IDWriteFontFamily1 * match = This->data->fonts[i]; } - return create_font(match, iface, font); + return create_font(match, iface, (IDWriteFont3**)font); } typedef BOOL (*matching_filter_func)(const struct dwrite_font_data*); @@ -1902,9 +1902,17 @@ static HRESULT WINAPI dwritefontfamily1_GetFont(IDWriteFontFamily1 *iface, UINT3 { struct dwrite_fontfamily *This = impl_from_IDWriteFontFamily1(iface); - FIXME("(%p)->(%u %p): stub\n", This, index, font); + TRACE("(%p)->(%u %p)\n", This, index, font); - return E_NOTIMPL; + *font = NULL; + + if (This->data->font_count == 0) + return S_FALSE; + + if (index >= This->data->font_count) + return E_FAIL; + + return create_font(This->data->fonts[index], iface, font); } static HRESULT WINAPI dwritefontfamily1_GetFontFaceReference(IDWriteFontFamily1 *iface, UINT32 index, @@ -2121,7 +2129,7 @@ static HRESULT WINAPI dwritefontcollection_GetFontFromFontFace(IDWriteFontCollec if (FAILED(hr)) return hr; - hr = create_font(found_font, family, font); + hr = create_font(found_font, family, (IDWriteFont3**)font); IDWriteFontFamily1_Release(family); return hr; } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index a2c1ce0..8982f19 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -1128,15 +1128,12 @@ if (0) /* crashes on native */ font3 = (void*)0xdeadbeef; hr = IDWriteFontFamily1_GetFont(family1, ~0u, &font3); - todo_wine { ok(hr == E_FAIL, "got 0x%08x\n", hr); ok(font3 == NULL, "got %p\n", font3); - } + hr = IDWriteFontFamily1_GetFont(family1, 0, &font3); - todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); - if (hr == S_OK) { hr = IDWriteFont3_QueryInterface(font3, &IID_IDWriteFont, (void**)&font); ok(hr == S_OK, "got 0x%08x\n", hr); IDWriteFont_Release(font); @@ -1146,7 +1143,6 @@ if (0) /* crashes on native */ IDWriteFont1_Release(font1); IDWriteFont3_Release(font3); - } IDWriteFontFamily1_Release(family1); } else
1
0
0
0
Nikolay Sivov : dwrite: Update to IDWriteFontFamily1.
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 05e42a55ec6093e424da08d34df7f992a1b46e1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05e42a55ec6093e424da08d34…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Mar 8 22:46:51 2016 +0300 dwrite: Update to IDWriteFontFamily1. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/font.c | 115 ++++++++++++++++++++++++++++++----------------- dlls/dwrite/tests/font.c | 37 ++++++++++++++- 2 files changed, 109 insertions(+), 43 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=05e42a55ec6093e424da0…
1
0
0
0
Paul Gofman : d3dx9: Support setting texture through SetValue in effect.
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 1da5af93640e6a46070ae6cad68d5e67dee2694b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1da5af93640e6a46070ae6cad…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Tue Mar 8 02:33:27 2016 +0300 d3dx9: Support setting texture through SetValue in effect. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/effect.c | 20 ++++++++++++++++++++ dlls/d3dx9_36/tests/effect.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index a374d90..e42cf86 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1366,6 +1366,26 @@ static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, { switch (param->type) { + case D3DXPT_TEXTURE: + case D3DXPT_TEXTURE1D: + case D3DXPT_TEXTURE2D: + case D3DXPT_TEXTURE3D: + case D3DXPT_TEXTURECUBE: + { + unsigned int i; + + for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) + { + IUnknown *unk = ((IUnknown **)data)[i]; + if (unk) + IUnknown_AddRef(unk); + + unk = ((IUnknown **)param->data)[i]; + if (unk) + IUnknown_Release(unk); + } + } + /* fallthrough */ case D3DXPT_VOID: case D3DXPT_BOOL: case D3DXPT_INT: diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index de7d1e9..a785f4d 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -2389,6 +2389,43 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) } } +static void test_effect_setvalue_object(IDirect3DDevice9 *device) +{ + ID3DXEffect *effect; + D3DXHANDLE parameter; + IDirect3DTexture9 *texture; + IDirect3DTexture9 *texture_set; + HRESULT hr; + ULONG count; + + hr = D3DXCreateEffect(device, test_effect_parameter_value_blob_object, + sizeof(test_effect_parameter_value_blob_object), NULL, NULL, 0, NULL, &effect, NULL); + ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + + parameter = effect->lpVtbl->GetParameterByName(effect, NULL, "tex"); + ok(parameter != NULL, "GetParameterByName failed, got %p\n", parameter); + + texture = NULL; + hr = D3DXCreateTexture(device, D3DX_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, 0, D3DPOOL_DEFAULT, &texture); + ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + hr = effect->lpVtbl->SetValue(effect, parameter, &texture, sizeof(texture)); + ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + texture_set = NULL; + hr = effect->lpVtbl->GetValue(effect, parameter, &texture_set, sizeof(texture_set)); + ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + ok(texture == texture_set, "Texture does not match.\n"); + + count = IDirect3DTexture9_Release(texture_set); + ok(count == 2, "Got reference count %u, expected 2.\n", count); + texture_set = NULL; + hr = effect->lpVtbl->SetValue(effect, parameter, &texture_set, sizeof(texture_set)); + ok(hr == D3D_OK, "Got result %#x, expected 0 (D3D_OK).\n", hr); + count = IDirect3DTexture9_Release(texture); + ok(!count, "Got reference count %u, expected 0.\n", count); + + effect->lpVtbl->Release(effect); +} + /* * fxc.exe /Tfx_2_0 */ @@ -3008,6 +3045,7 @@ START_TEST(effect) test_create_effect_and_pool(device); test_create_effect_compiler(); test_effect_parameter_value(device); + test_effect_setvalue_object(device); test_effect_variable_names(device); test_effect_compilation_errors(device); test_effect_states(device);
1
0
0
0
Stefan Dösinger : wined3d: Call wined3d_volume_prepare_location() in wined3d_volume_load_location().
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 8d1131b8ec4cd9c458d60698dde4ba556251c834 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d1131b8ec4cd9c458d60698d…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Mar 8 15:51:16 2016 +0100 wined3d: Call wined3d_volume_prepare_location() in wined3d_volume_load_location(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/volume.c | 93 +++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index cfa3cf0..f70b50b 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -243,8 +243,9 @@ static BOOL wined3d_volume_can_evict(const struct wined3d_volume *volume) return TRUE; } + /* Context activation is done by the caller. */ -static void wined3d_volume_load_location(struct wined3d_volume *volume, +static BOOL wined3d_volume_load_location(struct wined3d_volume *volume, struct wined3d_context *context, DWORD location) { DWORD required_access = volume_access_from_location(location); @@ -256,32 +257,31 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, if ((volume->locations & location) == location) { TRACE("Location(s) already up to date.\n"); - return; + return TRUE; } if ((volume->resource.access_flags & required_access) != required_access) { ERR("Operation requires %#x access, but volume only has %#x.\n", required_access, volume->resource.access_flags); - return; + return FALSE; + } + + if (!wined3d_volume_prepare_location(volume, context, location)) + return FALSE; + + if (volume->locations & WINED3D_LOCATION_DISCARDED) + { + TRACE("Volume previously discarded, nothing to do.\n"); + wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); + goto done; } switch (location) { case WINED3D_LOCATION_TEXTURE_RGB: case WINED3D_LOCATION_TEXTURE_SRGB: - if ((location == WINED3D_LOCATION_TEXTURE_RGB - && !(texture->flags & WINED3D_TEXTURE_RGB_ALLOCATED)) - || (location == WINED3D_LOCATION_TEXTURE_SRGB - && !(texture->flags & WINED3D_TEXTURE_SRGB_ALLOCATED))) - ERR("Trying to load (s)RGB texture without prior allocation.\n"); - - if (volume->locations & WINED3D_LOCATION_DISCARDED) - { - TRACE("Volume previously discarded, nothing to do.\n"); - wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); - } - else if (volume->locations & WINED3D_LOCATION_SYSMEM) + if (volume->locations & WINED3D_LOCATION_SYSMEM) { struct wined3d_const_bo_address data = {0, volume->resource.heap_memory}; wined3d_texture_bind_and_dirtify(texture, context, @@ -310,25 +310,12 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, else { FIXME("Implement texture loading from %s.\n", wined3d_debug_location(volume->locations)); - return; + return FALSE; } - wined3d_volume_validate_location(volume, location); - - if (wined3d_volume_can_evict(volume)) - wined3d_volume_evict_sysmem(volume); - break; case WINED3D_LOCATION_SYSMEM: - if (!volume->resource.heap_memory) - ERR("Trying to load WINED3D_LOCATION_SYSMEM without setting it up first.\n"); - - if (volume->locations & WINED3D_LOCATION_DISCARDED) - { - TRACE("Volume previously discarded, nothing to do.\n"); - wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); - } - else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) + if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) { struct wined3d_bo_address data = {0, volume->resource.heap_memory}; @@ -344,21 +331,12 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, { FIXME("Implement WINED3D_LOCATION_SYSMEM loading from %s.\n", wined3d_debug_location(volume->locations)); - return; + return FALSE; } - wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM); break; case WINED3D_LOCATION_BUFFER: - if (!texture->sub_resources[volume->texture_level].buffer_object) - ERR("Trying to load WINED3D_LOCATION_BUFFER without setting it up first.\n"); - - if (volume->locations & WINED3D_LOCATION_DISCARDED) - { - TRACE("Volume previously discarded, nothing to do.\n"); - wined3d_volume_invalidate_location(volume, WINED3D_LOCATION_DISCARDED); - } - else if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) + if (volume->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) { struct wined3d_bo_address data = { @@ -377,15 +355,23 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, { FIXME("Implement WINED3D_LOCATION_BUFFER loading from %s.\n", wined3d_debug_location(volume->locations)); - return; + return FALSE; } - wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER); break; default: FIXME("Implement %s loading from %s.\n", wined3d_debug_location(location), wined3d_debug_location(volume->locations)); + return FALSE; } + +done: + wined3d_volume_validate_location(volume, location); + + if (location != WINED3D_LOCATION_SYSMEM && wined3d_volume_can_evict(volume)) + wined3d_volume_evict_sysmem(volume); + + return TRUE; } /* Context activation is done by the caller. */ @@ -415,9 +401,8 @@ static void volume_unload(struct wined3d_resource *resource) TRACE("texture %p.\n", resource); context = context_acquire(device, NULL); - if (wined3d_volume_prepare_location(volume, context, WINED3D_LOCATION_SYSMEM)) + if (wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM)) { - wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); } else @@ -465,6 +450,7 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume, BYTE *base_memory; const struct wined3d_format *format = volume->resource.format; const unsigned int fmt_flags = texture->resource.format_flags; + BOOL ret; TRACE("volume %p, map_desc %p, box %s, flags %#x.\n", volume, map_desc, debug_box(box), flags); @@ -498,7 +484,17 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume, context = context_acquire(device, NULL); gl_info = context->gl_info; - if (!wined3d_volume_prepare_location(volume, context, volume->resource.map_binding)) + if (flags & WINED3D_MAP_DISCARD) + { + wined3d_volume_validate_location(volume, volume->resource.map_binding); + ret = wined3d_volume_prepare_location(volume, context, volume->resource.map_binding); + } + else + { + ret = wined3d_volume_load_location(volume, context, volume->resource.map_binding); + } + + if (!ret) { ERR("Failed to prepare location.\n"); context_release(context); @@ -506,11 +502,6 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume, return E_OUTOFMEMORY; } - if (flags & WINED3D_MAP_DISCARD) - wined3d_volume_validate_location(volume, volume->resource.map_binding); - else - wined3d_volume_load_location(volume, context, volume->resource.map_binding); - if (volume->resource.map_binding == WINED3D_LOCATION_BUFFER) { GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, texture->sub_resources[volume->texture_level].buffer_object));
1
0
0
0
Henri Verbeet : wined3d: Introduce wined3d_volume_prepare_location().
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 84b9dd383700f562fcc3e0d9722e17325a5e2968 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=84b9dd383700f562fcc3e0d97…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 8 15:51:15 2016 +0100 wined3d: Introduce wined3d_volume_prepare_location(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/volume.c | 82 ++++++++++++++++++++++++++---------------- dlls/wined3d/wined3d_private.h | 1 - 2 files changed, 51 insertions(+), 32 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 457067d..cfa3cf0 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -27,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); -BOOL volume_prepare_system_memory(struct wined3d_volume *volume) +static BOOL volume_prepare_system_memory(struct wined3d_volume *volume) { if (volume->resource.heap_memory) return TRUE; @@ -40,6 +40,36 @@ BOOL volume_prepare_system_memory(struct wined3d_volume *volume) return TRUE; } +/* Context activation is done by the caller. Context may be NULL in + * WINED3D_NO3D mode. */ +static BOOL wined3d_volume_prepare_location(struct wined3d_volume *volume, + struct wined3d_context *context, DWORD location) +{ + struct wined3d_texture *texture = volume->container; + + switch (location) + { + case WINED3D_LOCATION_SYSMEM: + return volume_prepare_system_memory(volume); + + case WINED3D_LOCATION_BUFFER: + wined3d_texture_prepare_buffer_object(texture, volume->texture_level, context->gl_info); + return TRUE; + + case WINED3D_LOCATION_TEXTURE_RGB: + wined3d_texture_prepare_texture(texture, context, FALSE); + return TRUE; + + case WINED3D_LOCATION_TEXTURE_SRGB: + wined3d_texture_prepare_texture(texture, context, TRUE); + return TRUE; + + default: + ERR("Invalid location %s.\n", wined3d_debug_location(location)); + return FALSE; + } +} + /* This call just uploads data, the caller is responsible for binding the * correct texture. */ /* Context activation is done by the caller. */ @@ -384,11 +414,10 @@ static void volume_unload(struct wined3d_resource *resource) TRACE("texture %p.\n", resource); - if (volume_prepare_system_memory(volume)) + context = context_acquire(device, NULL); + if (wined3d_volume_prepare_location(volume, context, WINED3D_LOCATION_SYSMEM)) { - context = context_acquire(device, NULL); wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); - context_release(context); wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); } else @@ -397,6 +426,7 @@ static void volume_unload(struct wined3d_resource *resource) wined3d_volume_validate_location(volume, WINED3D_LOCATION_DISCARDED); wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_DISCARDED); } + context_release(context); /* The texture name is managed by the container. */ @@ -465,17 +495,24 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume, flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags); - if (volume->resource.map_binding == WINED3D_LOCATION_BUFFER) + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + if (!wined3d_volume_prepare_location(volume, context, volume->resource.map_binding)) { - context = context_acquire(device, NULL); - gl_info = context->gl_info; + ERR("Failed to prepare location.\n"); + context_release(context); + map_desc->data = NULL; + return E_OUTOFMEMORY; + } - wined3d_texture_prepare_buffer_object(texture, volume->texture_level, gl_info); - if (flags & WINED3D_MAP_DISCARD) - wined3d_volume_validate_location(volume, WINED3D_LOCATION_BUFFER); - else - wined3d_volume_load_location(volume, context, WINED3D_LOCATION_BUFFER); + if (flags & WINED3D_MAP_DISCARD) + wined3d_volume_validate_location(volume, volume->resource.map_binding); + else + wined3d_volume_load_location(volume, context, volume->resource.map_binding); + if (volume->resource.map_binding == WINED3D_LOCATION_BUFFER) + { GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, texture->sub_resources[volume->texture_level].buffer_object)); if (gl_info->supported[ARB_MAP_BUFFER_RANGE]) @@ -493,31 +530,14 @@ HRESULT wined3d_volume_map(struct wined3d_volume *volume, GL_EXTCALL(glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0)); checkGLcall("Map PBO"); - - context_release(context); } else { - if (!volume_prepare_system_memory(volume)) - { - WARN("Out of memory.\n"); - map_desc->data = NULL; - return E_OUTOFMEMORY; - } - - if (flags & WINED3D_MAP_DISCARD) - { - wined3d_volume_validate_location(volume, WINED3D_LOCATION_SYSMEM); - } - else if (!(volume->locations & WINED3D_LOCATION_SYSMEM)) - { - context = context_acquire(device, NULL); - wined3d_volume_load_location(volume, context, WINED3D_LOCATION_SYSMEM); - context_release(context); - } base_memory = volume->resource.heap_memory; } + context_release(context); + TRACE("Base memory pointer %p.\n", base_memory); if (fmt_flags & WINED3DFMT_FLAG_BROKEN_PITCH) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 9eca0e0..2c2dc84 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2454,7 +2454,6 @@ static inline struct wined3d_volume *volume_from_resource(struct wined3d_resourc return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } -BOOL volume_prepare_system_memory(struct wined3d_volume *volume) DECLSPEC_HIDDEN; void wined3d_volume_cleanup(struct wined3d_volume *volume) DECLSPEC_HIDDEN; HRESULT wined3d_volume_init(struct wined3d_volume *volume, struct wined3d_texture *container, const struct wined3d_resource_desc *desc, UINT level) DECLSPEC_HIDDEN;
1
0
0
0
Henri Verbeet : wined3d: Sanitise map flags in wined3d_surface_map().
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: c5d47bd6fe0ab6d6d9f47ea85b245b586270d7c2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5d47bd6fe0ab6d6d9f47ea85…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 8 15:51:14 2016 +0100 wined3d: Sanitise map flags in wined3d_surface_map(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c7545e0..1bdeecf 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2184,6 +2184,8 @@ HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_ } } + flags = wined3d_resource_sanitize_map_flags(&texture->resource, flags); + if (device->d3d_initialized) { context = context_acquire(device, NULL);
1
0
0
0
Henri Verbeet : wined3d: Replace D3DCOLORTOGLFLOAT4 with an inline function.
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: edb3ea66a010f4a25646a42a294cc3e9824fca33 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edb3ea66a010f4a25646a42a2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 8 15:51:13 2016 +0100 wined3d: Replace D3DCOLORTOGLFLOAT4 with an inline function. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 8 ++++---- dlls/wined3d/ati_fragment_shader.c | 16 ++++++++-------- dlls/wined3d/drawprim.c | 6 +++--- dlls/wined3d/glsl_shader.c | 22 +++++++++++----------- dlls/wined3d/nvidia_texture_shader.c | 6 +++--- dlls/wined3d/state.c | 29 +++++++++++++++-------------- dlls/wined3d/wined3d_private.h | 13 +++++++------ 7 files changed, 51 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=edb3ea66a010f4a25646a…
1
0
0
0
Henri Verbeet : wined3d: Get rid of the D3DCOLOR_[RGBA] macros.
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 09aa6acc0be418b3f1c097ff493923894ae6bfd9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09aa6acc0be418b3f1c097ff4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 8 15:51:12 2016 +0100 wined3d: Get rid of the D3DCOLOR_[RGBA] macros. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/wined3d_private.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 87c5f9b..3136a52 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -989,16 +989,11 @@ extern const struct wined3d_shader_backend_ops none_shader_backend DECLSPEC_HIDD #define D3DCOLOR_B_B(dw) (((dw) >> 0) & 0xff) #define D3DCOLOR_B_A(dw) (((dw) >> 24) & 0xff) -#define D3DCOLOR_R(dw) (((float) (((dw) >> 16) & 0xff)) / 255.0f) -#define D3DCOLOR_G(dw) (((float) (((dw) >> 8) & 0xff)) / 255.0f) -#define D3DCOLOR_B(dw) (((float) (((dw) >> 0) & 0xff)) / 255.0f) -#define D3DCOLOR_A(dw) (((float) (((dw) >> 24) & 0xff)) / 255.0f) - #define D3DCOLORTOGLFLOAT4(dw, vec) do { \ - (vec)[0] = D3DCOLOR_R(dw); \ - (vec)[1] = D3DCOLOR_G(dw); \ - (vec)[2] = D3DCOLOR_B(dw); \ - (vec)[3] = D3DCOLOR_A(dw); \ + (vec)[0] = D3DCOLOR_B_R(dw) / 255.0f; \ + (vec)[1] = D3DCOLOR_B_G(dw) / 255.0f; \ + (vec)[2] = D3DCOLOR_B_B(dw) / 255.0f; \ + (vec)[3] = D3DCOLOR_B_A(dw) / 255.0f; \ } while(0) #define HIGHEST_TRANSFORMSTATE WINED3D_TS_WORLD_MATRIX(255) /* Highest value in wined3d_transform_state. */
1
0
0
0
Henri Verbeet : wined3d: Use D3DCOLORTOGLFLOAT4 in drawStridedSlow().
by Alexandre Julliard
09 Mar '16
09 Mar '16
Module: wine Branch: master Commit: 357e7b759fc4db6875f973ac7656ba85ed05965a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=357e7b759fc4db6875f973ac7…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 8 15:51:11 2016 +0100 wined3d: Use D3DCOLORTOGLFLOAT4 in drawStridedSlow(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/drawprim.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index c95f92d..64b8012 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -291,15 +291,10 @@ static void drawStridedSlow(const struct wined3d_device *device, struct wined3d_ if (num_untracked_materials) { - DWORD diffuseColor = ((const DWORD *)ptrToCoords)[0]; unsigned char i; float color[4]; - color[0] = D3DCOLOR_B_R(diffuseColor) / 255.0f; - color[1] = D3DCOLOR_B_G(diffuseColor) / 255.0f; - color[2] = D3DCOLOR_B_B(diffuseColor) / 255.0f; - color[3] = D3DCOLOR_B_A(diffuseColor) / 255.0f; - + D3DCOLORTOGLFLOAT4(*(const DWORD *)ptrToCoords, color); for (i = 0; i < num_untracked_materials; ++i) { gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, context->untracked_materials[i], color);
1
0
0
0
← Newer
1
...
50
51
52
53
54
55
56
...
73
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
Results per page:
10
25
50
100
200