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
April 2013
----- 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
579 discussions
Start a n
N
ew thread
Alexandre Julliard : gdi32: Replace some macros by inline functions in the region code.
by Alexandre Julliard
23 Apr '13
23 Apr '13
Module: wine Branch: master Commit: a34c6f436d4bd271dfa88d7740226b1fc7d3c6b9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a34c6f436d4bd271dfa88d774…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 22 21:40:05 2013 +0200 gdi32: Replace some macros by inline functions in the region code. --- dlls/gdi32/region.c | 189 ++++++++++++++++++++++++-------------------------- 1 files changed, 91 insertions(+), 98 deletions(-) diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index caa4ff6..12f106b 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -118,15 +118,12 @@ static const struct gdi_obj_funcs region_funcs = REGION_DeleteObject /* pDeleteObject */ }; -/* 1 if two RECTs overlap. - * 0 if two RECTs do not overlap. - */ -#define EXTENTCHECK(r1, r2) \ - ((r1)->right > (r2)->left && \ - (r1)->left < (r2)->right && \ - (r1)->bottom > (r2)->top && \ - (r1)->top < (r2)->bottom) - +/* Check if two RECTs overlap. */ +static inline BOOL overlapping( const RECT *r1, const RECT *r2 ) +{ + return (r1->right > r2->left && r1->left < r2->right && + r1->bottom > r2->top && r1->top < r2->bottom); +} static BOOL add_rect( WINEREGION *reg, INT left, INT top, INT right, INT bottom ) { @@ -146,18 +143,16 @@ static BOOL add_rect( WINEREGION *reg, INT left, INT top, INT right, INT bottom return TRUE; } -#define EMPTY_REGION(pReg) do { \ - (pReg)->numRects = 0; \ - (pReg)->extents.left = (pReg)->extents.top = 0; \ - (pReg)->extents.right = (pReg)->extents.bottom = 0; \ - } while(0) - -#define INRECT(r, x, y) \ - ( ( ((r).right > x)) && \ - ( ((r).left <= x)) && \ - ( ((r).bottom > y)) && \ - ( ((r).top <= y)) ) +static inline void empty_region( WINEREGION *reg ) +{ + reg->numRects = 0; + reg->extents.left = reg->extents.top = reg->extents.right = reg->extents.bottom = 0; +} +static inline BOOL is_in_rect( const RECT *rect, int x, int y ) +{ + return (rect->right > x && rect->left <= x && rect->bottom > y && rect->top <= y); +} /* * number of points to buffer before sending them off @@ -194,6 +189,22 @@ typedef struct _POINTBLOCK { /* + * This structure contains all of the information needed + * to run the bresenham algorithm. + * The variables may be hardcoded into the declarations + * instead of using this structure to make use of + * register declarations. + */ +struct bres_info +{ + INT minor_axis; /* minor axis */ + INT d; /* decision variable */ + INT m, m1; /* slope and slope+1 */ + INT incr1, incr2; /* error increments */ +}; + + +/* * In scan converting polygons, we want to choose those pixels * which are inside the polygon. Thus, we add .5 to the starting * x coordinate for both left and right edges. Now we choose the @@ -212,76 +223,58 @@ typedef struct _POINTBLOCK { * If it is moving to the left, then we don't want it to flip until * we traverse an entire pixel. */ -#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \ - int dx; /* local storage */ \ -\ - /* \ - * if the edge is horizontal, then it is ignored \ - * and assumed not to be processed. Otherwise, do this stuff. \ - */ \ - if ((dy) != 0) { \ - xStart = (x1); \ - dx = (x2) - xStart; \ - if (dx < 0) { \ - m = dx / (dy); \ - m1 = m - 1; \ - incr1 = -2 * dx + 2 * (dy) * m1; \ - incr2 = -2 * dx + 2 * (dy) * m; \ - d = 2 * m * (dy) - 2 * dx - 2 * (dy); \ - } else { \ - m = dx / (dy); \ - m1 = m + 1; \ - incr1 = 2 * dx - 2 * (dy) * m1; \ - incr2 = 2 * dx - 2 * (dy) * m; \ - d = -2 * m * (dy) + 2 * dx; \ - } \ - } \ -} - -#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \ - if (m1 > 0) { \ - if (d > 0) { \ - minval += m1; \ - d += incr1; \ - } \ - else { \ - minval += m; \ - d += incr2; \ - } \ - } else {\ - if (d >= 0) { \ - minval += m1; \ - d += incr1; \ - } \ - else { \ - minval += m; \ - d += incr2; \ - } \ - } \ -} - -/* - * This structure contains all of the information needed - * to run the bresenham algorithm. - * The variables may be hardcoded into the declarations - * instead of using this structure to make use of - * register declarations. - */ -typedef struct { - INT minor_axis; /* minor axis */ - INT d; /* decision variable */ - INT m, m1; /* slope and slope+1 */ - INT incr1, incr2; /* error increments */ -} BRESINFO; - +static inline void bres_init_polygon( int dy, int x1, int x2, struct bres_info *bres ) +{ + int dx; -#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \ - BRESINITPGON(dmaj, min1, min2, bres.minor_axis, bres.d, \ - bres.m, bres.m1, bres.incr1, bres.incr2) + /* + * if the edge is horizontal, then it is ignored + * and assumed not to be processed. Otherwise, do this stuff. + */ + if (!dy) return; -#define BRESINCRPGONSTRUCT(bres) \ - BRESINCRPGON(bres.d, bres.minor_axis, bres.m, bres.m1, bres.incr1, bres.incr2) + bres->minor_axis = x1; + dx = x2 - x1; + if (dx < 0) + { + bres->m = dx / dy; + bres->m1 = bres->m - 1; + bres->incr1 = -2 * dx + 2 * dy * bres->m1; + bres->incr2 = -2 * dx + 2 * dy * bres->m; + bres->d = 2 * bres->m * dy - 2 * dx - 2 * dy; + } + else + { + bres->m = dx / (dy); + bres->m1 = bres->m + 1; + bres->incr1 = 2 * dx - 2 * dy * bres->m1; + bres->incr2 = 2 * dx - 2 * dy * bres->m; + bres->d = -2 * bres->m * dy + 2 * dx; + } +} +static inline void bres_incr_polygon( struct bres_info *bres ) +{ + if (bres->m1 > 0) { + if (bres->d > 0) { + bres->minor_axis += bres->m1; + bres->d += bres->incr1; + } + else { + bres->minor_axis += bres->m; + bres->d += bres->incr2; + } + } else { + if (bres->d >= 0) { + bres->minor_axis += bres->m1; + bres->d += bres->incr1; + } + else { + bres->minor_axis += bres->m; + bres->d += bres->incr2; + } + } +} /* @@ -338,7 +331,7 @@ typedef struct { typedef struct _EdgeTableEntry { INT ymax; /* ycoord at which we exit this edge. */ - BRESINFO bres; /* Bresenham info to run the edge */ + struct bres_info bres; /* Bresenham info to run the edge */ struct _EdgeTableEntry *next; /* next in the list */ struct _EdgeTableEntry *back; /* for insertion sort */ struct _EdgeTableEntry *nextWETE; /* for winding num rule */ @@ -395,7 +388,7 @@ typedef struct _ScanLineListBlock { pAET->back = pPrevAET; \ } \ else { \ - BRESINCRPGONSTRUCT(pAET->bres); \ + bres_incr_polygon(&pAET->bres); \ pPrevAET = pAET; \ pAET = pAET->next; \ } \ @@ -417,7 +410,7 @@ typedef struct _ScanLineListBlock { pAET->back = pPrevAET; \ } \ else { \ - BRESINCRPGONSTRUCT(pAET->bres); \ + bres_incr_polygon(&pAET->bres); \ pPrevAET = pAET; \ pAET = pAET->next; \ } \ @@ -477,7 +470,7 @@ static BOOL init_region( WINEREGION *pReg, INT n ) { if (!(pReg->rects = HeapAlloc(GetProcessHeap(), 0, n * sizeof( RECT )))) return FALSE; pReg->size = n; - EMPTY_REGION(pReg); + empty_region(pReg); return TRUE; } @@ -713,7 +706,7 @@ BOOL WINAPI SetRectRgn( HRGN hrgn, INT left, INT top, obj->numRects = 1; } else - EMPTY_REGION(obj); + empty_region(obj); GDI_ReleaseObj( hrgn ); return TRUE; @@ -1080,9 +1073,9 @@ BOOL WINAPI PtInRegion( HRGN hrgn, INT x, INT y ) { int i; - if (obj->numRects > 0 && INRECT(obj->extents, x, y)) + if (obj->numRects > 0 && is_in_rect(&obj->extents, x, y)) for (i = 0; i < obj->numRects; i++) - if (INRECT (obj->rects[i], x, y)) + if (is_in_rect(&obj->rects[i], x, y)) { ret = TRUE; break; @@ -1122,7 +1115,7 @@ BOOL WINAPI RectInRegion( HRGN hrgn, const RECT *rect ) RECT *pCurRect, *pRectEnd; /* this is (just) a useful optimization */ - if ((obj->numRects > 0) && EXTENTCHECK(&obj->extents, &rc)) + if ((obj->numRects > 0) && overlapping(&obj->extents, &rc)) { for (pCurRect = obj->rects, pRectEnd = pCurRect + obj->numRects; pCurRect < pRectEnd; pCurRect++) @@ -1973,7 +1966,7 @@ static BOOL REGION_IntersectRegion(WINEREGION *newReg, WINEREGION *reg1, { /* check for trivial reject */ if ( (!(reg1->numRects)) || (!(reg2->numRects)) || - (!EXTENTCHECK(®1->extents, ®2->extents))) + (!overlapping(®1->extents, ®2->extents))) newReg->numRects = 0; else if (!REGION_RegionOp (newReg, reg1, reg2, REGION_IntersectO, NULL, NULL)) return FALSE; @@ -2296,7 +2289,7 @@ static BOOL REGION_SubtractRegion(WINEREGION *regD, WINEREGION *regM, WINEREGION { /* check for trivial reject */ if ( (!(regM->numRects)) || (!(regS->numRects)) || - (!EXTENTCHECK(®M->extents, ®S->extents)) ) + (!overlapping(®M->extents, ®S->extents)) ) return REGION_CopyRegion(regD, regM); if (!REGION_RegionOp (regD, regM, regS, REGION_SubtractO, REGION_SubtractNonO1, NULL)) @@ -2510,7 +2503,7 @@ static void REGION_CreateETandAET(const INT *Count, INT nbpolygons, * initialize integer edge algorithm */ dy = bottom->y - top->y; - BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres); + bres_init_polygon(dy, top->x, bottom->x, &pETEs->bres); REGION_InsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock);
1
0
0
0
Stefan Dösinger : wined3d: Remove leftover texture accesses in GLSL shader generation.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: f663683980f720caeb31cb658b70f50143323a41 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f663683980f720caeb31cb658…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Mon Dec 17 18:02:41 2012 +0100 wined3d: Remove leftover texture accesses in GLSL shader generation. --- dlls/wined3d/glsl_shader.c | 33 ++++++++++++--------------------- 1 files changed, 12 insertions(+), 21 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index a88f701..6d4ef6b 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -43,7 +43,7 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d); WINE_DECLARE_DEBUG_CHANNEL(winediag); #define WINED3D_GLSL_SAMPLE_PROJECTED 0x1 -#define WINED3D_GLSL_SAMPLE_RECT 0x2 +#define WINED3D_GLSL_SAMPLE_NPOT 0x2 #define WINED3D_GLSL_SAMPLE_LOD 0x4 #define WINED3D_GLSL_SAMPLE_GRAD 0x8 @@ -1861,7 +1861,7 @@ static void shader_glsl_get_sample_function(const struct wined3d_shader_context BOOL shadow = ctx->reg_maps->shader_version.type == WINED3D_SHADER_TYPE_PIXEL && (((const struct shader_glsl_ctx_priv *)ctx->backend_data)->cur_ps_args->shadow & (1 << sampler_idx)); BOOL projected = flags & WINED3D_GLSL_SAMPLE_PROJECTED; - BOOL texrect = flags & WINED3D_GLSL_SAMPLE_RECT; + BOOL texrect = flags & WINED3D_GLSL_SAMPLE_NPOT && gl_info->supported[ARB_TEXTURE_RECTANGLE]; BOOL lod = flags & WINED3D_GLSL_SAMPLE_LOD; BOOL grad = flags & WINED3D_GLSL_SAMPLE_GRAD; @@ -3449,15 +3449,13 @@ static void shader_glsl_ret(const struct wined3d_shader_instruction *ins) ********************************************/ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) { - const struct wined3d_shader *shader = ins->ctx->shader; - struct wined3d_device *device = shader->device; DWORD shader_version = WINED3D_SHADER_VERSION(ins->ctx->reg_maps->shader_version.major, ins->ctx->reg_maps->shader_version.minor); struct glsl_sample_function sample_function; - const struct wined3d_texture *texture; DWORD sample_flags = 0; DWORD sampler_idx; DWORD mask = 0, swizzle; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; /* 1.0-1.4: Use destination register as sampler source. * 2.0+: Use provided sampler source. */ @@ -3465,11 +3463,9 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) sampler_idx = ins->dst[0].reg.idx[0].offset; else sampler_idx = ins->src[1].reg.idx[0].offset; - texture = device->stateBlock->state.textures[sampler_idx]; if (shader_version < WINED3D_SHADER_VERSION(1,4)) { - const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; DWORD flags = (priv->cur_ps_args->tex_transform >> sampler_idx * WINED3D_PSARGS_TEXTRANSFORM_SHIFT) & WINED3D_PSARGS_TEXTRANSFORM_MASK; enum wined3d_sampler_texture_type sampler_type = ins->ctx->reg_maps->sampler_type[sampler_idx]; @@ -3516,8 +3512,8 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) } } - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if (priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); mask |= sample_function.coord_mask; @@ -3553,15 +3549,13 @@ static void shader_glsl_tex(const struct wined3d_shader_instruction *ins) static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) { - const struct wined3d_shader *shader = ins->ctx->shader; - struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; struct glsl_src_param coord_param, dx_param, dy_param; DWORD sample_flags = WINED3D_GLSL_SAMPLE_GRAD; struct glsl_sample_function sample_function; DWORD sampler_idx; DWORD swizzle = ins->src[1].swizzle; - const struct wined3d_texture *texture; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; if (!gl_info->supported[ARB_SHADER_TEXTURE_LOD] && !gl_info->supported[EXT_GPU_SHADER4]) { @@ -3571,9 +3565,8 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) } sampler_idx = ins->src[1].reg.idx[0].offset; - texture = device->stateBlock->state.textures[sampler_idx]; - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if (priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param); @@ -3586,20 +3579,18 @@ static void shader_glsl_texldd(const struct wined3d_shader_instruction *ins) static void shader_glsl_texldl(const struct wined3d_shader_instruction *ins) { - const struct wined3d_shader *shader = ins->ctx->shader; - struct wined3d_device *device = shader->device; const struct wined3d_gl_info *gl_info = ins->ctx->gl_info; struct glsl_src_param coord_param, lod_param; DWORD sample_flags = WINED3D_GLSL_SAMPLE_LOD; struct glsl_sample_function sample_function; DWORD sampler_idx; DWORD swizzle = ins->src[1].swizzle; - const struct wined3d_texture *texture; + const struct shader_glsl_ctx_priv *priv = ins->ctx->backend_data; sampler_idx = ins->src[1].reg.idx[0].offset; - texture = device->stateBlock->state.textures[sampler_idx]; - if (texture && texture->target == GL_TEXTURE_RECTANGLE_ARB) - sample_flags |= WINED3D_GLSL_SAMPLE_RECT; + if (ins->ctx->reg_maps->shader_version.type == WINED3D_SHADER_TYPE_PIXEL + && priv->cur_ps_args->np2_fixup & (1 << sampler_idx)) + sample_flags |= WINED3D_GLSL_SAMPLE_NPOT; shader_glsl_get_sample_function(ins->ctx, sampler_idx, sample_flags, &sample_function); shader_glsl_add_src_param(ins, &ins->src[0], sample_function.coord_mask, &coord_param);
1
0
0
0
Matteo Bruni : winex11.drv: Print the error in wglCreateContextAttribsARB() when context creation fails.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: d62e5874a93095504438b40dd4a4ac9d58961861 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d62e5874a93095504438b40dd…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Apr 19 19:06:15 2013 +0200 winex11.drv: Print the error in wglCreateContextAttribsARB() when context creation fails. --- dlls/winex11.drv/opengl.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 2313eca..6dd07fa 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -1925,6 +1925,7 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg { struct wgl_context *ret = NULL; struct gl_drawable *gl; + int err = 0; TRACE("(%p %p %p)\n", hdc, hShareContext, attribList); @@ -1983,10 +1984,10 @@ static struct wgl_context *X11DRV_wglCreateContextAttribsARB( HDC hdc, struct wg X11DRV_expect_error(gdi_display, GLXErrorHandler, NULL); ret->ctx = create_glxcontext(gdi_display, ret, NULL); XSync(gdi_display, False); - if (X11DRV_check_error() || !ret->ctx) + if ((err = X11DRV_check_error()) || !ret->ctx) { /* In the future we should convert the GLX error to a win32 one here if needed */ - ERR("Context creation failed\n"); + ERR("Context creation failed (error %x)\n", err); HeapFree( GetProcessHeap(), 0, ret ); ret = NULL; }
1
0
0
0
Matteo Bruni : wined3d: Use ARB_internalformat_query2 for the other texture format caps too.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: 197cdcc9ae025e3d81c9f849e2ea23a3b1e082d1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=197cdcc9ae025e3d81c9f849e…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Apr 19 19:06:14 2013 +0200 wined3d: Use ARB_internalformat_query2 for the other texture format caps too. --- dlls/wined3d/utils.c | 67 ++++++++++++++++++++++++++++++++++++------------- 1 files changed, 49 insertions(+), 18 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 91f2ae1..4a4289c 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1407,30 +1407,57 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win format->height_scale.numerator = 1; format->height_scale.denominator = 1; - if (!gl_info->limits.vertex_samplers) - format->flags &= ~WINED3DFMT_FLAG_VTF; - - if (!(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) - format->flags |= WINED3DFMT_FLAG_FILTERING; - else if (format->id != WINED3DFMT_R32G32B32A32_FLOAT && format->id != WINED3DFMT_R32_FLOAT) - format->flags &= ~WINED3DFMT_FLAG_VTF; - - if (format->glGammaInternal != format->glInternal) + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2]) { - /* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */ - if (!gl_info->supported[EXT_TEXTURE_SRGB]) + query_format_flag(gl_info, format, format->glInternal, GL_VERTEX_TEXTURE, + WINED3DFMT_FLAG_VTF, "vertex texture usage"); + query_format_flag(gl_info, format, format->glInternal, GL_FILTER, + WINED3DFMT_FLAG_FILTERING, "filtering"); + + if (format->glGammaInternal != format->glInternal) { - format->glGammaInternal = format->glInternal; - format->flags &= ~(WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE); + query_format_flag(gl_info, format, format->glGammaInternal, GL_SRGB_READ, + WINED3DFMT_FLAG_SRGB_READ, "sRGB read"); + + if (srgb_write) + query_format_flag(gl_info, format, format->glGammaInternal, GL_SRGB_WRITE, + WINED3DFMT_FLAG_SRGB_WRITE, "sRGB write"); + else + format->flags &= ~WINED3DFMT_FLAG_SRGB_WRITE; + + if (!(format->flags & (WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE))) + format->glGammaInternal = format->glInternal; + else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + format->glInternal = format->glGammaInternal; } - else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + } + else + { + if (!gl_info->limits.vertex_samplers) + format->flags &= ~WINED3DFMT_FLAG_VTF; + + if (!(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) + format->flags |= WINED3DFMT_FLAG_FILTERING; + else if (format->id != WINED3DFMT_R32G32B32A32_FLOAT && format->id != WINED3DFMT_R32_FLOAT) + format->flags &= ~WINED3DFMT_FLAG_VTF; + + if (format->glGammaInternal != format->glInternal) { - format->glInternal = format->glGammaInternal; + /* Filter sRGB capabilities if EXT_texture_sRGB is not supported. */ + if (!gl_info->supported[EXT_TEXTURE_SRGB]) + { + format->glGammaInternal = format->glInternal; + format->flags &= ~(WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE); + } + else if (gl_info->supported[EXT_TEXTURE_SRGB_DECODE]) + { + format->glInternal = format->glGammaInternal; + } } - } - if ((format->flags & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write) - format->flags &= ~WINED3DFMT_FLAG_SRGB_WRITE; + if ((format->flags & WINED3DFMT_FLAG_SRGB_WRITE) && !srgb_write) + format->flags &= ~WINED3DFMT_FLAG_SRGB_WRITE; + } /* Texture conversion stuff */ format->convert = format_texture_info[i].convert; @@ -1563,6 +1590,10 @@ static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3 }; BOOL filtered; + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2]) + /* This was already handled by init_format_texture_info(). */ + return; + if(wined3d_settings.offscreen_rendering_mode != ORM_FBO) { WARN("No FBO support, or no FBO ORM, guessing filter info from GL caps\n");
1
0
0
0
Matteo Bruni : wined3d: Use ARB_internalformat_query2 to check for texture format rendering and blending support , where available.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: 6fa87980caabdeebd0a396ec458b7262f65be696 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6fa87980caabdeebd0a396ec4…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Apr 19 19:06:13 2013 +0200 wined3d: Use ARB_internalformat_query2 to check for texture format rendering and blending support, where available. --- dlls/wined3d/utils.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 93 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 92ae892..91f2ae1 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -1221,12 +1221,105 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex); } +static void query_format_flag(struct wined3d_gl_info *gl_info, struct wined3d_format *format, + GLint internal, GLenum pname, DWORD flag, const char *string) +{ + GLint value; + + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, internal, pname, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s supports %s.\n", debug_d3dformat(format->id), string); + format->flags |= flag; + } + else + { + TRACE("Format %s doesn't support %s.\n", debug_d3dformat(format->id), string); + format->flags &= ~flag; + } +} + /* Context activation is done by the caller. */ static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info) { unsigned int i; GLuint fbo; + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY2]) + { + for (i = 0; i < sizeof(formats) / sizeof(*formats); ++i) + { + GLint value; + struct wined3d_format *format = &gl_info->formats[i]; + + if (!format->glInternal) + continue; + if (format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) + continue; + + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, format->glInternal, + GL_FRAMEBUFFER_RENDERABLE, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s is supported as FBO color attachment.\n", debug_d3dformat(format->id)); + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE; + format->rtInternal = format->glInternal; + + query_format_flag(gl_info, format, format->glInternal, GL_FRAMEBUFFER_BLEND, + WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING, "post-pixelshader blending"); + } + else + { + if (!format->rtInternal) + { + if (format->flags & WINED3DFMT_FLAG_RENDERTARGET) + { + WARN("Format %s with rendertarget flag is not supported as FBO color attachment" + " and no fallback specified.\n", debug_d3dformat(format->id)); + format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET; + } + else + TRACE("Format %s is not supported as FBO color attachment.\n", debug_d3dformat(format->id)); + format->rtInternal = format->glInternal; + } + else + { + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, format->rtInternal, + GL_FRAMEBUFFER_RENDERABLE, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s rtInternal format is supported as FBO color attachment.\n", + debug_d3dformat(format->id)); + } + else + { + WARN("Format %s rtInternal format is not supported as FBO color attachment.\n", + debug_d3dformat(format->id)); + format->flags &= ~WINED3DFMT_FLAG_RENDERTARGET; + } + } + } + + if (format->glInternal != format->glGammaInternal) + { + gl_info->gl_ops.ext.p_glGetInternalformativ(GL_TEXTURE_2D, format->glGammaInternal, + GL_FRAMEBUFFER_RENDERABLE, 1, &value); + if (value == GL_FULL_SUPPORT) + { + TRACE("Format %s's sRGB format is FBO attachable.\n", debug_d3dformat(format->id)); + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; + } + else + { + WARN("Format %s's sRGB format is not FBO attachable.\n", debug_d3dformat(format->id)); + } + } + else if (format->flags & WINED3DFMT_FLAG_FBO_ATTACHABLE) + format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB; + } + return; + } + if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) { gl_info->fbo_ops.glGenFramebuffers(1, &fbo);
1
0
0
0
Matteo Bruni : wined3d: Add ARB_internalformat_query2 GL extension.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: 1d17176a0d1a09aff6b681428217ff4f70ae9f23 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1d17176a0d1a09aff6b681428…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Fri Apr 19 19:06:12 2013 +0200 wined3d: Add ARB_internalformat_query2 GL extension. --- dlls/wined3d/directx.c | 1 + dlls/wined3d/wined3d_gl.h | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9b3ff1f..68016e0 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -108,6 +108,7 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_ARB_half_float_pixel", ARB_HALF_FLOAT_PIXEL }, {"GL_ARB_half_float_vertex", ARB_HALF_FLOAT_VERTEX }, {"GL_ARB_instanced_arrays", ARB_INSTANCED_ARRAYS, }, + {"GL_ARB_internalformat_query2", ARB_INTERNALFORMAT_QUERY2, }, {"GL_ARB_map_buffer_alignment", ARB_MAP_BUFFER_ALIGNMENT }, {"GL_ARB_map_buffer_range", ARB_MAP_BUFFER_RANGE }, {"GL_ARB_multisample", ARB_MULTISAMPLE }, /* needs GLX_ARB_MULTISAMPLE as well */ diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index 85756cb..f68fdc7 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -59,6 +59,7 @@ enum wined3d_gl_extension ARB_HALF_FLOAT_PIXEL, ARB_HALF_FLOAT_VERTEX, ARB_INSTANCED_ARRAYS, + ARB_INTERNALFORMAT_QUERY2, ARB_MAP_BUFFER_ALIGNMENT, ARB_MAP_BUFFER_RANGE, ARB_MULTISAMPLE, @@ -223,6 +224,10 @@ enum wined3d_gl_extension USE_GL_FUNC(glProgramParameteriARB) \ /* GL_ARB_instanced_arrays */ \ USE_GL_FUNC(glVertexAttribDivisorARB) \ + /* GL_ARB_internalformat_query */ \ + USE_GL_FUNC(glGetInternalformativ) \ + /* GL_ARB_internalformat_query2 */ \ + USE_GL_FUNC(glGetInternalformati64v) \ /* GL_ARB_map_buffer_range */ \ USE_GL_FUNC(glFlushMappedBufferRange) \ USE_GL_FUNC(glMapBufferRange) \
1
0
0
0
Jacek Caban : mshtml: Clean up OleCommandTarget_Exec.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: f359360228e3ed62e63853eddd5a2da8e0429196 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f359360228e3ed62e63853edd…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Apr 22 16:19:57 2013 +0200 mshtml: Clean up OleCommandTarget_Exec. --- dlls/mshtml/tests/htmldoc.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index ae8af82..de003f1 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -2733,12 +2733,9 @@ static void test_save_history(IUnknown *unk) static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) { - if((!pguidCmdGroup || !IsEqualGUID(pguidCmdGroup, &CGID_Explorer)) - && (!pguidCmdGroup || !IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup) - || (nCmdID != 63 && (!is_refresh || nCmdID != 37)))) + if(!pguidCmdGroup) { test_readyState(NULL); - if(!pguidCmdGroup) { switch(nCmdID) { case OLECMDID_SETPROGRESSMAX: CHECK_EXPECT2(Exec_SETPROGRESSMAX); @@ -2825,6 +2822,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID } if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) { + if(nCmdID != 63 && (!is_refresh || nCmdID != 37)) + test_readyState(NULL); ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); switch(nCmdID) { @@ -2938,6 +2937,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID } if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) { + test_readyState(NULL); ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); switch(nCmdID) { @@ -2955,6 +2955,9 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID switch(nCmdID) { case DOCHOST_DOCCANNAVIGATE: CHECK_EXPECT(Exec_DOCCANNAVIGATE); + + test_readyState(NULL); + ok(pvaIn != NULL, "pvaIn == NULL\n"); ok(pvaOut == NULL, "pvaOut != NULL\n"); ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) != VT_UNKNOWN\n"); @@ -2967,6 +2970,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID VARIANT var; HRESULT hres; + test_readyState(NULL); + ok(pvaIn != NULL, "pvaIn == NULL\n"); ok(pvaOut != NULL || broken(!pvaOut), "pvaOut != NULL\n"); ok(V_VT(pvaIn) == VT_ARRAY, "V_VT(pvaIn) = %d\n", V_VT(pvaIn)); @@ -3018,6 +3023,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID } if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) { + test_readyState(NULL); ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); switch(nCmdID) { @@ -3047,6 +3053,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID } if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) { + test_readyState(NULL); + switch (nCmdID) { case OLECMDID_PAGEACTIONBLOCKED: /* win2k3 */ SET_EXPECT(SetStatusText);
1
0
0
0
Henri Verbeet : d3drm: Avoid LPDIRECT3DRMMESH.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: cbf3ade4b933f4594ce17e9da803ed9bb3cdfba3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbf3ade4b933f4594ce17e9da…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 22 15:18:46 2013 +0200 d3drm: Avoid LPDIRECT3DRMMESH. --- dlls/d3drm/d3drm.c | 24 +++++++++++------------- dlls/d3drm/meshbuilder.c | 26 +++++++++----------------- dlls/d3drm/tests/d3drm.c | 16 ++++++++-------- include/d3drm.h | 6 +++--- include/d3drmobj.h | 14 +++++++------- 5 files changed, 38 insertions(+), 48 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=cbf3ade4b933f4594ce17…
1
0
0
0
Henri Verbeet : d3drm: Avoid LPDIRECT3DRMVISUAL.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: c179bee49416b0403a8d6f1a86617704c0913d64 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c179bee49416b0403a8d6f1a8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 22 15:18:45 2013 +0200 d3drm: Avoid LPDIRECT3DRMVISUAL. --- dlls/d3drm/d3drm.c | 32 +++++++++++++------------------- dlls/d3drm/frame.c | 26 ++++++++++++-------------- dlls/d3drm/tests/d3drm.c | 18 +++++++++--------- include/d3drm.h | 12 +++++++----- include/d3drmobj.h | 24 +++++++++++++----------- 5 files changed, 54 insertions(+), 58 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c179bee49416b0403a8d6…
1
0
0
0
Henri Verbeet : d3drm: Avoid LPDIRECT3DRMFRAME3.
by Alexandre Julliard
22 Apr '13
22 Apr '13
Module: wine Branch: master Commit: 65f9ddc2ca8ab0591e038f7d2ae470375db531fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65f9ddc2ca8ab0591e038f7d2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Apr 22 15:18:44 2013 +0200 d3drm: Avoid LPDIRECT3DRMFRAME3. --- dlls/d3drm/d3drm.c | 59 ++++++++++++++------------------ dlls/d3drm/frame.c | 83 +++++++++++++++------------------------------ dlls/d3drm/meshbuilder.c | 7 +--- dlls/d3drm/viewport.c | 21 +++-------- include/d3drm.h | 14 ++++--- include/d3drmobj.h | 46 +++++++++++++------------ 6 files changed, 94 insertions(+), 136 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=65f9ddc2ca8ab0591e038…
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
58
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
Results per page:
10
25
50
100
200