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
July
June
May
April
March
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
August 2012
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
541 discussions
Start a n
N
ew thread
Nikolay Sivov : quartz: Use proper method macros.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: 17450f0be05fc331ed026d61f7ea9678a1e356c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17450f0be05fc331ed026d61f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Aug 15 08:24:18 2012 +0400 quartz: Use proper method macros. --- dlls/quartz/dsoundrender.c | 2 +- dlls/quartz/filesource.c | 2 +- dlls/quartz/filtergraph.c | 14 +++++++------- dlls/quartz/vmr9.c | 30 +++++++++++++++--------------- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 0b5463e..0a498b0 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -656,7 +656,7 @@ HRESULT DSoundRender_create(IUnknown * pUnkOuter, LPVOID * ppv) hr = IDirectSound_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc, &buf, NULL); if (SUCCEEDED(hr)) { IDirectSoundBuffer_Play(buf, 0, 0, DSBPLAY_LOOPING); - IUnknown_Release(buf); + IDirectSoundBuffer_Release(buf); } hr = S_OK; } diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 375ce04..e5a5d3c 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -517,7 +517,7 @@ static HRESULT WINAPI AsyncReader_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin } *ppPin = This->pOutputPin; - IUnknown_AddRef(*ppPin); + IPin_AddRef(*ppPin); return S_OK; } diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 6b0085d..1cc1df9 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -772,13 +772,13 @@ static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource(IFilterGraph2 *iface) { DWORD miscflags; IAMFilterMiscFlags *flags = NULL; - IUnknown_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags); + IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags); if (!flags) continue; miscflags = IAMFilterMiscFlags_GetMiscFlags(flags); - IUnknown_Release(flags); + IAMFilterMiscFlags_Release(flags); if (miscflags == AM_FILTER_MISC_FLAGS_IS_RENDERER) - IUnknown_QueryInterface(This->ppFiltersInGraph[i], &IID_IReferenceClock, (void**)&pClock); + IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IReferenceClock, (void**)&pClock); if (pClock) break; } @@ -1039,7 +1039,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, if (FAILED(rc)) { TRACE("Filter rejected by IAMGraphBuilderCallback_SelectedFilter\n"); - IUnknown_Release(callback); + IAMGraphBuilderCallback_Release(callback); goto error; } } @@ -1055,7 +1055,7 @@ static HRESULT WINAPI FilterGraph2_Connect(IFilterGraph2 *iface, IPin *ppinOut, { HRESULT rc; rc = IAMGraphBuilderCallback_CreatedFilter(callback, pfilter); - IUnknown_Release(callback); + IAMGraphBuilderCallback_Release(callback); if (FAILED(rc)) { IBaseFilter_Release(pfilter); @@ -2200,11 +2200,11 @@ static HRESULT all_renderers_seek(IFilterGraphImpl *This, fnFoundSeek FoundSeek, IBaseFilter* pfilter = This->ppFiltersInGraph[i]; IAMFilterMiscFlags *flags = NULL; ULONG filterflags; - IUnknown_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags); + IBaseFilter_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags); if (!flags) continue; filterflags = IAMFilterMiscFlags_GetMiscFlags(flags); - IUnknown_Release(flags); + IAMFilterMiscFlags_Release(flags); if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER) continue; diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index f197878..847b460 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -293,7 +293,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(BaseRenderer *iface, IMediaSample * pS info.szAspectRatio.cx = This->bmiheader.biWidth; info.szAspectRatio.cy = This->bmiheader.biHeight; - hr = IVMRSurfaceAllocator9_GetSurface(This->allocator, This->cookie, (++This->cur_surface)%This->num_surfaces, 0, &info.lpSurf); + hr = IVMRSurfaceAllocatorEx9_GetSurface(This->allocator, This->cookie, (++This->cur_surface)%This->num_surfaces, 0, &info.lpSurf); if (FAILED(hr)) return hr; @@ -794,14 +794,14 @@ static ULONG WINAPI VMR9Inner_Release(IUnknown * iface) CloseHandle(This->hD3d9); if (This->allocator) - IVMRSurfaceAllocator9_Release(This->allocator); + IVMRSurfaceAllocatorEx9_Release(This->allocator); if (This->presenter) IVMRImagePresenter9_Release(This->presenter); This->num_surfaces = 0; if (This->allocator_d3d9_dev) { - IUnknown_Release(This->allocator_d3d9_dev); + IDirect3DDevice9_Release(This->allocator_d3d9_dev); This->allocator_d3d9_dev = NULL; } @@ -1146,7 +1146,7 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface } if (This->allocator) - IVMRSurfaceAllocator9_Release(This->allocator); + IVMRSurfaceAllocatorEx9_Release(This->allocator); if (This->presenter) IVMRImagePresenter9_Release(This->presenter); @@ -1166,12 +1166,12 @@ static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode(IVMRFilterConfig9 *iface if (FAILED(hr)) { ERR("Unable to find Presenter interface\n"); - IVMRSurfaceAllocatorEx9_Release(This->presenter); + IVMRImagePresenter9_Release(This->presenter); This->allocator = NULL; This->presenter = NULL; } else - hr = IVMRSurfaceAllocator9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface); + hr = IVMRSurfaceAllocatorEx9_AdviseNotify(This->allocator, &This->IVMRSurfaceAllocatorNotify9_iface); break; case VMR9Mode_Renderless: break; @@ -1449,15 +1449,15 @@ static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator(IVMRSurf if (This->presenter) return VFW_E_WRONG_STATE; - if (FAILED(IUnknown_QueryInterface(alloc, &IID_IVMRImagePresenter9, (void **)&This->presenter))) + if (FAILED(IVMRSurfaceAllocator9_QueryInterface(alloc, &IID_IVMRImagePresenter9, (void **)&This->presenter))) return E_NOINTERFACE; - if (SUCCEEDED(IUnknown_QueryInterface(alloc, &IID_IVMRSurfaceAllocatorEx9, (void **)&This->allocator))) + if (SUCCEEDED(IVMRSurfaceAllocator9_QueryInterface(alloc, &IID_IVMRSurfaceAllocatorEx9, (void **)&This->allocator))) This->allocator_is_ex = 1; else { This->allocator = (IVMRSurfaceAllocatorEx9 *)alloc; - IUnknown_AddRef(alloc); + IVMRSurfaceAllocator9_AddRef(alloc); This->allocator_is_ex = 0; } @@ -1694,7 +1694,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) int i; TRACE("Destroying\n"); CloseHandle(This->ack); - IUnknown_Release(This->d3d9_ptr); + IDirect3D9_Release(This->d3d9_ptr); TRACE("Number of surfaces: %u\n", This->num_surfaces); for (i = 0; i < This->num_surfaces; ++i) @@ -1702,7 +1702,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) IDirect3DSurface9 *surface = This->d3d9_surfaces[i]; TRACE("Releasing surface %p\n", surface); if (surface) - IUnknown_Release(surface); + IDirect3DSurface9_Release(surface); } CoTaskMemFree(This->d3d9_surfaces); @@ -1710,7 +1710,7 @@ static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface) This->num_surfaces = 0; if (This->d3d9_vertex) { - IUnknown_Release(This->d3d9_vertex); + IDirect3DVertexBuffer9_Release(This->d3d9_vertex); This->d3d9_vertex = NULL; } CoTaskMemFree(This); @@ -2118,7 +2118,7 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPrese IDirect3DSurface9 *surface = This->d3d9_surfaces[i]; TRACE("Releasing surface %p\n", surface); if (surface) - IUnknown_Release(surface); + IDirect3DSurface9_Release(surface); } ZeroMemory(This->d3d9_surfaces, sizeof(IDirect3DSurface9 *) * This->num_surfaces); @@ -2215,7 +2215,7 @@ static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface(IVMRSurfaceAllocatorEx9 * return E_FAIL; } *surface = This->d3d9_surfaces[surfaceindex]; - IUnknown_AddRef(*surface); + IDirect3DSurface9_AddRef(*surface); return S_OK; } @@ -2283,7 +2283,7 @@ static HRESULT VMR9DefaultAllocatorPresenterImpl_create(VMR9Impl *parent, LPVOID if (hr == D3DERR_NOTAVAILABLE) { ERR("Format not supported\n"); - IUnknown_Release(This->d3d9_ptr); + IDirect3D9_Release(This->d3d9_ptr); CoTaskMemFree(This); return VFW_E_DDRAW_CAPS_NOT_SUITABLE; }
1
0
0
0
Matteo Bruni : wined3d: Improve post-pixelshader blending test.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: a488e574497d674631b4036d4b179ce349ddb764 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a488e574497d674631b4036d4…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Aug 15 00:38:26 2012 +0200 wined3d: Improve post-pixelshader blending test. --- dlls/wined3d/utils.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 03c5b59..4f8108f 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1067,10 +1067,11 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined if (status == GL_FRAMEBUFFER_COMPLETE && ((format->flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) || !(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) && format->id != WINED3DFMT_NULL && format->id != WINED3DFMT_P8_UINT - && format->glFormat != GL_LUMINANCE && format->glFormat != GL_LUMINANCE_ALPHA) + && format->glFormat != GL_LUMINANCE && format->glFormat != GL_LUMINANCE_ALPHA + && (format->red_size || format->alpha_size)) { GLuint rb, tex2; - DWORD readback[16 * 16], color; + DWORD readback[16 * 16], color, r_range, a_range; BYTE r, a; BOOL match = TRUE; @@ -1096,6 +1097,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined } else { + gl_info->gl_ops.gl.p_glDisable(GL_BLEND); gl_info->gl_ops.gl.p_glViewport(0, 0, 16, 16); gl_info->gl_ops.gl.p_glDisable(GL_LIGHTING); gl_info->gl_ops.gl.p_glMatrixMode(GL_MODELVIEW); @@ -1107,28 +1109,24 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined /* Draw a full-black quad */ gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP); - gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff); + gl_info->gl_ops.gl.p_glColor4f(0.0f, 0.0f, 0.0f, 1.0f); gl_info->gl_ops.gl.p_glVertex3f(-1.0f, -1.0f, 0.0f); - gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff); gl_info->gl_ops.gl.p_glVertex3f(1.0f, -1.0f, 0.0f); - gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff); gl_info->gl_ops.gl.p_glVertex3f(-1.0f, 1.0f, 0.0f); - gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff); gl_info->gl_ops.gl.p_glVertex3f(1.0f, 1.0f, 0.0f); gl_info->gl_ops.gl.p_glEnd(); + gl_info->gl_ops.gl.p_glEnable(GL_BLEND); /* Draw a half-transparent red quad */ gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP); - gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80); + gl_info->gl_ops.gl.p_glColor4f(1.0f, 0.0f, 0.0f, 0.5f); gl_info->gl_ops.gl.p_glVertex3f(-1.0f, -1.0f, 0.0f); - gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80); gl_info->gl_ops.gl.p_glVertex3f(1.0f, -1.0f, 0.0f); - gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80); gl_info->gl_ops.gl.p_glVertex3f(-1.0f, 1.0f, 0.0f); - gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80); gl_info->gl_ops.gl.p_glVertex3f(1.0f, 1.0f, 0.0f); gl_info->gl_ops.gl.p_glEnd(); + gl_info->gl_ops.gl.p_glDisable(GL_BLEND); gl_info->gl_ops.gl.p_glGenTextures(1, &tex2); gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex2); @@ -1140,9 +1138,11 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined a = color >> 24; r = (color & 0x00ff0000) >> 16; - if (format->red_size && (r < 0x7b || r > 0x84)) + r_range = format->red_size < 8 ? 1 << (8 - format->red_size - 1) : 1; + a_range = format->alpha_size < 8 ? 1 << (8 - format->alpha_size - 1) : 1; + if (format->red_size && (r < 0x80 - r_range || r > 0x80 + r_range)) match = FALSE; - else if (format->alpha_size > 1 && (a < 0x9f || a > 0xdf)) + else if (format->alpha_size > 1 && (a < 0xbf - a_range || a > 0xbf + a_range)) match = FALSE; if (!match) {
1
0
0
0
Matteo Bruni : wined3d: Fix pixel format masks.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: 902049c054f6b4d59287efb209604459227e6c3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=902049c054f6b4d59287efb20…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Aug 15 00:38:25 2012 +0200 wined3d: Fix pixel format masks. --- dlls/wined3d/context.c | 2 +- dlls/wined3d/state.c | 6 +- dlls/wined3d/surface.c | 20 +++- dlls/wined3d/utils.c | 207 +++++++++++++++++++-------------------- dlls/wined3d/wined3d_private.h | 12 ++- 5 files changed, 127 insertions(+), 120 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=902049c054f6b4d59287e…
1
0
0
0
Matteo Bruni : wined3d: Dump postblend color.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: 0a37a86f356e84b14187165a5cf67042ae8a7d6b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0a37a86f356e84b14187165a5…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Aug 15 00:38:24 2012 +0200 wined3d: Dump postblend color. --- dlls/wined3d/utils.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 0dcb431..92a8b48 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1158,6 +1158,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined else { TRACE("Format supports post-pixelshader blending.\n"); + TRACE("Color output: %#x\n", color); format->flags |= WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING; }
1
0
0
0
Matteo Bruni : wined3d: Use GL_FRAMEBUFFER_SRGB when possible.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: 152a09ce75b97b1139e358428cea2c371a8b6804 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=152a09ce75b97b1139e358428…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Aug 15 00:38:23 2012 +0200 wined3d: Use GL_FRAMEBUFFER_SRGB when possible. --- dlls/wined3d/arb_program_shader.c | 15 +++++++++++++++ dlls/wined3d/directx.c | 10 ++++++++++ dlls/wined3d/shader.c | 13 +++++++++++-- dlls/wined3d/utils.c | 3 ++- dlls/wined3d/wined3d_gl.h | 7 +++++++ include/wine/wined3d.h | 1 + 6 files changed, 46 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 744b6af..c8799df 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -6495,6 +6495,20 @@ static void textransform(struct wined3d_context *context, const struct wined3d_s fragment_prog_arbfp(context, state, state_id); } +static void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +{ + const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_surface *rt = state->fb->render_targets[0]; + + TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); + + if (state->render_states[WINED3D_RS_SRGBWRITEENABLE] + && rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) + gl_info->gl_ops.gl.p_glEnable(GL_FRAMEBUFFER_SRGB); + else + gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB); +} + static const struct StateEntryTemplate arbfp_fragmentstate_template[] = { {STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), { STATE_RENDER(WINED3D_RS_TEXTUREFACTOR), state_texfactor_arbfp }, WINED3D_GL_EXT_NONE }, @@ -6624,6 +6638,7 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {STATE_RENDER(WINED3D_RS_FOGVERTEXMODE), { STATE_RENDER(WINED3D_RS_FOGENABLE), NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_FOGSTART), { STATE_RENDER(WINED3D_RS_FOGSTART), state_fogstartend }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_FOGEND), { STATE_RENDER(WINED3D_RS_FOGSTART), NULL }, WINED3D_GL_EXT_NONE }, + {STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), { STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), state_srgbwrite }, ARB_FRAMEBUFFER_SRGB }, {STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE), { STATE_PIXELSHADER, NULL }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_FOGCOLOR), { STATE_RENDER(WINED3D_RS_FOGCOLOR), state_fogcolor }, WINED3D_GL_EXT_NONE }, {STATE_RENDER(WINED3D_RS_FOGDENSITY), { STATE_RENDER(WINED3D_RS_FOGDENSITY), state_fogdensity }, WINED3D_GL_EXT_NONE }, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e47b4e1..58397e9 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -100,6 +100,7 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_ARB_fragment_program", ARB_FRAGMENT_PROGRAM }, {"GL_ARB_fragment_shader", ARB_FRAGMENT_SHADER }, {"GL_ARB_framebuffer_object", ARB_FRAMEBUFFER_OBJECT }, + {"GL_ARB_framebuffer_sRGB", ARB_FRAMEBUFFER_SRGB }, {"GL_ARB_geometry_shader4", ARB_GEOMETRY_SHADER4 }, {"GL_ARB_half_float_pixel", ARB_HALF_FLOAT_PIXEL }, {"GL_ARB_half_float_vertex", ARB_HALF_FLOAT_VERTEX }, @@ -2731,6 +2732,13 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) /* GL_ARB_half_float_vertex is a subset of GL_NV_half_float. */ gl_info->supported[ARB_HALF_FLOAT_VERTEX] = TRUE; } + if (gl_info->supported[ARB_FRAMEBUFFER_SRGB] && !gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + /* Current wined3d sRGB infrastructure requires EXT_texture_sRGB_decode + * for GL_ARB_framebuffer_sRGB support (without EXT_texture_sRGB_decode + * we never render to sRGB surfaces). */ + gl_info->supported[ARB_FRAMEBUFFER_SRGB] = FALSE; + } ENTER_GL(); @@ -4608,6 +4616,8 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_SEPARATEALPHABLEND; if (gl_info->supported[EXT_DRAW_BUFFERS2]) caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS; + if (gl_info->supported[ARB_FRAMEBUFFER_SRGB]) + caps->PrimitiveMiscCaps |= WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT; caps->RasterCaps = WINED3DPRASTERCAPS_DITHER | WINED3DPRASTERCAPS_PAT | diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 1abafbb..2244ccd 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -1901,14 +1901,23 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct ps_compile_args *args) { struct wined3d_device *device = shader->device; + const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; const struct wined3d_texture *texture; UINT i; memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ - if (state->render_states[WINED3D_RS_SRGBWRITEENABLE]) + if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE]) { const struct wined3d_surface *rt = state->fb->render_targets[0]; - if (rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) args->srgb_correction = 1; + if (rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) + { + static unsigned int warned = 0; + + args->srgb_correction = 1; + if (state->render_states[WINED3D_RS_ALPHABLENDENABLE] && !warned++) + WARN("Blending into a sRGB render target with no GL_ARB_framebuffer_sRGB " + "support, expect rendering artifacts.\n"); + } } if (shader->reg_maps.shader_version.major == 1 diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 0be3972..0dcb431 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -3138,7 +3138,8 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s break; } } - if (state->render_states[WINED3D_RS_SRGBWRITEENABLE] + if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] + && state->render_states[WINED3D_RS_SRGBWRITEENABLE] && rt->resource.format->flags & WINED3DFMT_FLAG_SRGB_WRITE) { settings->sRGB_write = 1; diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index b87bc63..128937a 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -933,6 +933,7 @@ enum wined3d_gl_extension ARB_FRAGMENT_PROGRAM, ARB_FRAGMENT_SHADER, ARB_FRAMEBUFFER_OBJECT, + ARB_FRAMEBUFFER_SRGB, ARB_GEOMETRY_SHADER4, ARB_HALF_FLOAT_PIXEL, ARB_HALF_FLOAT_VERTEX, @@ -1255,6 +1256,12 @@ enum wined3d_gl_extension #define GL_TEXTURE_STENCIL_SIZE 0x88f1 #endif +/* GL_ARB_framebuffer_sRGB */ +#ifndef GL_ARB_framebuffer_sRGB +#define GL_ARB_framebuffer_sRGB 1 +#define GL_FRAMEBUFFER_SRGB 0x8db9 +#endif + /* GL_ARB_geometry_shader4 */ #ifndef GL_ARB_geometry_shader4 #define GL_ARB_geometry_shader4 1 diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 5208a79..4a11ff2 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1015,6 +1015,7 @@ enum wined3d_display_rotation #define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS 0x00040000 #define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING 0x00080000 #define WINED3DPMISCCAPS_FOGVERTEXCLAMPED 0x00100000 +#define WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT 0x00200000 #define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH 24 #define WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH 0
1
0
0
0
Michael Stefaniuc : widl: Avoid FALSE:TRUE conditional expressions.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: 2c97f3fcb5ecc73db7b1ab601dac00f93eb8a60b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2c97f3fcb5ecc73db7b1ab601…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 14 23:56:28 2012 +0200 widl: Avoid FALSE:TRUE conditional expressions. --- tools/widl/server.c | 5 ++--- tools/widl/typegen.c | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/widl/server.c b/tools/widl/server.c index 7f817b0..29b5bec 100644 --- a/tools/widl/server.c +++ b/tools/widl/server.c @@ -175,11 +175,10 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned /* if the context_handle attribute appears in the chain of types * without pointers being followed, then the context handle must * be direct, otherwise it is a pointer */ - int is_ch_ptr = is_aliaschain_attr(var->type, ATTR_CONTEXTHANDLE) ? FALSE : TRUE; + const char *ch_ptr = is_aliaschain_attr(var->type, ATTR_CONTEXTHANDLE) ? "*" : ""; print_server("("); write_type_decl_left(server, var->type); - fprintf(server, ")%sNDRSContextValue(__frame->%s)", - is_ch_ptr ? "" : "*", var->name); + fprintf(server, ")%sNDRSContextValue(__frame->%s)", ch_ptr, var->name); } else { diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 516d8e7..280bd05 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -4146,10 +4146,11 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const /* if the context_handle attribute appears in the chain of types * without pointers being followed, then the context handle must * be direct, otherwise it is a pointer */ - int is_ch_ptr = is_aliaschain_attr(type, ATTR_CONTEXTHANDLE) ? FALSE : TRUE; + const char *ch_ptr = is_aliaschain_attr(type, ATTR_CONTEXTHANDLE) ? "" : "*"; print_file(file, indent, "NdrClientContextMarshall(\n"); print_file(file, indent + 1, "&__frame->_StubMsg,\n"); - print_file(file, indent + 1, "(NDR_CCONTEXT)%s%s%s,\n", is_ch_ptr ? "*" : "", local_var_prefix, var->name); + print_file(file, indent + 1, "(NDR_CCONTEXT)%s%s%s,\n", ch_ptr, local_var_prefix, + var->name); print_file(file, indent + 1, "%s);\n", in_attr && out_attr ? "1" : "0"); } else
1
0
0
0
Michael Stefaniuc : winefile: Avoid a TRUE:FALSE conditional expression.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: f6cd3e874b6d975cf2fdc93edc90bc4ed9f48ced URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6cd3e874b6d975cf2fdc93ed…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 14 23:43:24 2012 +0200 winefile: Avoid a TRUE:FALSE conditional expression. --- programs/winefile/winefile.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c index 2537f62..366aa9c 100644 --- a/programs/winefile/winefile.c +++ b/programs/winefile/winefile.c @@ -3675,7 +3675,7 @@ static BOOL is_directory(LPCWSTR target) if (target_attr == INVALID_FILE_ATTRIBUTES) return FALSE; - return target_attr&FILE_ATTRIBUTE_DIRECTORY? TRUE: FALSE; + return (target_attr & FILE_ATTRIBUTE_DIRECTORY) != 0; } static BOOL prompt_target(Pane* pane, LPWSTR source, LPWSTR target)
1
0
0
0
Michael Stefaniuc : winhlp32: Avoid TRUE:FALSE conditional expressions.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: 66696feedea5a250dec3134bcfb9117093f787e9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=66696feedea5a250dec3134bc…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 14 23:37:07 2012 +0200 winhlp32: Avoid TRUE:FALSE conditional expressions. --- programs/winhlp32/hlpfile.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/winhlp32/hlpfile.c b/programs/winhlp32/hlpfile.c index e5248a3..96c1e75 100644 --- a/programs/winhlp32/hlpfile.c +++ b/programs/winhlp32/hlpfile.c @@ -1873,9 +1873,9 @@ static BOOL HLPFILE_ReadFont(HLPFILE* hlpfile) hlpfile->fonts[i].LogFont.lfEscapement = 0; hlpfile->fonts[i].LogFont.lfOrientation = 0; hlpfile->fonts[i].LogFont.lfWeight = (flag & 1) ? 700 : 400; - hlpfile->fonts[i].LogFont.lfItalic = (flag & 2) ? TRUE : FALSE; - hlpfile->fonts[i].LogFont.lfUnderline = (flag & 4) ? TRUE : FALSE; - hlpfile->fonts[i].LogFont.lfStrikeOut = (flag & 8) ? TRUE : FALSE; + hlpfile->fonts[i].LogFont.lfItalic = (flag & 2) != 0; + hlpfile->fonts[i].LogFont.lfUnderline = (flag & 4) != 0; + hlpfile->fonts[i].LogFont.lfStrikeOut = (flag & 8) != 0; hlpfile->fonts[i].LogFont.lfCharSet = hlpfile->charset; hlpfile->fonts[i].LogFont.lfOutPrecision = OUT_DEFAULT_PRECIS; hlpfile->fonts[i].LogFont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
1
0
0
0
Michael Stefaniuc : winspool.drv: Drop a superfluous TRUE: FALSE conditional expression.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: aae2602eba401fc98d1082daaa18f99d6f03bfec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aae2602eba401fc98d1082daa…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 14 23:28:13 2012 +0200 winspool.drv: Drop a superfluous TRUE:FALSE conditional expression. --- dlls/winspool.drv/info.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 8027a1a..38266c9 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -5258,7 +5258,7 @@ BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR pName, LPSTR pEnvironment, (LPSTR)pDriverDirectory, cbBuf, NULL, NULL); if(pcbNeeded) *pcbNeeded = needed; - ret = (needed <= cbBuf) ? TRUE : FALSE; + ret = needed <= cbBuf; } else if(pcbNeeded) *pcbNeeded = pcbNeededW * sizeof(CHAR)/sizeof(WCHAR);
1
0
0
0
Michael Stefaniuc : wintrust: Avoid a TRUE:FALSE conditional expression.
by Alexandre Julliard
15 Aug '12
15 Aug '12
Module: wine Branch: master Commit: a04900df68113cf026cd6833340fd55c9aba373c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a04900df68113cf026cd68333…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Aug 14 23:23:34 2012 +0200 wintrust: Avoid a TRUE:FALSE conditional expression. --- dlls/wintrust/asn.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wintrust/asn.c b/dlls/wintrust/asn.c index 8659266..778123e 100644 --- a/dlls/wintrust/asn.c +++ b/dlls/wintrust/asn.c @@ -2342,7 +2342,7 @@ static BOOL WINAPI CRYPT_AsnDecodeBool(DWORD dwCertEncodingType, else { *pcbStructInfo = sizeof(BOOL); - *(BOOL *)pvStructInfo = pbEncoded[2] ? TRUE : FALSE; + *(BOOL *)pvStructInfo = pbEncoded[2] != 0; ret = TRUE; } TRACE("returning %d (%08x)\n", ret, GetLastError());
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
55
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
Results per page:
10
25
50
100
200