ReactOS.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
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
List overview
Download
Ros-diffs
February 2020
----- 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
ros-diffs@reactos.org
27 participants
239 discussions
Start a n
N
ew thread
[reactos] 21/74: [WINESYNC]d3dx9_36: Implement D3DXDisassembleShader. (v2)
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0ab0dc096de01571f76b0…
commit 0ab0dc096de01571f76b07ad10eb0b6034d9aed3 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:49:33 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9_36: Implement D3DXDisassembleShader. (v2) Changes in v2 (by Christian Costa): * More generic code for D3DXDisassembleShader. wine-staging patch by Christian Costa <titan.costa(a)gmail.com> --- dll/directx/wine/d3dx9_36/shader.c | 330 ++++++++++++++++++- ..._36__Implement_D3DXDisassembleShader._(v2).diff | 357 +++++++++++++++++++++ 2 files changed, 685 insertions(+), 2 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c index e8ce3dd796c..7a23867ba31 100644 --- a/dll/directx/wine/d3dx9_36/shader.c +++ b/dll/directx/wine/d3dx9_36/shader.c @@ -1,6 +1,7 @@ /* * Copyright 2008 Luis Busquets * Copyright 2009 Matteo Bruni + * Copyright 2010, 2013, 2016 Christian Costa * Copyright 2011 Travis Athougies * * This library is free software; you can redistribute it and/or @@ -20,6 +21,7 @@ #include "config.h" #include "wine/port.h" +#include <stdio.h> #include "d3dx9_private.h" #include "d3dcommon.h" @@ -2140,10 +2142,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample return D3D_OK; } + +static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord", + "tangent", "binormal", "tessfactor", "positiont", "color" }; + +static const char *tex_type[] = { "", "1d", "2d", "cube", "volume" }; + +static int add_modifier(char *buffer, DWORD param) +{ + char *buf = buffer; + DWORD dst_mod = param & D3DSP_DSTMOD_MASK; + + if (dst_mod & D3DSPDM_SATURATE) + buf += sprintf(buf, "_sat"); + if (dst_mod & D3DSPDM_PARTIALPRECISION) + buf += sprintf(buf, "_pp"); + if (dst_mod & D3DSPDM_MSAMPCENTROID) + buf += sprintf(buf, "_centroid"); + + return buf - buffer; +} + +static int add_register(char *buffer, DWORD param, BOOL dst, BOOL ps) +{ + char *buf = buffer; + DWORD reg_type = ((param & D3DSP_REGTYPE_MASK2) >> D3DSP_REGTYPE_SHIFT2) + | ((param & D3DSP_REGTYPE_MASK) >> D3DSP_REGTYPE_SHIFT); + DWORD reg_num = param & D3DSP_REGNUM_MASK; + + if (reg_type == D3DSPR_INPUT) + buf += sprintf(buf, "v%d", reg_num); + else if (reg_type == D3DSPR_CONST) + buf += sprintf(buf, "c%d", reg_num); + else if (reg_type == D3DSPR_TEMP) + buf += sprintf(buf, "r%d", reg_num); + else if (reg_type == D3DSPR_ADDR) + buf += sprintf(buf, "%s%d", ps ? "t" : "a", reg_num); + else if (reg_type == D3DSPR_SAMPLER) + buf += sprintf(buf, "s%d", reg_num); + else if (reg_type == D3DSPR_RASTOUT) + buf += sprintf(buf, "oPos"); + else if (reg_type == D3DSPR_COLOROUT) + buf += sprintf(buf, "oC%d", reg_num); + else if (reg_type == D3DSPR_TEXCRDOUT) + buf += sprintf(buf, "oT%d", reg_num); + else if (reg_type == D3DSPR_ATTROUT) + buf += sprintf(buf, "oD%d", reg_num); + else + buf += sprintf(buf, "? (%d)", reg_type); + + if (dst) + { + if ((param & D3DSP_WRITEMASK_ALL) != D3DSP_WRITEMASK_ALL) + { + buf += sprintf(buf, ".%s%s%s%s", param & D3DSP_WRITEMASK_0 ? "x" : "", + param & D3DSP_WRITEMASK_1 ? "y" : "", + param & D3DSP_WRITEMASK_2 ? "z" : "", + param & D3DSP_WRITEMASK_3 ? "w" : ""); + } + } + else + { + if ((param & D3DVS_SWIZZLE_MASK) != D3DVS_NOSWIZZLE) + { + if ( ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_X | D3DVS_Y_X | D3DVS_Z_X | D3DVS_W_X)) || + ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Y | D3DVS_Y_Y | D3DVS_Z_Y | D3DVS_W_Y)) || + ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Z | D3DVS_Y_Z | D3DVS_Z_Z | D3DVS_W_Z)) || + ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_W | D3DVS_Y_W | D3DVS_Z_W | D3DVS_W_W)) ) + buf += sprintf(buf, ".%c", 'w' + (((param >> D3DVS_SWIZZLE_SHIFT) + 1) & 0x3)); + else + buf += sprintf(buf, ".%c%c%c%c", 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+0)) + 1) & 0x3), + 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+2)) + 1) & 0x3), + 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+4)) + 1) & 0x3), + 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+6)) + 1) & 0x3)); + } + } + + return buf - buffer; +} + +struct instr_info +{ + DWORD opcode; + const char *name; + int length; + int (*function)(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps); + WORD min_version; + WORD max_version; +}; + +static int instr_comment(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) +{ + *ptr += 1 + ((**ptr & D3DSI_COMMENTSIZE_MASK) >> D3DSI_COMMENTSIZE_SHIFT); + return 0; +} + +static int instr_def(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) +{ + int len = sprintf(buffer, " def c%d, %g, %g, %g, %g\n", *(*ptr+1) & D3DSP_REGNUM_MASK, + (double)*(float*)(*ptr+2), (double)*(float*)(*ptr+3), + (double)*(float*)(*ptr+4), (double)*(float*)(*ptr+5)); + *ptr += 6; + return len; +} + +static int instr_dcl(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) +{ + DWORD param1 = *++*ptr; + DWORD param2 = *++*ptr; + DWORD usage = (param1 & D3DSP_DCL_USAGE_MASK) >> D3DSP_DCL_USAGE_SHIFT; + DWORD usage_index = (param1 & D3DSP_DCL_USAGEINDEX_MASK) >> D3DSP_DCL_USAGEINDEX_SHIFT; + char *buf = buffer; + + buf += sprintf(buf, " dcl"); + if (ps) + { + if (param1 & D3DSP_TEXTURETYPE_MASK) + buf += sprintf(buf, "_%s", (usage <= D3DSTT_VOLUME) ? + tex_type[(param1 & D3DSP_TEXTURETYPE_MASK) >> D3DSP_TEXTURETYPE_SHIFT] : "???"); + } + else + { + buf += sprintf(buf, "_%s", (usage <= D3DDECLUSAGE_COLOR) ? decl_usage[usage] : "???"); + if (usage_index) + buf += sprintf(buf, "%d", usage_index); + } + + buf += add_modifier(buf, param2); + buf += sprintf(buf, " "); + buf += add_register(buf, param2, TRUE, TRUE); + buf += sprintf(buf, "\n"); + (*ptr)++; + return buf - buffer; +} + +static int instr_generic(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) +{ + char *buf = buffer; + int j; + + buf += sprintf(buf, " %s", info->name); + (*ptr)++; + + if (info->length) + { + buf += add_modifier(buf, **ptr); + + for (j = 0; j < info->length; j++) + { + buf += sprintf(buf, "%s ", j ? "," : ""); + + if ((j != 0) && ((**ptr & D3DSP_SRCMOD_MASK) != D3DSPSM_NONE)) + { + if ((**ptr & D3DSP_SRCMOD_MASK) == D3DSPSM_NEG) + buf += sprintf(buf, "-"); + else + buf += sprintf(buf, "*"); + } + + buf += add_register(buf, **ptr, j == 0, ps); + + if (*(*ptr)++ & D3DVS_ADDRESSMODE_MASK) + { + buf += sprintf(buf, "["); + buf += add_register(buf, **ptr, FALSE, FALSE); + buf += sprintf(buf, "]"); + (*ptr)++; + } + } + } + buf += sprintf(buf, "\n"); + return buf - buffer; +} + +const struct instr_info instructions[] = +{ + { D3DSIO_NOP, "nop", 0, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_MOV, "mov", 2, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_ADD, "add", 3, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_SUB, "sub", 3, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_MAD, "mad", 4, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_MUL, "mul", 3, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_RCP, "rcp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_RSQ, "rsq", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_DP3, "dp3", 3, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_DP4, "dp4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 1.2 for PS */ + { D3DSIO_MIN, "min", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_MAX, "max", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_SLT, "slt", 3, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_SGE, "sge", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */ + { D3DSIO_EXP, "exp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_LOG, "log", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_LIT, "lit", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */ + { D3DSIO_DST, "dst", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */ + { D3DSIO_LRP, "lrp", 4, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for VS */ + { D3DSIO_FRC, "frc", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_M4x4, "m4x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_M4x3, "m4x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_M3x4, "m3x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_M3x3, "m3x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_M3x2, "m3x2", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ + { D3DSIO_CALL, "call", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_CALLNZ, "callnz", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_LOOP, "loop", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */ + { D3DSIO_RET, "ret", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_ENDLOOP, "endloop", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */ + { D3DSIO_LABEL, "label", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_DCL, "dcl", 1, instr_dcl, 0x0100, 0xFFFF }, + { D3DSIO_POW, "pow", 3, instr_generic, 0x0200, 0xFFFF }, + { D3DSIO_CRS, "crs", 3, instr_generic, 0x0200, 0xFFFF }, + { D3DSIO_SGN, "sgn", 4, instr_generic, 0x0200, 0xFFFF }, /* VS only */ + { D3DSIO_ABS, "abs", 2, instr_generic, 0x0200, 0xFFFF }, + { D3DSIO_NRM, "nrm", 2, instr_generic, 0x0200, 0xFFFF }, + { D3DSIO_SINCOS, "sincos", 4, instr_generic, 0x0200, 0x02FF }, + { D3DSIO_SINCOS, "sincos", 2, instr_generic, 0x0300, 0xFFFF }, + { D3DSIO_REP, "rep", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_ENDREP, "endrep", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_IF, "if", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_IFC, "if_comp", 2, instr_generic, 0x0200, 0xFFFF }, + { D3DSIO_ELSE, "else", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_ENDIF, "endif", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ + { D3DSIO_BREAK, "break", 0, instr_generic, 0x0201, 0xFFFF }, + { D3DSIO_BREAKC, "break_comp", 2, instr_generic, 0x0201, 0xFFFF }, + { D3DSIO_MOVA, "mova", 2, instr_generic, 0x0200, 0xFFFF }, /* VS only */ + { D3DSIO_DEFB, "defb", 2, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_DEFI, "defi", 2, instr_generic, 0x0100, 0xFFFF }, + { D3DSIO_TEXCOORD, "texcoord", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXCOORD, "texcrd", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */ + { D3DSIO_TEXKILL, "texkill", 1, instr_generic, 0x0100, 0xFFFF }, /* PS only */ + { D3DSIO_TEX, "tex", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEX, "texld", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */ + { D3DSIO_TEX, "texld", 3, instr_generic, 0x0200, 0xFFFF }, /* PS only */ + { D3DSIO_TEXBEM, "texbem", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXBEML, "texbeml", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXREG2AR, "texreg2ar", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXREG2GB, "texreg2gb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x2PAD, "texm3x2pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x2TEX, "texm3x2tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x3PAD, "texm3x3pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x3TEX, "texm3x3tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x3DIFF, "texm3x3diff", 2, instr_generic, 0x0100, 0xFFFF }, /* PS only - Not documented */ + { D3DSIO_TEXM3x3SPEC, "texm3x3spec", 3, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x3VSPEC, "texm3x3vspec", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ + { D3DSIO_EXPP, "expp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */ + { D3DSIO_LOGP, "logp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */ + { D3DSIO_CND, "cnd", 4, instr_generic, 0x0100, 0x0104 }, /* PS only */ + { D3DSIO_DEF, "def", 5, instr_def, 0x0100, 0xFFFF }, + { D3DSIO_TEXREG2RGB, "texreg2rgb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ + { D3DSIO_TEXDP3TEX, "texdp3tex", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x2DEPTH, "texm3x2depth", 2, instr_generic, 0x0103, 0x0103 }, /* PS only */ + { D3DSIO_TEXDP3, "texdp3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ + { D3DSIO_TEXM3x3, "texm3x3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ + { D3DSIO_TEXDEPTH, "texdepth", 1, instr_generic, 0x0104, 0x0104 }, /* PS only */ + { D3DSIO_CMP, "cmp", 4, instr_generic, 0x0102, 0xFFFF }, /* PS only */ + { D3DSIO_BEM, "bem", 3, instr_generic, 0x0104, 0x0104 }, /* PS only */ + { D3DSIO_DP2ADD, "dp2add", 4, instr_generic, 0x0200, 0xFFFF }, /* PS only */ + { D3DSIO_DSX, "dsx", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */ + { D3DSIO_DSY, "dsy", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */ + { D3DSIO_TEXLDD, "texldd", 5, instr_generic, 0x0201, 0xFFFF }, /* PS only - not existing for 2.b */ + { D3DSIO_SETP, "setp_comp", 3, instr_generic, 0x0201, 0xFFFF }, + { D3DSIO_TEXLDL, "texldl", 3, instr_generic, 0x0300, 0xFFFF }, + { D3DSIO_BREAKP, "breakp", 1, instr_generic, 0x0201, 0xFFFF }, + { D3DSIO_PHASE, "phase", 0, instr_generic, 0x0104, 0x0104 }, /* PS only */ + { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF } +}; + HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments, ID3DXBuffer **disassembly) { - FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly); - return E_OUTOFMEMORY; + DWORD *ptr = (DWORD *)shader; + char *buffer, *buf; + UINT capacity = 4096; + BOOL ps; + WORD version; + HRESULT hr; + + TRACE("%p %d %s %p\n", shader, colorcode, debugstr_a(comments), disassembly); + + if (!shader || !disassembly) + return D3DERR_INVALIDCALL; + + buf = buffer = HeapAlloc(GetProcessHeap(), 0, capacity); + if (!buffer) + return E_OUTOFMEMORY; + + ps = (*ptr >> 16) & 1; + version = *ptr & 0xFFFF; + buf += sprintf(buf, " %s_%d_%d\n", ps ? "ps" : "vs", D3DSHADER_VERSION_MAJOR(*ptr), D3DSHADER_VERSION_MINOR(*ptr)); + ptr++; + + while (*ptr != D3DSIO_END) + { + DWORD index; + + if ((buf - buffer + 128) > capacity) + { + UINT count = buf - buffer; + char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2); + if (!new_buffer) + { + HeapFree(GetProcessHeap(), 0, buffer); + return E_OUTOFMEMORY; + } + capacity *= 2; + buffer = new_buffer; + buf = buffer + count; + } + + for (index = 0; index < sizeof(instructions)/sizeof(instructions[0]); index++) + if (((*ptr & D3DSI_OPCODE_MASK) == instructions[index].opcode) && + (version >= instructions[index].min_version) && (version <= instructions[index].max_version)) + break; + + if (index != sizeof(instructions)/sizeof(instructions[0])) + { + buf += instructions[index].function(&(instructions[index]), &ptr, buf, ps); + } + else + { + buf += sprintf(buf, " ??? (Unknown opcode %x)\n", *ptr); + while (*++ptr & (1u << 31)); + } + } + + hr = D3DXCreateBuffer(buf - buffer + 1 , disassembly); + if (SUCCEEDED(hr)) + strcpy(ID3DXBuffer_GetBufferPointer(*disassembly), buffer); + HeapFree(GetProcessHeap(), 0, buffer); + + return hr; } struct d3dx9_texture_shader diff --git a/sdk/tools/winesync/d3dx9_staging/0005-d3dx9_36__Implement_D3DXDisassembleShader._(v2).diff b/sdk/tools/winesync/d3dx9_staging/0005-d3dx9_36__Implement_D3DXDisassembleShader._(v2).diff new file mode 100644 index 00000000000..f63d8a87887 --- /dev/null +++ b/sdk/tools/winesync/d3dx9_staging/0005-d3dx9_36__Implement_D3DXDisassembleShader._(v2).diff @@ -0,0 +1,357 @@ +diff --git a/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c +index e8ce3dd..7a23867 100644 +--- a/dll/directx/wine/d3dx9_36/shader.c ++++ b/dll/directx/wine/d3dx9_36/shader.c +@@ -1,6 +1,7 @@ + /* + * Copyright 2008 Luis Busquets + * Copyright 2009 Matteo Bruni ++ * Copyright 2010, 2013, 2016 Christian Costa + * Copyright 2011 Travis Athougies + * + * This library is free software; you can redistribute it and/or +@@ -20,6 +21,7 @@ + + #include "config.h" + #include "wine/port.h" ++#include <stdio.h> + + #include "d3dx9_private.h" + #include "d3dcommon.h" +@@ -2140,10 +2142,334 @@ HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **sample + return D3D_OK; + } + ++ ++static const char *decl_usage[] = { "position", "blendweight", "blendindices", "normal", "psize", "texcoord", ++ "tangent", "binormal", "tessfactor", "positiont", "color" }; ++ ++static const char *tex_type[] = { "", "1d", "2d", "cube", "volume" }; ++ ++static int add_modifier(char *buffer, DWORD param) ++{ ++ char *buf = buffer; ++ DWORD dst_mod = param & D3DSP_DSTMOD_MASK; ++ ++ if (dst_mod & D3DSPDM_SATURATE) ++ buf += sprintf(buf, "_sat"); ++ if (dst_mod & D3DSPDM_PARTIALPRECISION) ++ buf += sprintf(buf, "_pp"); ++ if (dst_mod & D3DSPDM_MSAMPCENTROID) ++ buf += sprintf(buf, "_centroid"); ++ ++ return buf - buffer; ++} ++ ++static int add_register(char *buffer, DWORD param, BOOL dst, BOOL ps) ++{ ++ char *buf = buffer; ++ DWORD reg_type = ((param & D3DSP_REGTYPE_MASK2) >> D3DSP_REGTYPE_SHIFT2) ++ | ((param & D3DSP_REGTYPE_MASK) >> D3DSP_REGTYPE_SHIFT); ++ DWORD reg_num = param & D3DSP_REGNUM_MASK; ++ ++ if (reg_type == D3DSPR_INPUT) ++ buf += sprintf(buf, "v%d", reg_num); ++ else if (reg_type == D3DSPR_CONST) ++ buf += sprintf(buf, "c%d", reg_num); ++ else if (reg_type == D3DSPR_TEMP) ++ buf += sprintf(buf, "r%d", reg_num); ++ else if (reg_type == D3DSPR_ADDR) ++ buf += sprintf(buf, "%s%d", ps ? "t" : "a", reg_num); ++ else if (reg_type == D3DSPR_SAMPLER) ++ buf += sprintf(buf, "s%d", reg_num); ++ else if (reg_type == D3DSPR_RASTOUT) ++ buf += sprintf(buf, "oPos"); ++ else if (reg_type == D3DSPR_COLOROUT) ++ buf += sprintf(buf, "oC%d", reg_num); ++ else if (reg_type == D3DSPR_TEXCRDOUT) ++ buf += sprintf(buf, "oT%d", reg_num); ++ else if (reg_type == D3DSPR_ATTROUT) ++ buf += sprintf(buf, "oD%d", reg_num); ++ else ++ buf += sprintf(buf, "? (%d)", reg_type); ++ ++ if (dst) ++ { ++ if ((param & D3DSP_WRITEMASK_ALL) != D3DSP_WRITEMASK_ALL) ++ { ++ buf += sprintf(buf, ".%s%s%s%s", param & D3DSP_WRITEMASK_0 ? "x" : "", ++ param & D3DSP_WRITEMASK_1 ? "y" : "", ++ param & D3DSP_WRITEMASK_2 ? "z" : "", ++ param & D3DSP_WRITEMASK_3 ? "w" : ""); ++ } ++ } ++ else ++ { ++ if ((param & D3DVS_SWIZZLE_MASK) != D3DVS_NOSWIZZLE) ++ { ++ if ( ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_X | D3DVS_Y_X | D3DVS_Z_X | D3DVS_W_X)) || ++ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Y | D3DVS_Y_Y | D3DVS_Z_Y | D3DVS_W_Y)) || ++ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_Z | D3DVS_Y_Z | D3DVS_Z_Z | D3DVS_W_Z)) || ++ ((param & D3DSP_SWIZZLE_MASK) == (D3DVS_X_W | D3DVS_Y_W | D3DVS_Z_W | D3DVS_W_W)) ) ++ buf += sprintf(buf, ".%c", 'w' + (((param >> D3DVS_SWIZZLE_SHIFT) + 1) & 0x3)); ++ else ++ buf += sprintf(buf, ".%c%c%c%c", 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+0)) + 1) & 0x3), ++ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+2)) + 1) & 0x3), ++ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+4)) + 1) & 0x3), ++ 'w' + (((param >> (D3DVS_SWIZZLE_SHIFT+6)) + 1) & 0x3)); ++ } ++ } ++ ++ return buf - buffer; ++} ++ ++struct instr_info ++{ ++ DWORD opcode; ++ const char *name; ++ int length; ++ int (*function)(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps); ++ WORD min_version; ++ WORD max_version; ++}; ++ ++static int instr_comment(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) ++{ ++ *ptr += 1 + ((**ptr & D3DSI_COMMENTSIZE_MASK) >> D3DSI_COMMENTSIZE_SHIFT); ++ return 0; ++} ++ ++static int instr_def(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) ++{ ++ int len = sprintf(buffer, " def c%d, %g, %g, %g, %g\n", *(*ptr+1) & D3DSP_REGNUM_MASK, ++ (double)*(float*)(*ptr+2), (double)*(float*)(*ptr+3), ++ (double)*(float*)(*ptr+4), (double)*(float*)(*ptr+5)); ++ *ptr += 6; ++ return len; ++} ++ ++static int instr_dcl(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) ++{ ++ DWORD param1 = *++*ptr; ++ DWORD param2 = *++*ptr; ++ DWORD usage = (param1 & D3DSP_DCL_USAGE_MASK) >> D3DSP_DCL_USAGE_SHIFT; ++ DWORD usage_index = (param1 & D3DSP_DCL_USAGEINDEX_MASK) >> D3DSP_DCL_USAGEINDEX_SHIFT; ++ char *buf = buffer; ++ ++ buf += sprintf(buf, " dcl"); ++ if (ps) ++ { ++ if (param1 & D3DSP_TEXTURETYPE_MASK) ++ buf += sprintf(buf, "_%s", (usage <= D3DSTT_VOLUME) ? ++ tex_type[(param1 & D3DSP_TEXTURETYPE_MASK) >> D3DSP_TEXTURETYPE_SHIFT] : "???"); ++ } ++ else ++ { ++ buf += sprintf(buf, "_%s", (usage <= D3DDECLUSAGE_COLOR) ? decl_usage[usage] : "???"); ++ if (usage_index) ++ buf += sprintf(buf, "%d", usage_index); ++ } ++ ++ buf += add_modifier(buf, param2); ++ buf += sprintf(buf, " "); ++ buf += add_register(buf, param2, TRUE, TRUE); ++ buf += sprintf(buf, "\n"); ++ (*ptr)++; ++ return buf - buffer; ++} ++ ++static int instr_generic(const struct instr_info *info, DWORD **ptr, char *buffer, BOOL ps) ++{ ++ char *buf = buffer; ++ int j; ++ ++ buf += sprintf(buf, " %s", info->name); ++ (*ptr)++; ++ ++ if (info->length) ++ { ++ buf += add_modifier(buf, **ptr); ++ ++ for (j = 0; j < info->length; j++) ++ { ++ buf += sprintf(buf, "%s ", j ? "," : ""); ++ ++ if ((j != 0) && ((**ptr & D3DSP_SRCMOD_MASK) != D3DSPSM_NONE)) ++ { ++ if ((**ptr & D3DSP_SRCMOD_MASK) == D3DSPSM_NEG) ++ buf += sprintf(buf, "-"); ++ else ++ buf += sprintf(buf, "*"); ++ } ++ ++ buf += add_register(buf, **ptr, j == 0, ps); ++ ++ if (*(*ptr)++ & D3DVS_ADDRESSMODE_MASK) ++ { ++ buf += sprintf(buf, "["); ++ buf += add_register(buf, **ptr, FALSE, FALSE); ++ buf += sprintf(buf, "]"); ++ (*ptr)++; ++ } ++ } ++ } ++ buf += sprintf(buf, "\n"); ++ return buf - buffer; ++} ++ ++const struct instr_info instructions[] = ++{ ++ { D3DSIO_NOP, "nop", 0, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_MOV, "mov", 2, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_ADD, "add", 3, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_SUB, "sub", 3, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_MAD, "mad", 4, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_MUL, "mul", 3, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_RCP, "rcp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_RSQ, "rsq", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_DP3, "dp3", 3, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_DP4, "dp4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 1.2 for PS */ ++ { D3DSIO_MIN, "min", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_MAX, "max", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_SLT, "slt", 3, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_SGE, "sge", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */ ++ { D3DSIO_EXP, "exp", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_LOG, "log", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_LIT, "lit", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */ ++ { D3DSIO_DST, "dst", 3, instr_generic, 0x0100, 0xFFFF }, /* VS only */ ++ { D3DSIO_LRP, "lrp", 4, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for VS */ ++ { D3DSIO_FRC, "frc", 2, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_M4x4, "m4x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_M4x3, "m4x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_M3x4, "m3x4", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_M3x3, "m3x3", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_M3x2, "m3x2", 3, instr_generic, 0x0100, 0xFFFF }, /* >= 2.0 for PS */ ++ { D3DSIO_CALL, "call", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_CALLNZ, "callnz", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_LOOP, "loop", 2, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */ ++ { D3DSIO_RET, "ret", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_ENDLOOP, "endloop", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 3.0 for PS */ ++ { D3DSIO_LABEL, "label", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_DCL, "dcl", 1, instr_dcl, 0x0100, 0xFFFF }, ++ { D3DSIO_POW, "pow", 3, instr_generic, 0x0200, 0xFFFF }, ++ { D3DSIO_CRS, "crs", 3, instr_generic, 0x0200, 0xFFFF }, ++ { D3DSIO_SGN, "sgn", 4, instr_generic, 0x0200, 0xFFFF }, /* VS only */ ++ { D3DSIO_ABS, "abs", 2, instr_generic, 0x0200, 0xFFFF }, ++ { D3DSIO_NRM, "nrm", 2, instr_generic, 0x0200, 0xFFFF }, ++ { D3DSIO_SINCOS, "sincos", 4, instr_generic, 0x0200, 0x02FF }, ++ { D3DSIO_SINCOS, "sincos", 2, instr_generic, 0x0300, 0xFFFF }, ++ { D3DSIO_REP, "rep", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_ENDREP, "endrep", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_IF, "if", 1, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_IFC, "if_comp", 2, instr_generic, 0x0200, 0xFFFF }, ++ { D3DSIO_ELSE, "else", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_ENDIF, "endif", 0, instr_generic, 0x0200, 0xFFFF }, /* >= 2.a for PS */ ++ { D3DSIO_BREAK, "break", 0, instr_generic, 0x0201, 0xFFFF }, ++ { D3DSIO_BREAKC, "break_comp", 2, instr_generic, 0x0201, 0xFFFF }, ++ { D3DSIO_MOVA, "mova", 2, instr_generic, 0x0200, 0xFFFF }, /* VS only */ ++ { D3DSIO_DEFB, "defb", 2, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_DEFI, "defi", 2, instr_generic, 0x0100, 0xFFFF }, ++ { D3DSIO_TEXCOORD, "texcoord", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXCOORD, "texcrd", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */ ++ { D3DSIO_TEXKILL, "texkill", 1, instr_generic, 0x0100, 0xFFFF }, /* PS only */ ++ { D3DSIO_TEX, "tex", 1, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEX, "texld", 2, instr_generic, 0x0104, 0x0104 }, /* PS only */ ++ { D3DSIO_TEX, "texld", 3, instr_generic, 0x0200, 0xFFFF }, /* PS only */ ++ { D3DSIO_TEXBEM, "texbem", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXBEML, "texbeml", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXREG2AR, "texreg2ar", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXREG2GB, "texreg2gb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x2PAD, "texm3x2pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x2TEX, "texm3x2tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x3PAD, "texm3x3pad", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x3TEX, "texm3x3tex", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x3DIFF, "texm3x3diff", 2, instr_generic, 0x0100, 0xFFFF }, /* PS only - Not documented */ ++ { D3DSIO_TEXM3x3SPEC, "texm3x3spec", 3, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x3VSPEC, "texm3x3vspec", 2, instr_generic, 0x0100, 0x0103 }, /* PS only */ ++ { D3DSIO_EXPP, "expp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */ ++ { D3DSIO_LOGP, "logp", 2, instr_generic, 0x0100, 0xFFFF }, /* VS only */ ++ { D3DSIO_CND, "cnd", 4, instr_generic, 0x0100, 0x0104 }, /* PS only */ ++ { D3DSIO_DEF, "def", 5, instr_def, 0x0100, 0xFFFF }, ++ { D3DSIO_TEXREG2RGB, "texreg2rgb", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXDP3TEX, "texdp3tex", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x2DEPTH, "texm3x2depth", 2, instr_generic, 0x0103, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXDP3, "texdp3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXM3x3, "texm3x3", 2, instr_generic, 0x0102, 0x0103 }, /* PS only */ ++ { D3DSIO_TEXDEPTH, "texdepth", 1, instr_generic, 0x0104, 0x0104 }, /* PS only */ ++ { D3DSIO_CMP, "cmp", 4, instr_generic, 0x0102, 0xFFFF }, /* PS only */ ++ { D3DSIO_BEM, "bem", 3, instr_generic, 0x0104, 0x0104 }, /* PS only */ ++ { D3DSIO_DP2ADD, "dp2add", 4, instr_generic, 0x0200, 0xFFFF }, /* PS only */ ++ { D3DSIO_DSX, "dsx", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */ ++ { D3DSIO_DSY, "dsy", 2, instr_generic, 0x0201, 0xFFFF }, /* PS only */ ++ { D3DSIO_TEXLDD, "texldd", 5, instr_generic, 0x0201, 0xFFFF }, /* PS only - not existing for 2.b */ ++ { D3DSIO_SETP, "setp_comp", 3, instr_generic, 0x0201, 0xFFFF }, ++ { D3DSIO_TEXLDL, "texldl", 3, instr_generic, 0x0300, 0xFFFF }, ++ { D3DSIO_BREAKP, "breakp", 1, instr_generic, 0x0201, 0xFFFF }, ++ { D3DSIO_PHASE, "phase", 0, instr_generic, 0x0104, 0x0104 }, /* PS only */ ++ { D3DSIO_COMMENT, "", 0, instr_comment, 0x0100, 0xFFFF } ++}; ++ + HRESULT WINAPI D3DXDisassembleShader(const DWORD *shader, BOOL colorcode, const char *comments, ID3DXBuffer **disassembly) + { +- FIXME("%p %d %s %p: stub\n", shader, colorcode, debugstr_a(comments), disassembly); +- return E_OUTOFMEMORY; ++ DWORD *ptr = (DWORD *)shader; ++ char *buffer, *buf; ++ UINT capacity = 4096; ++ BOOL ps; ++ WORD version; ++ HRESULT hr; ++ ++ TRACE("%p %d %s %p\n", shader, colorcode, debugstr_a(comments), disassembly); ++ ++ if (!shader || !disassembly) ++ return D3DERR_INVALIDCALL; ++ ++ buf = buffer = HeapAlloc(GetProcessHeap(), 0, capacity); ++ if (!buffer) ++ return E_OUTOFMEMORY; ++ ++ ps = (*ptr >> 16) & 1; ++ version = *ptr & 0xFFFF; ++ buf += sprintf(buf, " %s_%d_%d\n", ps ? "ps" : "vs", D3DSHADER_VERSION_MAJOR(*ptr), D3DSHADER_VERSION_MINOR(*ptr)); ++ ptr++; ++ ++ while (*ptr != D3DSIO_END) ++ { ++ DWORD index; ++ ++ if ((buf - buffer + 128) > capacity) ++ { ++ UINT count = buf - buffer; ++ char *new_buffer = HeapReAlloc(GetProcessHeap(), 0, buffer, capacity * 2); ++ if (!new_buffer) ++ { ++ HeapFree(GetProcessHeap(), 0, buffer); ++ return E_OUTOFMEMORY; ++ } ++ capacity *= 2; ++ buffer = new_buffer; ++ buf = buffer + count; ++ } ++ ++ for (index = 0; index < sizeof(instructions)/sizeof(instructions[0]); index++) ++ if (((*ptr & D3DSI_OPCODE_MASK) == instructions[index].opcode) && ++ (version >= instructions[index].min_version) && (version <= instructions[index].max_version)) ++ break; ++ ++ if (index != sizeof(instructions)/sizeof(instructions[0])) ++ { ++ buf += instructions[index].function(&(instructions[index]), &ptr, buf, ps); ++ } ++ else ++ { ++ buf += sprintf(buf, " ??? (Unknown opcode %x)\n", *ptr); ++ while (*++ptr & (1u << 31)); ++ } ++ } ++ ++ hr = D3DXCreateBuffer(buf - buffer + 1 , disassembly); ++ if (SUCCEEDED(hr)) ++ strcpy(ID3DXBuffer_GetBufferPointer(*disassembly), buffer); ++ HeapFree(GetProcessHeap(), 0, buffer); ++ ++ return hr; + } + + struct d3dx9_texture_shader
4 years, 10 months
1
0
0
0
[reactos] 20/74: [WINESYNC]d3dx9_36: Improve stub for ID3DXEffectImpl_CloneEffect.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=631193598053a141e4643…
commit 631193598053a141e464377cde013f16d2578006 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:49:33 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9_36: Improve stub for ID3DXEffectImpl_CloneEffect. wine-staging patch by Sebastian Lackner <sebastian(a)fds-team.de> --- dll/directx/wine/d3dx9_36/effect.c | 4 +++- ..._36__Improve_stub_for_ID3DXEffectImpl_CloneEffect.diff | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 33197de9bd1..8c2b499cd7b 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -4511,7 +4511,9 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface, if (!device) return D3DERR_INVALIDCALL; - return E_NOTIMPL; + iface->lpVtbl->AddRef(iface); + *effect = iface; + return S_OK; } #if D3DX_SDK_VERSION >= 27 diff --git a/sdk/tools/winesync/d3dx9_staging/0004-d3dx9_36__Improve_stub_for_ID3DXEffectImpl_CloneEffect.diff b/sdk/tools/winesync/d3dx9_staging/0004-d3dx9_36__Improve_stub_for_ID3DXEffectImpl_CloneEffect.diff new file mode 100644 index 00000000000..4253a94f1b3 --- /dev/null +++ b/sdk/tools/winesync/d3dx9_staging/0004-d3dx9_36__Improve_stub_for_ID3DXEffectImpl_CloneEffect.diff @@ -0,0 +1,15 @@ +diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c +index 33197de..8c2b499 100644 +--- a/dll/directx/wine/d3dx9_36/effect.c ++++ b/dll/directx/wine/d3dx9_36/effect.c +@@ -4511,7 +4511,9 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface, + if (!device) + return D3DERR_INVALIDCALL; + +- return E_NOTIMPL; ++ iface->lpVtbl->AddRef(iface); ++ *effect = iface; ++ return S_OK; + } + + #if D3DX_SDK_VERSION >= 27
4 years, 10 months
1
0
0
0
[reactos] 19/74: [WINESYNC]d3dx9_36: Add format description for X8L8V8U8 for format conversions.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fea73b02ee789189a76b9…
commit fea73b02ee789189a76b9a98e48683bba354c351 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:49:33 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9_36: Add format description for X8L8V8U8 for format conversions. wine-staging patch by Christian Costa <titan.costa(a)gmail.com> --- dll/directx/wine/d3dx9_36/util.c | 1 + ...rmat_description_for_X8L8V8U8_for_format_conversions.diff | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c index af71250b785..029e50073c3 100644 --- a/dll/directx/wine/d3dx9_36/util.c +++ b/dll/directx/wine/d3dx9_36/util.c @@ -90,6 +90,7 @@ static const struct pixel_format_desc formats[] = {D3DFMT_G32R32F, { 0, 32, 32, 0}, { 0, 0, 32, 0}, 8, 1, 1, 8, FORMAT_ARGBF, NULL, NULL }, {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL }, {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba}, + {D3DFMT_X8L8V8U8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, /* marks last element */ {D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL }, }; diff --git a/sdk/tools/winesync/d3dx9_staging/0003-d3dx9_36__Add_format_description_for_X8L8V8U8_for_format_conversions.diff b/sdk/tools/winesync/d3dx9_staging/0003-d3dx9_36__Add_format_description_for_X8L8V8U8_for_format_conversions.diff new file mode 100644 index 00000000000..3c9cd31ca24 --- /dev/null +++ b/sdk/tools/winesync/d3dx9_staging/0003-d3dx9_36__Add_format_description_for_X8L8V8U8_for_format_conversions.diff @@ -0,0 +1,12 @@ +diff --git a/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c +index af71250..029e500 100644 +--- a/dll/directx/wine/d3dx9_36/util.c ++++ b/dll/directx/wine/d3dx9_36/util.c +@@ -90,6 +90,7 @@ static const struct pixel_format_desc formats[] = + {D3DFMT_G32R32F, { 0, 32, 32, 0}, { 0, 0, 32, 0}, 8, 1, 1, 8, FORMAT_ARGBF, NULL, NULL }, + {D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL }, + {D3DFMT_P8, { 8, 8, 8, 8}, { 0, 0, 0, 0}, 1, 1, 1, 1, FORMAT_INDEX, NULL, index_to_rgba}, ++ {D3DFMT_X8L8V8U8, { 0, 8, 8, 8}, { 0, 0, 8, 16}, 4, 1, 1, 4, FORMAT_ARGB, NULL, NULL }, + /* marks last element */ + {D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL }, + };
4 years, 10 months
1
0
0
0
[reactos] 18/74: [WINESYNC]d3dx9_36: Recognize bump luminance X8L8V8U8 when loading dds file.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f7b86ac3b1f18da6389e4…
commit f7b86ac3b1f18da6389e4a50078ace91267c8039 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:49:33 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9_36: Recognize bump luminance X8L8V8U8 when loading dds file. wine-staging patch by Christian Costa <titan.costa(a)gmail.com> --- dll/directx/wine/d3dx9_36/surface.c | 14 ++++++++ ...p_luminance_X8L8V8U8_when_loading_dds_file.diff | 39 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 6e2c10abc56..01729ea9a60 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -111,6 +111,7 @@ static const GUID *d3dformat_to_wic_guid(D3DFORMAT format) #define DDS_PF_RGB 0x40 #define DDS_PF_YUV 0x200 #define DDS_PF_LUMINANCE 0x20000 +#define DDS_PF_BUMPLUMINANCE 0x40000 #define DDS_PF_BUMPDUDV 0x80000 struct dds_pixel_format @@ -334,6 +335,17 @@ static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_form return D3DFMT_UNKNOWN; } +static D3DFORMAT dds_bump_luminance_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + if (pixel_format->bpp == 32 && pixel_format->rmask == 0x000000ff && pixel_format->gmask == 0x0000ff00 + && pixel_format->bmask == 0x00ff0000) + return D3DFMT_X8L8V8U8; + + WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n", pixel_format->bpp, + pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask); + return D3DFMT_UNKNOWN; +} + static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format) { TRACE("pixel_format: size %u, flags %#x, fourcc %#x, bpp %u.\n", pixel_format->size, @@ -351,6 +363,8 @@ static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pi return dds_alpha_to_d3dformat(pixel_format); if (pixel_format->flags & DDS_PF_BUMPDUDV) return dds_bump_to_d3dformat(pixel_format); + if (pixel_format->flags & DDS_PF_BUMPLUMINANCE) + return dds_bump_luminance_to_d3dformat(pixel_format); WARN("Unknown pixel format (flags %#x, fourcc %#x, bpp %u, r %#x, g %#x, b %#x, a %#x)\n", pixel_format->flags, pixel_format->fourcc, pixel_format->bpp, diff --git a/sdk/tools/winesync/d3dx9_staging/0002-d3dx9_36__Recognize_bump_luminance_X8L8V8U8_when_loading_dds_file.diff b/sdk/tools/winesync/d3dx9_staging/0002-d3dx9_36__Recognize_bump_luminance_X8L8V8U8_when_loading_dds_file.diff new file mode 100644 index 00000000000..d5cb6541a39 --- /dev/null +++ b/sdk/tools/winesync/d3dx9_staging/0002-d3dx9_36__Recognize_bump_luminance_X8L8V8U8_when_loading_dds_file.diff @@ -0,0 +1,39 @@ +diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c +index 6e2c10a..01729ea 100644 +--- a/dll/directx/wine/d3dx9_36/surface.c ++++ b/dll/directx/wine/d3dx9_36/surface.c +@@ -111,6 +111,7 @@ static const GUID *d3dformat_to_wic_guid(D3DFORMAT format) + #define DDS_PF_RGB 0x40 + #define DDS_PF_YUV 0x200 + #define DDS_PF_LUMINANCE 0x20000 ++#define DDS_PF_BUMPLUMINANCE 0x40000 + #define DDS_PF_BUMPDUDV 0x80000 + + struct dds_pixel_format +@@ -334,6 +335,17 @@ static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_form + return D3DFMT_UNKNOWN; + } + ++static D3DFORMAT dds_bump_luminance_to_d3dformat(const struct dds_pixel_format *pixel_format) ++{ ++ if (pixel_format->bpp == 32 && pixel_format->rmask == 0x000000ff && pixel_format->gmask == 0x0000ff00 ++ && pixel_format->bmask == 0x00ff0000) ++ return D3DFMT_X8L8V8U8; ++ ++ WARN("Unknown bump pixel format (%u, %#x, %#x, %#x, %#x)\n", pixel_format->bpp, ++ pixel_format->rmask, pixel_format->gmask, pixel_format->bmask, pixel_format->amask); ++ return D3DFMT_UNKNOWN; ++} ++ + static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pixel_format) + { + TRACE("pixel_format: size %u, flags %#x, fourcc %#x, bpp %u.\n", pixel_format->size, +@@ -351,6 +363,8 @@ static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pi + return dds_alpha_to_d3dformat(pixel_format); + if (pixel_format->flags & DDS_PF_BUMPDUDV) + return dds_bump_to_d3dformat(pixel_format); ++ if (pixel_format->flags & DDS_PF_BUMPLUMINANCE) ++ return dds_bump_luminance_to_d3dformat(pixel_format); + + WARN("Unknown pixel format (flags %#x, fourcc %#x, bpp %u, r %#x, g %#x, b %#x, a %#x)\n", + pixel_format->flags, pixel_format->fourcc, pixel_format->bpp,
4 years, 10 months
1
0
0
0
[reactos] 17/74: [WINESYNC]d3dx9: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=90e8c4a5db2f6810f1e8e…
commit 90e8c4a5db2f6810f1e8e39cf0c012a6799928e8 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:49:33 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha. wine-staging patch by Christian Costa <titan.costa(a)gmail.com> --- dll/directx/wine/d3dx9_36/surface.c | 18 ++++++ modules/rostests/winetests/d3dx9_36/surface.c | 26 ++++++++ ...FromFileInMemory_for_32_bpp_BMP_with_alpha.diff | 73 ++++++++++++++++++++++ 3 files changed, 117 insertions(+) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index cf8286ec758..6e2c10abc56 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -954,6 +954,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, } } + /* For 32 bpp BMP, windowscodecs.dll never returns a format with alpha while + * d3dx9_xx.dll returns one if at least 1 pixel has a non zero alpha component */ + if (SUCCEEDED(hr) && (info->Format == D3DFMT_X8R8G8B8) && (info->ImageFileFormat == D3DXIFF_BMP)) { + DWORD size = sizeof(DWORD) * info->Width * info->Height; + BYTE *buffer = HeapAlloc(GetProcessHeap(), 0, size); + hr = IWICBitmapFrameDecode_CopyPixels(frame, NULL, sizeof(DWORD) * info->Width, size, buffer); + if (SUCCEEDED(hr)) { + DWORD i; + for (i = 0; i < info->Width * info->Height; i++) { + if (buffer[i*4+3]) { + info->Format = D3DFMT_A8R8G8B8; + break; + } + } + } + HeapFree(GetProcessHeap(), 0, buffer); + } + if (frame) IWICBitmapFrameDecode_Release(frame); diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c index b7c52a28b0f..2c83dc23499 100644 --- a/modules/rostests/winetests/d3dx9_36/surface.c +++ b/modules/rostests/winetests/d3dx9_36/surface.c @@ -67,6 +67,24 @@ static const unsigned char bmp_8bpp[] = { 0x00,0x00 }; +/* 2x2 bmp (32 bpp XRGB) */ +static const unsigned char bmp_32bpp_xrgb[] = { +0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00, +0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2, +0xc2,0x00,0xa3,0xb3,0xc3,0x00 +}; + +/* 2x2 bmp (32 bpp ARGB) */ +static const unsigned char bmp_32bpp_argb[] = { +0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00, +0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2, +0xc2,0x00,0xa3,0xb3,0xc3,0x01 +}; + static const unsigned char png_grayscale[] = { 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, @@ -559,6 +577,14 @@ static void test_D3DXGetImageInfo(void) ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ok(info.Format == D3DFMT_P8, "Got format %u, expected %u\n", info.Format, D3DFMT_P8); + hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_xrgb, sizeof(bmp_32bpp_xrgb), &info); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); + ok(info.Format == D3DFMT_X8R8G8B8, "Got format %u, expected %u\n", info.Format, D3DFMT_X8R8G8B8); + hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), &info); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); + ok(info.Format == D3DFMT_A8R8G8B8, "Got format %u, expected %u\n", info.Format, D3DFMT_A8R8G8B8); /* Grayscale PNG */ hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, sizeof(png_grayscale), &info); diff --git a/sdk/tools/winesync/d3dx9_staging/0001-d3dx9__Return_D3DFMT_A8R8G8B8_in_D3DXGetImageInfoFromFileInMemory_for_32_bpp_BMP_with_alpha.diff b/sdk/tools/winesync/d3dx9_staging/0001-d3dx9__Return_D3DFMT_A8R8G8B8_in_D3DXGetImageInfoFromFileInMemory_for_32_bpp_BMP_with_alpha.diff new file mode 100644 index 00000000000..b1a7b903be4 --- /dev/null +++ b/sdk/tools/winesync/d3dx9_staging/0001-d3dx9__Return_D3DFMT_A8R8G8B8_in_D3DXGetImageInfoFromFileInMemory_for_32_bpp_BMP_with_alpha.diff @@ -0,0 +1,73 @@ +diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c +index cf8286e..6e2c10a 100644 +--- a/dll/directx/wine/d3dx9_36/surface.c ++++ b/dll/directx/wine/d3dx9_36/surface.c +@@ -954,6 +954,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, + } + } + ++ /* For 32 bpp BMP, windowscodecs.dll never returns a format with alpha while ++ * d3dx9_xx.dll returns one if at least 1 pixel has a non zero alpha component */ ++ if (SUCCEEDED(hr) && (info->Format == D3DFMT_X8R8G8B8) && (info->ImageFileFormat == D3DXIFF_BMP)) { ++ DWORD size = sizeof(DWORD) * info->Width * info->Height; ++ BYTE *buffer = HeapAlloc(GetProcessHeap(), 0, size); ++ hr = IWICBitmapFrameDecode_CopyPixels(frame, NULL, sizeof(DWORD) * info->Width, size, buffer); ++ if (SUCCEEDED(hr)) { ++ DWORD i; ++ for (i = 0; i < info->Width * info->Height; i++) { ++ if (buffer[i*4+3]) { ++ info->Format = D3DFMT_A8R8G8B8; ++ break; ++ } ++ } ++ } ++ HeapFree(GetProcessHeap(), 0, buffer); ++ } ++ + if (frame) + IWICBitmapFrameDecode_Release(frame); + +diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c +index b7c52a2..2c83dc2 100644 +--- a/modules/rostests/winetests/d3dx9_36/surface.c ++++ b/modules/rostests/winetests/d3dx9_36/surface.c +@@ -67,6 +67,24 @@ static const unsigned char bmp_8bpp[] = { + 0x00,0x00 + }; + ++/* 2x2 bmp (32 bpp XRGB) */ ++static const unsigned char bmp_32bpp_xrgb[] = { ++0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, ++0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00, ++0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00, ++0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2, ++0xc2,0x00,0xa3,0xb3,0xc3,0x00 ++}; ++ ++/* 2x2 bmp (32 bpp ARGB) */ ++static const unsigned char bmp_32bpp_argb[] = { ++0x42,0x4d,0x46,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, ++0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x00,0x00, ++0x00,0x00,0x10,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x00,0x00, ++0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xb0,0xc0,0x00,0xa1,0xb1,0xc1,0x00,0xa2,0xb2, ++0xc2,0x00,0xa3,0xb3,0xc3,0x01 ++}; ++ + static const unsigned char png_grayscale[] = + { + 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, +@@ -559,6 +577,14 @@ static void test_D3DXGetImageInfo(void) + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); + ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); + ok(info.Format == D3DFMT_P8, "Got format %u, expected %u\n", info.Format, D3DFMT_P8); ++ hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_xrgb, sizeof(bmp_32bpp_xrgb), &info); ++ ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); ++ ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ++ ok(info.Format == D3DFMT_X8R8G8B8, "Got format %u, expected %u\n", info.Format, D3DFMT_X8R8G8B8); ++ hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), &info); ++ ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); ++ ok(info.Depth == 1, "Got depth %u, expected 1\n", info.Depth); ++ ok(info.Format == D3DFMT_A8R8G8B8, "Got format %u, expected %u\n", info.Format, D3DFMT_A8R8G8B8); + + /* Grayscale PNG */ + hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, sizeof(png_grayscale), &info);
4 years, 10 months
1
0
0
0
[reactos] 16/74: [WINESYNC]d3dx9/tests: Add more tests for D3DXMatrixTransformation().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ac79207f189cbd6d4c142…
commit ac79207f189cbd6d4c142b0d37db3dd64d5f24ac Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:49:33 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9/tests: Add more tests for D3DXMatrixTransformation(). Most of those new tests were written by Rico Schüller. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33456
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 956d7356e0559a07aac68bcaf73a5005e0600fad by David Adam <david.adam.cnrs(a)gmail.com> --- modules/rostests/winetests/d3dx9_36/math.c | 705 +++++++++++++++++++++++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 706 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/d3dx9_36/math.c b/modules/rostests/winetests/d3dx9_36/math.c index cbdd581d231..73a1a93038d 100644 --- a/modules/rostests/winetests/d3dx9_36/math.c +++ b/modules/rostests/winetests/d3dx9_36/math.c @@ -639,6 +639,486 @@ static void D3DXMatrixTest(void) expect_matrix(&expectedmat, &gotmat, 8); /*____________D3DXMatrixTransformation______________*/ + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 8.5985f, -21.024f, 14.383499, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 0.0f, 52.0f, 54.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 18.2985f, -29.624001f, 15.683499f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, NULL, &eye, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 9.7f, 43.400002f, 55.299999f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 8.5985f, -21.024f, 14.383499, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 8.5985f, -21.024f, 14.383499, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 8.5985f, -21.024f, 14.383499, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 32); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 104.565598f, -35.492798f, -25.306400f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 0.0f, 52.0f, 54.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + -287420.0f, -14064.0f, 37122.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 18.2985f, -29.624001f, 15.683499f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, NULL, &axis, &eye, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 18.2985f, -29.624001f, 15.683499f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, NULL, &eye, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 18.2985f, -29.624001f, 15.683499f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, NULL, &eye, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 32); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 114.265594f, -44.092796f, -24.006401f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, -3.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 7.0f, 0.0f, + 9.7f, 43.400002f, 55.299999f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 9.7f, -8.6f, 1.3f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + -287410.3125f, -14072.599609f, 37123.300781f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 8.598499f, -21.024f, 14.383499f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 32); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 113.164093f, -56.5168f, -10.922897f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + 0.9504f, -0.8836f, 0.9244f, 0.0f, + 1.0212f, 0.1936f, -1.3588f, 0.0f, + 8.5985f, -21.024f, 14.383499, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 86280.34375f, -357366.3125f, -200024.125f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 32); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + -287410.3125f, -14064.0f, 37122.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, &eye, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 512); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 86280.34375f, -357366.3125f, -200009.75f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, &eye, &r, NULL); + expect_matrix(&expectedmat, &gotmat, 2048); + + set_matrix(&expectedmat, + 25521.0f, 39984.0f, 20148.0f, 0.0f, + 39984.0f, 4933.0f, -3324.0f, 0.0f, + 20148.0f, -3324.0f, -5153.0f, 0.0f, + -287410.3125f, -14072.599609f, 37123.300781f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, &eye, NULL, &last); + expect_matrix(&expectedmat, &gotmat, 0); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 86290.046875f, -357374.90625f, -200022.828125f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, &q, &axis, NULL, &r, &last); + expect_matrix(&expectedmat, &gotmat, 32); + set_matrix(&expectedmat, -0.21480007f, 1.3116000f, 0.47520003f, 0.0f, 0.95040143f, -0.88360137f, 0.92439979f, 0.0f, @@ -647,6 +1127,231 @@ static void D3DXMatrixTest(void) D3DXMatrixTransformation(&gotmat, &at, &q, NULL, &eye, &r, &last); expect_matrix(&expectedmat, &gotmat, 512); + set_matrix(&expectedmat, + -0.2148f, 1.3116f, 0.4752f, 0.0f, + -2.8512f, 2.6508f, -2.7732f, 0.0f, + 7.148399f, 1.3552f, -9.5116f, 0.0f, + 122.86409f, -65.116798f, -9.622897f, 1.0f); + D3DXMatrixTransformation(&gotmat, &at, NULL, &axis, &eye, &r, &last); + expect_matrix(&expectedmat, &gotmat, 8); + + set_matrix(&expectedmat, + 53094.015625f, 2044.133789f, 21711.687500f, 0.0f, + -7294.705078f, 47440.683594f, 28077.113281, 0.0f, + -12749.161133f, 28365.580078f, 13503.520508f, 0.0f, + 18.2985f, -29.624001f, 15.683499f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, &eye, &r, &last); + expect_matrix(&expectedmat, &gotmat, 32); + + q.x = 1.0f, q.y = 1.0f, q.z = 1.0f, q.w = 1.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 2.0f, + + set_matrix(&expectedmat, + 41.0f, -12.0f, -24.0f, 0.0f, + -12.0f, 25.0f, -12.0f, 0.0f, + -24.0f, -12.0f, 34.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 1.0f, q.z = 1.0f, q.w = 1.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 57.0f, -12.0f, -36.0f, 0.0f, + -12.0f, 25.0f, -12.0f, 0.0f, + -36.0f, -12.0f, 43.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 1.0f, q.z = 1.0f, q.w = 0.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 25.0f, 0.0f, -20.0f, 0.0f, + 0.0f, 25.0f, -20.0f, 0.0f, + -20.0f, -20.0f, 35.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 1.0f, q.z = 0.0f, q.w = 0.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 5.0f, -4.0f, 0.0f, 0.0f, + -4.0f, 5.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 27.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 0.0f, + axis.x = 5.0f, axis.y = 2.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 5.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 2.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 0.0f, + axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 4.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 0.0f, q.y = 1.0f, q.z = 0.0f, q.w = 0.0f, + axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 4.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 1.0f, + axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 8.0f, -6.0f, 0.0f, + 0.0f, -6.0f, 17.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 1.0f, + axis.x = 0.0f, axis.y = 4.0f, axis.z = 0.0f, + + set_matrix(&expectedmat, + 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 4.0f, -8.0f, 0.0f, + 0.0f, -8.0f, 16.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 0.0f, q.y = 1.0f, q.z = 0.0f, q.w = 1.0f, + axis.x = 1.0f, axis.y = 4.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 5.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 4.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 5.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 1.0f, q.y = 0.0f, q.z = 0.0f, q.w = 0.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 3.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 3.0f, axis.y = 3.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 3796587.0f, -1377948.0f, -1589940.0f, 0.0f, + -1377948.0f, 3334059.0f, -1879020.0f, 0.0f, + -1589940.0f, -1879020.0f, 2794443.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 1265529.0f, -459316.0f, -529980.0f, 0.0f, + -459316.0f, 1111353.0f, -626340.0f, 0.0f, + -529980.0f, -626340.0f, 931481.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 1.0f, axis.y = 1.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 2457497.0f, -434612.0f, -1423956.0f, 0.0f, + -434612.0f, 1111865.0f, -644868.0f, 0.0f, + -1423956.0f, -644868.0f, 1601963.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 0.0f, axis.y = 0.0f, axis.z = 3.0f, + + set_matrix(&expectedmat, + 1787952.0f, 37056.0f, -1340964.0f, 0.0f, + 37056.0f, 768.0f, -27792.0f, 0.0f, + -1340964.0f, -27792.0f, 1005723.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 0.0f, axis.y = 0.0f, axis.z = 1.0f, + + set_matrix(&expectedmat, + 595984.0f, 12352.0f, -446988.0f, 0.0f, + 12352.0f, 256.0f, -9264.0f, 0.0f, + -446988.0f, -9264.0f, 335241.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 0.0f, axis.y = 3.0f, axis.z = 0.0f, + + set_matrix(&expectedmat, + 150528.0f, 464352.0f, -513408.0f, 0.0f, + 464352.0f, 1432443.0f, -1583772.0f, 0.0f, + -513408.0f, -1583772.0f, 1751088.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 0.0f, axis.y = 1.0f, axis.z = 0.0f, + + set_matrix(&expectedmat, + 50176.0f, 154784.0f, -171136.0f, 0.0f, + 154784.0f, 477481.0f, -527924.0f, 0.0f, + -171136.0f, -527924.0f, 583696.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + + q.x = 11.0f, q.y = 13.0f, q.z = 15.0f, q.w = 17.0f, + axis.x = 1.0f, axis.y = 0.0f, axis.z = 0.0f, + + set_matrix(&expectedmat, + 619369.0f, -626452.0f, 88144.0f, 0.0f, + -626452.0f, 633616.0f, -89152.0f, 0.0f, + 88144.0f, -89152, 12544.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f); + D3DXMatrixTransformation(&gotmat, NULL, &q, &axis, NULL, NULL, NULL); + expect_matrix(&expectedmat, &gotmat, 0); + /*____________D3DXMatrixTranslation______________*/ set_matrix(&expectedmat, 1.0f, 0.0f, 0.0f, 0.0f, diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 996f8297083..935c60203af 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -33,4 +33,4 @@ files: include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h tags: - wine: 77c3761ad4e557f9fa311299e77746bf225a575a + wine: 956d7356e0559a07aac68bcaf73a5005e0600fad
4 years, 10 months
1
0
0
0
[reactos] 15/74: [WINESYNC]d3dx9: Use wincodecs directly without initializing COM system.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=16bc86bfb1d9e128e1d3c…
commit 16bc86bfb1d9e128e1d3c3eae68cb4ab06b93e22 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:48:04 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9: Use wincodecs directly without initializing COM system. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 77c3761ad4e557f9fa311299e77746bf225a575a by Nikolay Sivov <nsivov(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/d3dx9.cmake | 1 + dll/directx/wine/d3dx9_36/surface.c | 37 ++++++++++++----------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9.cmake b/dll/directx/wine/d3dx9_36/d3dx9.cmake index 5f206cf6377..77dd1cde119 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9.cmake +++ b/dll/directx/wine/d3dx9_36/d3dx9.cmake @@ -36,6 +36,7 @@ function(add_d3dx9_target __version) add_dependencies(${module} d3d_idl_headers) target_link_libraries(${module} dxguid wine) add_importlibs(${module} d3dcompiler_43 d3dxof user32 ole32 gdi32 msvcrt kernel32 ntdll) + add_delay_importlibs(${module} windowscodecs) add_pch(${module} ../d3dx9_36/precomp.h SOURCE) add_cd_file(TARGET ${module} DESTINATION reactos/system32 FOR all) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index cae80a8689b..cf8286ec758 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -29,6 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); +HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**); /* Wine-specific WIC GUIDs */ DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47,0x3f,0xc1,0x7c,0xd3,0x22); @@ -861,7 +862,6 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, IWICBitmapDecoder *decoder = NULL; IWICStream *stream; HRESULT hr; - HRESULT initresult; BOOL dib; TRACE("(%p, %d, %p)\n", data, datasize, info); @@ -880,9 +880,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, /* In case of DIB file, convert it to BMP */ dib = convert_dib_to_bmp((void**)&data, &datasize); - initresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - hr = CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (void**)&factory); + hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory); if (SUCCEEDED(hr)) { IWICImagingFactory_CreateStream(factory, &stream); @@ -968,9 +966,6 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize, if (decoder) IWICBitmapDecoder_Release(decoder); - if (SUCCEEDED(initresult)) - CoUninitialize(); - if (dib) HeapFree(GetProcessHeap(), 0, (void*)data); @@ -1108,7 +1103,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface, const RECT *pSrcRect, DWORD dwFilter, D3DCOLOR Colorkey, D3DXIMAGE_INFO *pSrcInfo) { D3DXIMAGE_INFO imginfo; - HRESULT hr, com_init; + HRESULT hr; IWICImagingFactory *factory = NULL; IWICBitmapDecoder *decoder; @@ -1161,9 +1156,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface, if (imginfo.ImageFileFormat == D3DXIFF_DIB) convert_dib_to_bmp((void**)&pSrcData, &SrcDataSize); - com_init = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - if (FAILED(CoCreateInstance(&CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER, &IID_IWICImagingFactory, (void**)&factory))) + if (FAILED(WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory))) goto cleanup_err; if (FAILED(IWICImagingFactory_CreateStream(factory, &stream))) @@ -1264,9 +1257,6 @@ cleanup_err: if (factory) IWICImagingFactory_Release(factory); - if (SUCCEEDED(com_init)) - CoUninitialize(); - if (imginfo.ImageFileFormat == D3DXIFF_DIB) HeapFree(GetProcessHeap(), 0, (void*)pSrcData); @@ -2087,10 +2077,10 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE IPropertyBag2 *encoder_options = NULL; IStream *stream = NULL; HRESULT hr; - HRESULT initresult; - const CLSID *encoder_clsid; + const GUID *container_format; const GUID *pixel_format_guid; WICPixelFormatGUID wic_pixel_format; + IWICImagingFactory *factory; D3DFORMAT d3d_pixel_format; D3DSURFACE_DESC src_surface_desc; IDirect3DSurface9 *temp_surface; @@ -2116,13 +2106,13 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE { case D3DXIFF_BMP: case D3DXIFF_DIB: - encoder_clsid = &CLSID_WICBmpEncoder; + container_format = &GUID_ContainerFormatBmp; break; case D3DXIFF_PNG: - encoder_clsid = &CLSID_WICPngEncoder; + container_format = &GUID_ContainerFormatPng; break; case D3DXIFF_JPG: - encoder_clsid = &CLSID_WICJpegEncoder; + container_format = &GUID_ContainerFormatJpeg; break; case D3DXIFF_DDS: return save_dds_surface_to_memory(dst_buffer, src_surface, src_rect); @@ -2160,10 +2150,11 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE height = src_surface_desc.Height; } - initresult = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + hr = WICCreateImagingFactory_Proxy(WINCODEC_SDK_VERSION, &factory); + if (FAILED(hr)) goto cleanup_err; - hr = CoCreateInstance(encoder_clsid, NULL, CLSCTX_INPROC_SERVER, - &IID_IWICBitmapEncoder, (void **)&encoder); + hr = IWICImagingFactory_CreateEncoder(factory, container_format, NULL, &encoder); + IWICImagingFactory_Release(factory); if (FAILED(hr)) goto cleanup_err; hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); @@ -2294,7 +2285,5 @@ cleanup: if (encoder) IWICBitmapEncoder_Release(encoder); - if (SUCCEEDED(initresult)) CoUninitialize(); - return hr; } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index c2b8a4cc5f5..996f8297083 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -33,4 +33,4 @@ files: include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h tags: - wine: 699eb8cdba8fe236f038550e2bd68a4cd2cab055 + wine: 77c3761ad4e557f9fa311299e77746bf225a575a
4 years, 10 months
1
0
0
0
[reactos] 14/74: [WINESYNC]d3dx9/tests: Avoid some 64-bit test failures.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=296900e6977ac5a7f2424…
commit 296900e6977ac5a7f2424564122ed4804151d601 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:48:04 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9/tests: Avoid some 64-bit test failures. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 699eb8cdba8fe236f038550e2bd68a4cd2cab055 by Matteo Bruni <mbruni(a)codeweavers.com> --- modules/rostests/winetests/d3dx9_36/math.c | 6 +++--- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/rostests/winetests/d3dx9_36/math.c b/modules/rostests/winetests/d3dx9_36/math.c index 5ce5b2b58a9..cbdd581d231 100644 --- a/modules/rostests/winetests/d3dx9_36/math.c +++ b/modules/rostests/winetests/d3dx9_36/math.c @@ -1093,16 +1093,16 @@ static void D3DXQuaternionTest(void) expectedquat.x = 7.121285f; expectedquat.y = 2.159964f; expectedquat.z = -3.855094f; expectedquat.w = 5.362844f; expect_quaternion(&expectedquat, &gotquat, 2); expectedquat.x = -1113.492920f; expectedquat.y = 82.679260f; expectedquat.z = -6.696645f; expectedquat.w = -4.090050f; - expect_quaternion(&expectedquat, &Nq, 2); + expect_quaternion(&expectedquat, &Nq, 4); expectedquat.x = -1111.0f; expectedquat.y = 111.0f; expectedquat.z = -11.0f; expectedquat.w = 1.0f; expect_quaternion(&expectedquat, &Nq1, 0); gotquat = s; D3DXQuaternionSquadSetup(&gotquat, &Nq, &Nq1, &r, &gotquat, &t, &u); expectedquat.x = -1113.492920f; expectedquat.y = 82.679260f; expectedquat.z = -6.696645f; expectedquat.w = -4.090050f; - expect_quaternion(&expectedquat, &Nq, 2); + expect_quaternion(&expectedquat, &Nq, 4); Nq1 = u; D3DXQuaternionSquadSetup(&gotquat, &Nq, &Nq1, &r, &s, &t, &Nq1); - expect_quaternion(&expectedquat, &Nq, 2); + expect_quaternion(&expectedquat, &Nq, 4); r.x = 0.2f; r.y = 0.3f; r.z = 1.3f; r.w = -0.6f; s.x = -3.0f; s.y =-2.0f; s.z = 4.0f; s.w = 0.2f; t.x = 0.4f; t.y = 8.3f; t.z = -3.1f; t.w = -2.7f; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 34d2d1bb4c0..c2b8a4cc5f5 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -33,4 +33,4 @@ files: include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h tags: - wine: dba1304bdde9639b01fa7b1e93cce1a298999b72 + wine: 699eb8cdba8fe236f038550e2bd68a4cd2cab055
4 years, 10 months
1
0
0
0
[reactos] 13/74: [WINESYNC]d3dx9: Improve D3DXMatrixTransformation2D().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b56af85d813fce67c7503…
commit b56af85d813fce67c7503f7c39664ca0f0ca4d72 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:48:04 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9: Improve D3DXMatrixTransformation2D(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id dba1304bdde9639b01fa7b1e93cce1a298999b72 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/math.c | 98 +++++++++++++++------------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 37 insertions(+), 63 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c index 02e917df87d..08e51b765e7 100644 --- a/dll/directx/wine/d3dx9_36/math.c +++ b/dll/directx/wine/d3dx9_36/math.c @@ -810,79 +810,53 @@ D3DXMATRIX * WINAPI D3DXMatrixTransformation(D3DXMATRIX *out, const D3DXVECTOR3 return out; } -D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, const D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, const D3DXVECTOR2 *pscaling, const D3DXVECTOR2 *protationcenter, FLOAT rotation, const D3DXVECTOR2 *ptranslation) +static void vec3_from_vec2(D3DXVECTOR3 *v3, const D3DXVECTOR2 *v2) { - D3DXQUATERNION rot, sca_rot; - D3DXVECTOR3 rot_center, sca, sca_center, trans; + if (!v2) + return; - TRACE("pout %p, pscalingcenter %p, scalingrotation %f, pscaling %p, protztioncenter %p, rotation %f, ptranslation %p\n", - pout, pscalingcenter, scalingrotation, pscaling, protationcenter, rotation, ptranslation); + v3->x = v2->x; + v3->y = v2->y; + v3->z = 0.0f; +} - if ( pscalingcenter ) - { - sca_center.x=pscalingcenter->x; - sca_center.y=pscalingcenter->y; - sca_center.z=0.0f; - } - else - { - sca_center.x=0.0f; - sca_center.y=0.0f; - sca_center.z=0.0f; - } +D3DXMATRIX * WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *out, const D3DXVECTOR2 *scaling_center, + float scaling_rotation, const D3DXVECTOR2 *scaling, const D3DXVECTOR2 *rotation_center, + float rotation, const D3DXVECTOR2 *translation) +{ + D3DXVECTOR3 r_c, s, s_c, t; + D3DXQUATERNION r, s_r; - if ( pscaling ) - { - sca.x=pscaling->x; - sca.y=pscaling->y; - sca.z=1.0f; - } - else - { - sca.x=1.0f; - sca.y=1.0f; - sca.z=1.0f; - } + TRACE("out %p, scaling_center %p, scaling_rotation %.8e, scaling %p, rotation_center %p, " + "rotation %.8e, translation %p.\n", + out, scaling_center, scaling_rotation, scaling, rotation_center, rotation, translation); - if ( protationcenter ) - { - rot_center.x=protationcenter->x; - rot_center.y=protationcenter->y; - rot_center.z=0.0f; - } - else - { - rot_center.x=0.0f; - rot_center.y=0.0f; - rot_center.z=0.0f; - } + vec3_from_vec2(&s_c, scaling_center); + vec3_from_vec2(&s, scaling); + if (scaling) + s.z = 1.0f; + vec3_from_vec2(&r_c, rotation_center); + vec3_from_vec2(&t, translation); - if ( ptranslation ) + if (rotation) { - trans.x=ptranslation->x; - trans.y=ptranslation->y; - trans.z=0.0f; + r.w = cosf(rotation / 2.0f); + r.x = 0.0f; + r.y = 0.0f; + r.z = sinf(rotation / 2.0f); } - else + + if (scaling_rotation) { - trans.x=0.0f; - trans.y=0.0f; - trans.z=0.0f; + s_r.w = cosf(scaling_rotation / 2.0f); + s_r.x = 0.0f; + s_r.y = 0.0f; + s_r.z = sinf(scaling_rotation / 2.0f); } - rot.w=cosf(rotation/2.0f); - rot.x=0.0f; - rot.y=0.0f; - rot.z=sinf(rotation/2.0f); - - sca_rot.w=cosf(scalingrotation/2.0f); - sca_rot.x=0.0f; - sca_rot.y=0.0f; - sca_rot.z=sinf(scalingrotation/2.0f); - - D3DXMatrixTransformation(pout, &sca_center, &sca_rot, &sca, &rot_center, &rot, &trans); - - return pout; + return D3DXMatrixTransformation(out, scaling_center ? &s_c : NULL, + scaling_rotation ? &s_r : NULL, scaling ? &s : NULL, rotation_center ? &r_c: NULL, + rotation ? &r : NULL, translation ? &t : NULL); } D3DXMATRIX* WINAPI D3DXMatrixTranslation(D3DXMATRIX *pout, FLOAT x, FLOAT y, FLOAT z) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 92b40b4c57c..34d2d1bb4c0 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -33,4 +33,4 @@ files: include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h tags: - wine: f54260a789387ab40de3d80291ad9000176dabe1 + wine: dba1304bdde9639b01fa7b1e93cce1a298999b72
4 years, 10 months
1
0
0
0
[reactos] 12/74: [WINESYNC]d3dx9: Improve D3DXMatrixTransformation() implementation.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f4d37a3b1e473e827375…
commit 4f4d37a3b1e473e8273756569c193cdf8006715d Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sat Jan 4 01:48:04 2020 +0100 Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com> CommitDate: Wed Feb 26 18:19:18 2020 +0100 [WINESYNC]d3dx9: Improve D3DXMatrixTransformation() implementation. Inspired by a patch from David Adam. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=33456
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id f54260a789387ab40de3d80291ad9000176dabe1 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/math.c | 104 +++++++++++++++++---------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 47 insertions(+), 59 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c index 8909c3c6b25..02e917df87d 100644 --- a/dll/directx/wine/d3dx9_36/math.c +++ b/dll/directx/wine/d3dx9_36/math.c @@ -744,82 +744,70 @@ D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, const D3DXVECTOR4 *plight, return pout; } -D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, const D3DXVECTOR3 *pscalingcenter, const D3DXQUATERNION *pscalingrotation, const D3DXVECTOR3 *pscaling, const D3DXVECTOR3 *protationcenter, const D3DXQUATERNION *protation, const D3DXVECTOR3 *ptranslation) +D3DXMATRIX * WINAPI D3DXMatrixTransformation(D3DXMATRIX *out, const D3DXVECTOR3 *scaling_center, + const D3DXQUATERNION *scaling_rotation, const D3DXVECTOR3 *scaling, + const D3DXVECTOR3 *rotation_center, const D3DXQUATERNION *rotation, + const D3DXVECTOR3 *translation) { - D3DXMATRIX m1, m2, m3, m4, m5, m6, m7; - D3DXQUATERNION prc; - D3DXVECTOR3 psc, pt; + static const D3DXVECTOR3 zero_vector; + D3DXMATRIX m1, msr1, ms, msr, msc, mrc1, mr, mrc, mt; + D3DXVECTOR3 sc, rc; + D3DXQUATERNION q; - TRACE("pout %p, pscalingcenter %p, pscalingrotation %p, pscaling %p, protationcentr %p, protation %p, ptranslation %p\n", - pout, pscalingcenter, pscalingrotation, pscaling, protationcenter, protation, ptranslation); + TRACE("out %p, scaling_center %p, scaling_rotation %p, scaling %p, rotation_center %p," + " rotation %p, translation %p.\n", + out, scaling_center, scaling_rotation, scaling, rotation_center, rotation, translation); - if ( !pscalingcenter ) + if (scaling) { - psc.x = 0.0f; - psc.y = 0.0f; - psc.z = 0.0f; - } - else - { - psc.x = pscalingcenter->x; - psc.y = pscalingcenter->y; - psc.z = pscalingcenter->z; - } - - if ( !protationcenter ) - { - prc.x = 0.0f; - prc.y = 0.0f; - prc.z = 0.0f; + sc = scaling_center ? *scaling_center : zero_vector; + D3DXMatrixTranslation(&m1, -sc.x, -sc.y, -sc.z); + if (scaling_rotation) + { + q.x = -scaling_rotation->x; + q.y = -scaling_rotation->y; + q.z = -scaling_rotation->z; + q.w = scaling_rotation->w; + D3DXMatrixRotationQuaternion(&msr1, &q); + D3DXMatrixMultiply(&m1, &m1, &msr1); + } + D3DXMatrixScaling(&ms, scaling->x, scaling->y, scaling->z); + D3DXMatrixMultiply(&m1, &m1, &ms); + if (scaling_rotation) + { + D3DXMatrixRotationQuaternion(&msr, scaling_rotation); + D3DXMatrixMultiply(&m1, &m1, &msr); + } + D3DXMatrixTranslation(&msc, sc.x, sc.y, sc.z); + D3DXMatrixMultiply(&m1, &m1, &msc); } else { - prc.x = protationcenter->x; - prc.y = protationcenter->y; - prc.z = protationcenter->z; + D3DXMatrixIdentity(&m1); } - if ( !ptranslation ) - { - pt.x = 0.0f; - pt.y = 0.0f; - pt.z = 0.0f; - } - else + if (rotation) { - pt.x = ptranslation->x; - pt.y = ptranslation->y; - pt.z = ptranslation->z; + rc = rotation_center ? *rotation_center : zero_vector; + D3DXMatrixTranslation(&mrc1, -rc.x, -rc.y, -rc.z); + D3DXMatrixMultiply(&m1, &m1, &mrc1); + D3DXMatrixRotationQuaternion(&mr, rotation); + D3DXMatrixMultiply(&m1, &m1, &mr); + D3DXMatrixTranslation(&mrc, rc.x, rc.y, rc.z); + D3DXMatrixMultiply(&m1, &m1, &mrc); } - D3DXMatrixTranslation(&m1, -psc.x, -psc.y, -psc.z); - - if ( !pscalingrotation ) + if (translation) { - D3DXMatrixIdentity(&m2); - D3DXMatrixIdentity(&m4); + D3DXMatrixTranslation(&mt, translation->x, translation->y, translation->z); + D3DXMatrixMultiply(out, &m1, &mt); } else { - D3DXMatrixRotationQuaternion(&m4, pscalingrotation); - D3DXMatrixInverse(&m2, NULL, &m4); + *out = m1; } - if ( !pscaling ) D3DXMatrixIdentity(&m3); - else D3DXMatrixScaling(&m3, pscaling->x, pscaling->y, pscaling->z); - - if ( !protation ) D3DXMatrixIdentity(&m6); - else D3DXMatrixRotationQuaternion(&m6, protation); - - D3DXMatrixTranslation(&m5, psc.x - prc.x, psc.y - prc.y, psc.z - prc.z); - D3DXMatrixTranslation(&m7, prc.x + pt.x, prc.y + pt.y, prc.z + pt.z); - D3DXMatrixMultiply(&m1, &m1, &m2); - D3DXMatrixMultiply(&m1, &m1, &m3); - D3DXMatrixMultiply(&m1, &m1, &m4); - D3DXMatrixMultiply(&m1, &m1, &m5); - D3DXMatrixMultiply(&m1, &m1, &m6); - D3DXMatrixMultiply(pout, &m1, &m7); - return pout; + return out; } D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, const D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, const D3DXVECTOR2 *pscaling, const D3DXVECTOR2 *protationcenter, FLOAT rotation, const D3DXVECTOR2 *ptranslation) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index a4992d55f94..92b40b4c57c 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -33,4 +33,4 @@ files: include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h tags: - wine: 5a5beba6c4e3bc53790e3a31916d0aaf57dc19b8 + wine: f54260a789387ab40de3d80291ad9000176dabe1
4 years, 10 months
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
24
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
Results per page:
10
25
50
100
200