winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2008
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1225 discussions
Start a n
N
ew thread
Henri Verbeet : d3d8: Create a d3d8 declaration as parent for FVF based declarations.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: b9468a89fc41ea91b9ff237271cc9ab702b1edc3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9468a89fc41ea91b9ff23727…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 15 12:10:15 2008 +0100 d3d8: Create a d3d8 declaration as parent for FVF based declarations. --- dlls/d3d8/d3d8_private.h | 2 +- dlls/d3d8/device.c | 42 +++++++++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index c3f3dbf..a7a37d9 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -170,7 +170,7 @@ typedef void * shader_handle; struct FvfToDecl { DWORD fvf; - IWineD3DVertexDeclaration *decl; + struct IDirect3DVertexDeclaration8 *decl; }; struct IDirect3DDevice8Impl diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 6c1da89..b571baf 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -107,7 +107,7 @@ static ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface) { This->inDestruction = TRUE; for(i = 0; i < This->numConvertedDecls; i++) { - IWineD3DVertexDeclaration_Release(This->decls[i].decl); + IDirect3DVertexDeclaration8_Release(This->decls[i].decl); } HeapFree(GetProcessHeap(), 0, This->decls); @@ -1609,10 +1609,10 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 return hrc; } -static IWineD3DVertexDeclaration *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8Impl *This, DWORD fvf) +static IDirect3DVertexDeclaration8Impl *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8Impl *This, DWORD fvf) { + IDirect3DVertexDeclaration8Impl *d3d8_declaration; HRESULT hr; - IWineD3DVertexDeclaration* pDecl = NULL; int p, low, high; /* deliberately signed */ struct FvfToDecl *convertedDecls = This->decls; @@ -1625,7 +1625,7 @@ static IWineD3DVertexDeclaration *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8 TRACE("%d ", p); if(convertedDecls[p].fvf == fvf) { TRACE("found %p\n", convertedDecls[p].decl); - return convertedDecls[p].decl; + return (IDirect3DVertexDeclaration8Impl *)convertedDecls[p].decl; } else if(convertedDecls[p].fvf < fvf) { low = p + 1; } else { @@ -1634,11 +1634,26 @@ static IWineD3DVertexDeclaration *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8 } TRACE("not found. Creating and inserting at position %d.\n", low); + d3d8_declaration = HeapAlloc(GetProcessHeap(), 0, sizeof(*d3d8_declaration)); + if (!d3d8_declaration) + { + ERR("Memory allocation failed.\n"); + return NULL; + } + + d3d8_declaration->ref_count = 1; + d3d8_declaration->lpVtbl = &Direct3DVertexDeclaration8_Vtbl; + d3d8_declaration->elements = NULL; + d3d8_declaration->elements_size = 0; + hr = IWineD3DDevice_CreateVertexDeclarationFromFVF(This->WineD3DDevice, - &pDecl, - (IUnknown *) This, - fvf); - if (FAILED(hr)) return NULL; + &d3d8_declaration->wined3d_vertex_declaration, (IUnknown *)d3d8_declaration, fvf); + if (FAILED(hr)) + { + ERR("Failed to create wined3d vertex declaration.\n"); + HeapFree(GetProcessHeap(), 0, d3d8_declaration); + return NULL; + } if(This->declArraySize == This->numConvertedDecls) { int grow = This->declArraySize / 2; @@ -1646,7 +1661,7 @@ static IWineD3DVertexDeclaration *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8 sizeof(convertedDecls[0]) * (This->numConvertedDecls + grow)); if(!convertedDecls) { /* This will destroy it */ - IWineD3DVertexDeclaration_Release(pDecl); + IDirect3DVertexDeclaration8_Release((IDirect3DVertexDeclaration8 *)d3d8_declaration); return NULL; } This->decls = convertedDecls; @@ -1654,12 +1669,12 @@ static IWineD3DVertexDeclaration *IDirect3DDevice8Impl_FindDecl(IDirect3DDevice8 } memmove(convertedDecls + low + 1, convertedDecls + low, sizeof(convertedDecls[0]) * (This->numConvertedDecls - low)); - convertedDecls[low].decl = pDecl; + convertedDecls[low].decl = (IDirect3DVertexDeclaration8 *)d3d8_declaration; convertedDecls[low].fvf = fvf; This->numConvertedDecls++; - TRACE("Returning %p. %d decls in array\n", pDecl, This->numConvertedDecls); - return pDecl; + TRACE("Returning %p. %u decls in array\n", d3d8_declaration, This->numConvertedDecls); + return d3d8_declaration; } static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { @@ -1671,7 +1686,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 ifa if (VS_HIGHESTFIXEDFXF >= pShader) { TRACE("Setting FVF, %d %d\n", VS_HIGHESTFIXEDFXF, pShader); IWineD3DDevice_SetFVF(This->WineD3DDevice, pShader); - IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, IDirect3DDevice8Impl_FindDecl(This, pShader)); + IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, + IDirect3DDevice8Impl_FindDecl(This, pShader)->wined3d_vertex_declaration); IWineD3DDevice_SetVertexShader(This->WineD3DDevice, NULL); } else { TRACE("Setting shader\n");
1
0
0
0
Henri Verbeet : wined3d: Simplify shader_generate_main() a bit.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: 9011452243bb492329e0bc80885f10fec6561c3d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9011452243bb492329e0bc808…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 15 12:10:15 2008 +0100 wined3d: Simplify shader_generate_main() a bit. --- dlls/wined3d/baseshader.c | 163 +++++++++++++++++++++----------------------- 1 files changed, 78 insertions(+), 85 deletions(-) diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index 3129554..392c512 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -822,10 +822,8 @@ static void shader_color_correction(IWineD3DBaseShaderImpl *shader, device->shader_backend->shader_color_correction(arg, fixup); } -/** Shared code in order to generate the bulk of the shader string. - Use the shader_header_fct & shader_footer_fct to add strings - that are specific to pixel or vertex functions - NOTE: A description of how to parse tokens can be found on msdn */ +/* Shared code in order to generate the bulk of the shader string. + * NOTE: A description of how to parse tokens can be found on msdn */ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, const shader_reg_maps* reg_maps, CONST DWORD* pFunction) { @@ -835,8 +833,8 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, const SHADER_HANDLER *handler_table = device->shader_backend->shader_instruction_handler_table; DWORD shader_version = reg_maps->shader_version; const DWORD *pToken = pFunction; - const SHADER_OPCODE *curOpcode = NULL; - SHADER_HANDLER hw_fct = NULL; + const SHADER_OPCODE *curOpcode; + SHADER_HANDLER hw_fct; DWORD i; SHADER_OPCODE_ARG hw_arg; @@ -846,99 +844,94 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, hw_arg.reg_maps = reg_maps; This->baseShader.parse_state.current_row = 0; - /* Second pass, process opcodes */ - if (NULL != pToken) { - while (WINED3DPS_END() != *pToken) { + if (!pToken) return; - /* Skip version token */ - if (shader_is_version_token(*pToken)) { - ++pToken; - continue; - } - - /* Skip comment tokens */ - if (shader_is_comment(*pToken)) { - DWORD comment_len = (*pToken & WINED3DSI_COMMENTSIZE_MASK) >> WINED3DSI_COMMENTSIZE_SHIFT; - ++pToken; - TRACE("#%s\n", (const char*)pToken); - pToken += comment_len; - continue; - } - - /* Read opcode */ - hw_arg.opcode_token = *pToken++; - curOpcode = shader_get_opcode(opcode_table, shader_version, hw_arg.opcode_token); - - /* Select handler */ - if (curOpcode == NULL) - hw_fct = NULL; - else - hw_fct = handler_table[curOpcode->handler_idx]; - - /* Unknown opcode and its parameters */ - if (NULL == curOpcode) { - FIXME("Unrecognized opcode: token=0x%08x\n", hw_arg.opcode_token); - pToken += shader_skip_unrecognized(pToken, shader_version); - - /* Nothing to do */ - } else if (WINED3DSIO_DCL == curOpcode->opcode || - WINED3DSIO_NOP == curOpcode->opcode || - WINED3DSIO_DEF == curOpcode->opcode || - WINED3DSIO_DEFI == curOpcode->opcode || - WINED3DSIO_DEFB == curOpcode->opcode || - WINED3DSIO_PHASE == curOpcode->opcode || - WINED3DSIO_RET == curOpcode->opcode) { - - pToken += shader_skip_opcode(curOpcode, hw_arg.opcode_token, shader_version); + while (WINED3DPS_END() != *pToken) + { + /* Skip version token */ + if (shader_is_version_token(*pToken)) + { + ++pToken; + continue; + } - /* If a generator function is set for current shader target, use it */ - } else if (hw_fct != NULL) { + /* Skip comment tokens */ + if (shader_is_comment(*pToken)) + { + pToken += (*pToken & WINED3DSI_COMMENTSIZE_MASK) >> WINED3DSI_COMMENTSIZE_SHIFT; + ++pToken; + continue; + } - hw_arg.opcode = curOpcode; + /* Read opcode */ + hw_arg.opcode_token = *pToken++; + curOpcode = shader_get_opcode(opcode_table, shader_version, hw_arg.opcode_token); - /* Destination token */ - if (curOpcode->dst_token) { + /* Unknown opcode and its parameters */ + if (!curOpcode) + { + FIXME("Unrecognized opcode: token=0x%08x\n", hw_arg.opcode_token); + pToken += shader_skip_unrecognized(pToken, shader_version); + continue; + } - DWORD param, addr_token = 0; - pToken += shader_get_param(pToken, shader_version, ¶m, &addr_token); - hw_arg.dst = param; - hw_arg.dst_addr = addr_token; - } + /* Nothing to do */ + if (WINED3DSIO_DCL == curOpcode->opcode + || WINED3DSIO_NOP == curOpcode->opcode + || WINED3DSIO_DEF == curOpcode->opcode + || WINED3DSIO_DEFI == curOpcode->opcode + || WINED3DSIO_DEFB == curOpcode->opcode + || WINED3DSIO_PHASE == curOpcode->opcode + || WINED3DSIO_RET == curOpcode->opcode) + { + pToken += shader_skip_opcode(curOpcode, hw_arg.opcode_token, shader_version); + continue; + } - /* Predication token */ - if (hw_arg.opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) - hw_arg.predicate = *pToken++; + /* Select handler */ + hw_fct = handler_table[curOpcode->handler_idx]; - /* Other source tokens */ - for (i = 0; i < (curOpcode->num_params - curOpcode->dst_token); i++) { + /* Unhandled opcode */ + if (!hw_fct) + { + FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); + pToken += shader_skip_opcode(curOpcode, hw_arg.opcode_token, shader_version); + continue; + } - DWORD param, addr_token = 0; - pToken += shader_get_param(pToken, shader_version, ¶m, &addr_token); - hw_arg.src[i] = param; - hw_arg.src_addr[i] = addr_token; - } + hw_arg.opcode = curOpcode; - /* Call appropriate function for output target */ - hw_fct(&hw_arg); + /* Destination token */ + if (curOpcode->dst_token) + { + DWORD param, addr_token = 0; + pToken += shader_get_param(pToken, shader_version, ¶m, &addr_token); + hw_arg.dst = param; + hw_arg.dst_addr = addr_token; + } - /* Add color correction if needed */ - shader_color_correction(This, device, &hw_arg, shader_version); + /* Predication token */ + if (hw_arg.opcode_token & WINED3DSHADER_INSTRUCTION_PREDICATED) hw_arg.predicate = *pToken++; - /* Process instruction modifiers for GLSL apps ( _sat, etc. ) */ - /* FIXME: This should be internal to the shader backend. - * Also, right now this is the only reason "shader_mode" exists. */ - if (This->baseShader.shader_mode == SHADER_GLSL) - shader_glsl_add_instruction_modifiers(&hw_arg); + /* Other source tokens */ + for (i = 0; i < (curOpcode->num_params - curOpcode->dst_token); ++i) + { + DWORD param, addr_token = 0; + pToken += shader_get_param(pToken, shader_version, ¶m, &addr_token); + hw_arg.src[i] = param; + hw_arg.src_addr[i] = addr_token; + } - /* Unhandled opcode */ - } else { + /* Call appropriate function for output target */ + hw_fct(&hw_arg); - FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); - pToken += shader_skip_opcode(curOpcode, hw_arg.opcode_token, shader_version); - } - } - /* TODO: What about result.depth? */ + /* Add color correction if needed */ + shader_color_correction(This, device, &hw_arg, shader_version); + /* Process instruction modifiers for GLSL apps ( _sat, etc. ) */ + /* FIXME: This should be internal to the shader backend. + * Also, right now this is the only reason "shader_mode" exists. */ + if (This->baseShader.shader_mode == SHADER_GLSL) shader_glsl_add_instruction_modifiers(&hw_arg); } }
1
0
0
0
Henri Verbeet : wined3d: Move the shader version to reg_maps.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: 8553665cb1cd89328aaef5bf38fe56fb3d8c6d4a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8553665cb1cd89328aaef5bf3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 15 12:10:14 2008 +0100 wined3d: Move the shader version to reg_maps. --- dlls/wined3d/arb_program_shader.c | 67 ++++++++++----------- dlls/wined3d/baseshader.c | 43 +++++++------- dlls/wined3d/glsl_shader.c | 119 +++++++++++++++++++------------------ dlls/wined3d/pixelshader.c | 16 +++-- dlls/wined3d/state.c | 8 ++- dlls/wined3d/vertexshader.c | 5 +- dlls/wined3d/wined3d_private.h | 3 +- 7 files changed, 132 insertions(+), 129 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8553665cb1cd89328aaef…
1
0
0
0
Henri Verbeet : wined3d: Explicitly pass the shader version to some more functions.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: dd094fe69dd94218c501b660293c738b67bb9281 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd094fe69dd94218c501b6602…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Dec 15 12:10:14 2008 +0100 wined3d: Explicitly pass the shader version to some more functions. --- dlls/wined3d/baseshader.c | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/baseshader.c b/dlls/wined3d/baseshader.c index 9bac931..ad79ee0 100644 --- a/dlls/wined3d/baseshader.c +++ b/dlls/wined3d/baseshader.c @@ -131,17 +131,12 @@ static int shader_get_param(const DWORD *pToken, DWORD shader_version, DWORD *pa } /* Return the number of parameters to skip for an opcode */ -static inline int shader_skip_opcode( - IWineD3DBaseShaderImpl* This, - const SHADER_OPCODE* curOpcode, - DWORD opcode_token) { - +static inline int shader_skip_opcode(const SHADER_OPCODE *curOpcode, DWORD opcode_token, DWORD shader_version) +{ /* Shaders >= 2.0 may contain address tokens, but fortunately they * have a useful length mask - use it here. Shaders 1.0 contain no such tokens */ - - return (WINED3DSHADER_VERSION_MAJOR(This->baseShader.hex_version) >= 2)? - ((opcode_token & WINED3DSI_INSTLENGTH_MASK) >> WINED3DSI_INSTLENGTH_SHIFT): - curOpcode->num_params; + return (WINED3DSHADER_VERSION_MAJOR(shader_version) >= 2) + ? ((opcode_token & WINED3DSI_INSTLENGTH_MASK) >> WINED3DSI_INSTLENGTH_SHIFT) : curOpcode->num_params; } /* Read the parameters of an unrecognized opcode from the input stream @@ -767,9 +762,8 @@ static void shader_dump_param(const DWORD param, const DWORD addr_token, int inp } static void shader_color_correction(IWineD3DBaseShaderImpl *shader, - IWineD3DDeviceImpl *device, const struct SHADER_OPCODE_ARG *arg) + IWineD3DDeviceImpl *device, const struct SHADER_OPCODE_ARG *arg, DWORD shader_version) { - DWORD hex_version = shader->baseShader.hex_version; IWineD3DBaseTextureImpl *texture; struct color_fixup_desc fixup; BOOL recorded = FALSE; @@ -779,7 +773,7 @@ static void shader_color_correction(IWineD3DBaseShaderImpl *shader, switch(arg->opcode->opcode) { case WINED3DSIO_TEX: - if (hex_version < WINED3DPS_VERSION(2,0)) sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK; + if (WINED3DSHADER_VERSION_MAJOR(shader_version) < 2) sampler_idx = arg->dst & WINED3DSP_REGNUM_MASK; else sampler_idx = arg->src[1] & WINED3DSP_REGNUM_MASK; break; @@ -894,7 +888,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, WINED3DSIO_PHASE == curOpcode->opcode || WINED3DSIO_RET == curOpcode->opcode) { - pToken += shader_skip_opcode(This, curOpcode, hw_arg.opcode_token); + pToken += shader_skip_opcode(curOpcode, hw_arg.opcode_token, shader_version); /* If a generator function is set for current shader target, use it */ } else if (hw_fct != NULL) { @@ -927,7 +921,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, hw_fct(&hw_arg); /* Add color correction if needed */ - shader_color_correction(This, device, &hw_arg); + shader_color_correction(This, device, &hw_arg, shader_version); /* Process instruction modifiers for GLSL apps ( _sat, etc. ) */ /* FIXME: This should be internal to the shader backend. @@ -939,7 +933,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer, } else { FIXME("Can't handle opcode %s in hwShader\n", curOpcode->name); - pToken += shader_skip_opcode(This, curOpcode, hw_arg.opcode_token); + pToken += shader_skip_opcode(curOpcode, hw_arg.opcode_token, shader_version); } } /* TODO: What about result.depth? */
1
0
0
0
Alexandre Julliard : ntdll: NtCurrentTeb is not exported on x86_64.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: b9e10147d94e556b3a5c10a743c6eae4671e6535 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9e10147d94e556b3a5c10a74…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 13:32:15 2008 +0100 ntdll: NtCurrentTeb is not exported on x86_64. --- dlls/ntdll/ntdll.spec | 2 +- dlls/ntdll/thread.c | 4 ++++ include/winnt.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 442516e..1e41e4d 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -144,7 +144,7 @@ @ stdcall NtCreateTimer(ptr long ptr long) @ stub NtCreateToken # @ stub NtCreateWaitablePort -@ stdcall NtCurrentTeb() +@ stdcall -arch=i386,sparc,alpha,powerpc NtCurrentTeb() # @ stub NtDebugActiveProcess # @ stub NtDebugContinue @ stdcall NtDelayExecution(long ptr) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 65a27ed..89d5ce9 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1465,6 +1465,10 @@ __ASM_GLOBAL_FUNC( NtCurrentTeb, ".byte 0x64\n\tmovl 0x18,%eax\n\tret" ) /* Nothing needs to be done. MS C "magically" exports the inline version from winnt.h */ +#elif defined(__x86_64__) && defined(__GNUC__) + +/* not exported on x86_64 */ + #else /**********************************************************************/ diff --git a/include/winnt.h b/include/winnt.h index 580c2e5..0c8e0a9 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2261,7 +2261,7 @@ extern inline struct _TEB * WINAPI NtCurrentTeb(void) return teb; } #elif defined(__x86_64__) && defined(__GNUC__) -extern inline struct _TEB * WINAPI NtCurrentTeb(void) +static inline struct _TEB * WINAPI NtCurrentTeb(void) { struct _TEB *teb; __asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (teb));
1
0
0
0
Alexandre Julliard : include: Allow 64-bit pointers to pass through LDT functions unmolested.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: a518edc3aabeaabf581775584389309a360ff8ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a518edc3aabeaabf581775584…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 13:31:52 2008 +0100 include: Allow 64-bit pointers to pass through LDT functions unmolested. --- include/wine/library.h | 6 ++++++ include/winnt.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/wine/library.h b/include/wine/library.h index 52186c6..1102390 100644 --- a/include/wine/library.h +++ b/include/wine/library.h @@ -135,6 +135,9 @@ static inline void wine_ldt_set_base( LDT_ENTRY *ent, const void *base ) ent->BaseLow = (WORD)(ULONG_PTR)base; ent->HighWord.Bits.BaseMid = (BYTE)((ULONG_PTR)base >> 16); ent->HighWord.Bits.BaseHi = (BYTE)((ULONG_PTR)base >> 24); +#ifdef _WIN64 + ent->BaseHigh = (ULONG_PTR)base >> 32; +#endif } static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) { @@ -145,6 +148,9 @@ static inline void wine_ldt_set_limit( LDT_ENTRY *ent, unsigned int limit ) static inline void *wine_ldt_get_base( const LDT_ENTRY *ent ) { return (void *)(ent->BaseLow | +#ifdef _WIN64 + (ULONG_PTR)ent->BaseHigh << 32 | +#endif (ULONG_PTR)ent->HighWord.Bits.BaseMid << 16 | (ULONG_PTR)ent->HighWord.Bits.BaseHi << 24); } diff --git a/include/winnt.h b/include/winnt.h index 083bd96..580c2e5 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -846,6 +846,9 @@ typedef struct _LDT_ENTRY { unsigned BaseHi : 8; } Bits; } HighWord; +#ifdef _WIN64 /* FIXME: 64-bit code should not be using the LDT */ + DWORD BaseHigh; +#endif } LDT_ENTRY, *PLDT_ENTRY; /* x86-64 context definitions */
1
0
0
0
Alexandre Julliard : server: Make async I/O transfer sizes always 32-bit.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: f6fa72d77067aa8f39675d74600ffb57caf8327e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6fa72d77067aa8f39675d746…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 13:30:25 2008 +0100 server: Make async I/O transfer sizes always 32-bit. --- dlls/ntdll/directory.c | 2 +- dlls/ntdll/file.c | 8 ++++---- dlls/ntdll/ntdll_misc.h | 3 ++- dlls/ntdll/sync.c | 3 ++- dlls/ws2_32/socket.c | 10 ++++++---- include/wine/server_protocol.h | 10 +++++----- server/async.c | 2 +- server/completion.c | 4 ++-- server/file.h | 4 ++-- server/protocol.def | 10 +++++----- server/trace.c | 6 +++--- tools/make_requests | 1 - 12 files changed, 33 insertions(+), 30 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f6fa72d77067aa8f39675…
1
0
0
0
Alexandre Julliard : server: Add an apc_param_t type to store APC client-side parameters.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: dc7f17049560737e8da9f48f293066c55096cfd8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dc7f17049560737e8da9f48f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Dec 15 13:29:38 2008 +0100 server: Add an apc_param_t type to store APC client-side parameters. --- include/wine/server_protocol.h | 17 +++++++++-------- server/async.c | 6 +++--- server/completion.c | 7 ++++--- server/fd.c | 4 ++-- server/file.h | 5 +++-- server/protocol.def | 17 +++++++++-------- tools/make_requests | 1 + 7 files changed, 31 insertions(+), 26 deletions(-) diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 963eaa3..f69e797 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -23,6 +23,7 @@ typedef unsigned int thread_id_t; typedef unsigned int data_size_t; typedef unsigned int ioctl_code_t; typedef unsigned long lparam_t; +typedef unsigned long apc_param_t; typedef unsigned __int64 file_pos_t; struct request_header @@ -164,7 +165,7 @@ typedef struct void *arg; void *apc; obj_handle_t event; - unsigned long cvalue; + apc_param_t cvalue; } async_data_t; @@ -260,7 +261,7 @@ typedef union { enum apc_type type; void (__stdcall *func)(unsigned long,unsigned long,unsigned long); - unsigned long args[3]; + apc_param_t args[3]; } user; struct { @@ -4224,8 +4225,8 @@ struct add_completion_request { struct request_header __header; obj_handle_t handle; - unsigned long ckey; - unsigned long cvalue; + apc_param_t ckey; + apc_param_t cvalue; unsigned long information; unsigned int status; }; @@ -4244,8 +4245,8 @@ struct remove_completion_request struct remove_completion_reply { struct reply_header __header; - unsigned long ckey; - unsigned long cvalue; + apc_param_t ckey; + apc_param_t cvalue; unsigned long information; unsigned int status; }; @@ -4270,7 +4271,7 @@ struct set_completion_info_request struct request_header __header; obj_handle_t handle; obj_handle_t chandle; - unsigned long ckey; + apc_param_t ckey; }; struct set_completion_info_reply { @@ -4283,7 +4284,7 @@ struct add_fd_completion_request { struct request_header __header; obj_handle_t handle; - unsigned long cvalue; + apc_param_t cvalue; unsigned int status; unsigned long information; }; diff --git a/server/async.c b/server/async.c index 879616d..4466de2 100644 --- a/server/async.c +++ b/server/async.c @@ -43,7 +43,7 @@ struct async unsigned int timeout_status; /* status to report upon timeout */ struct event *event; struct completion *completion; - unsigned long comp_key; + apc_param_t comp_key; async_data_t data; /* data for async I/O call */ }; @@ -266,8 +266,8 @@ void async_set_result( struct object *obj, unsigned int status, unsigned long to memset( &data, 0, sizeof(data) ); data.type = APC_USER; data.user.func = async->data.apc; - data.user.args[0] = (unsigned long)async->data.arg; - data.user.args[1] = (unsigned long)async->data.iosb; + data.user.args[0] = (apc_param_t)async->data.arg; + data.user.args[1] = (apc_param_t)async->data.iosb; data.user.args[2] = 0; thread_queue_apc( async->thread, NULL, &data ); } diff --git a/server/completion.c b/server/completion.c index 4188488..f9b8901 100644 --- a/server/completion.c +++ b/server/completion.c @@ -79,8 +79,8 @@ static const struct object_ops completion_ops = struct comp_msg { struct list queue_entry; - unsigned long ckey; - unsigned long cvalue; + apc_param_t ckey; + apc_param_t cvalue; unsigned long information; unsigned int status; }; @@ -141,7 +141,8 @@ struct completion *get_completion_obj( struct process *process, obj_handle_t han return (struct completion *) get_handle_obj( process, handle, access, &completion_ops ); } -void add_completion( struct completion *completion, unsigned long ckey, unsigned long cvalue, unsigned int status, unsigned long information ) +void add_completion( struct completion *completion, apc_param_t ckey, apc_param_t cvalue, + unsigned int status, unsigned long information ) { struct comp_msg *msg = mem_alloc( sizeof( *msg ) ); diff --git a/server/fd.c b/server/fd.c index f7716d1..052e12c 100644 --- a/server/fd.c +++ b/server/fd.c @@ -199,7 +199,7 @@ struct fd struct async_queue *write_q; /* async writers of this fd */ struct async_queue *wait_q; /* other async waiters of this fd */ struct completion *completion; /* completion object attached to this fd */ - unsigned long comp_key; /* completion key to set in completion events */ + apc_param_t comp_key; /* completion key to set in completion events */ }; static void fd_dump( struct object *obj, int verbose ); @@ -1940,7 +1940,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl return fd; } -void fd_assign_completion( struct fd *fd, struct completion **p_port, unsigned long *p_key ) +void fd_assign_completion( struct fd *fd, struct completion **p_port, apc_param_t *p_key ) { *p_key = fd->comp_key; *p_port = fd->completion ? (struct completion *)grab_object( fd->completion ) : NULL; diff --git a/server/file.h b/server/file.h index 2d1d047..4255017 100644 --- a/server/file.h +++ b/server/file.h @@ -124,7 +124,8 @@ extern struct object *create_dir_obj( struct fd *fd ); /* completion */ extern struct completion *get_completion_obj( struct process *process, obj_handle_t handle, unsigned int access ); -extern void add_completion( struct completion *completion, unsigned long ckey, unsigned long cvalue, unsigned int status, unsigned long information ); +extern void add_completion( struct completion *completion, apc_param_t ckey, apc_param_t cvalue, + unsigned int status, unsigned long information ); /* serial port functions */ @@ -141,7 +142,7 @@ extern void async_set_result( struct object *obj, unsigned int status, unsigned extern int async_waiting( struct async_queue *queue ); extern void async_terminate( struct async *async, unsigned int status ); extern void async_wake_up( struct async_queue *queue, unsigned int status ); -extern void fd_assign_completion( struct fd *fd, struct completion **p_port, unsigned long *p_key ); +extern void fd_assign_completion( struct fd *fd, struct completion **p_port, apc_param_t *p_key ); /* access rights that require Unix read permission */ #define FILE_UNIX_READ_ACCESS (FILE_READ_DATA|FILE_READ_ATTRIBUTES|FILE_READ_EA) diff --git a/server/protocol.def b/server/protocol.def index 7b34523..c99ea2e 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -39,6 +39,7 @@ typedef unsigned int thread_id_t; typedef unsigned int data_size_t; typedef unsigned int ioctl_code_t; typedef unsigned long lparam_t; +typedef unsigned long apc_param_t; typedef unsigned __int64 file_pos_t; struct request_header @@ -180,7 +181,7 @@ typedef struct void *arg; /* opaque user data to pass to callback */ void *apc; /* user apc to call */ obj_handle_t event; /* event to signal when done */ - unsigned long cvalue; /* completion value to use for completion events */ + apc_param_t cvalue; /* completion value to use for completion events */ } async_data_t; /* structures for extra message data */ @@ -276,7 +277,7 @@ typedef union { enum apc_type type; /* APC_USER */ void (__stdcall *func)(unsigned long,unsigned long,unsigned long); - unsigned long args[3]; /* arguments for user function */ + apc_param_t args[3]; /* arguments for user function */ } user; struct { @@ -3031,8 +3032,8 @@ enum message_type /* add completion to completion port */ @REQ(add_completion) obj_handle_t handle; /* port handle */ - unsigned long ckey; /* completion key */ - unsigned long cvalue; /* completion value */ + apc_param_t ckey; /* completion key */ + apc_param_t cvalue; /* completion value */ unsigned long information; /* IO_STATUS_BLOCK Information */ unsigned int status; /* completion result */ @END @@ -3042,8 +3043,8 @@ enum message_type @REQ(remove_completion) obj_handle_t handle; /* port handle */ @REPLY - unsigned long ckey; /* completion key */ - unsigned long cvalue; /* completion value */ + apc_param_t ckey; /* completion key */ + apc_param_t cvalue; /* completion value */ unsigned long information; /* IO_STATUS_BLOCK Information */ unsigned int status; /* completion result */ @END @@ -3061,14 +3062,14 @@ enum message_type @REQ(set_completion_info) obj_handle_t handle; /* object handle */ obj_handle_t chandle; /* port handle */ - unsigned long ckey; /* completion key */ + apc_param_t ckey; /* completion key */ @END /* check for associated completion and push msg */ @REQ(add_fd_completion) obj_handle_t handle; /* async' object */ - unsigned long cvalue; /* completion value */ + apc_param_t cvalue; /* completion value */ unsigned int status; /* completion status */ unsigned long information; /* IO_STATUS_BLOCK Information */ @END diff --git a/tools/make_requests b/tools/make_requests index 214ade4..2203e5a 100755 --- a/tools/make_requests +++ b/tools/make_requests @@ -38,6 +38,7 @@ my %formats = "process_id_t" => [ 4, 4, "%04x" ], "thread_id_t" => [ 4, 4, "%04x" ], "lparam_t" => [ 4, 4, "%lx" ], + "apc_param_t" => [ 4, 4, "%lx" ], "timeout_t" => [ 8, 8, "&dump_timeout" ], "rectangle_t" => [ 16, 4, "&dump_rectangle" ], "char_info_t" => [ 4, 2, "&dump_char_info" ],
1
0
0
0
Alexander Nicolaysen Sørnes : kernel32: Add stub for GetConsoleAliasW.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: 93488b19dc8a82d6051d4b700e727234e3bdb01d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93488b19dc8a82d6051d4b700…
Author: Alexander Nicolaysen Sørnes <alex(a)thehandofagony.com> Date: Sun Dec 7 20:41:06 2008 +0100 kernel32: Add stub for GetConsoleAliasW. --- dlls/kernel32/console.c | 23 +++++++++++++++++++++++ dlls/kernel32/kernel32.spec | 2 +- 2 files changed, 24 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 878452f..a872b1f 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -2666,3 +2666,26 @@ BOOL CONSOLE_GetEditionMode(HANDLE hConIn, int* mode) SERVER_END_REQ; return ret; } + +/****************************************************************** + * GetConsoleAliasW + * + * + * RETURNS + * 0 if an error occurred, non-zero for success + * + */ +DWORD WINAPI GetConsoleAliasW(LPWSTR lpSource, LPWSTR lpTargetBuffer, + DWORD TargetBufferLength, LPWSTR lpExename) +{ + static const WCHAR empty[] = {' ',0}; + + FIXME("(%s,%p,%d,%s): stub\n", debugstr_w(lpSource), lpTargetBuffer, TargetBufferLength, debugstr_w(lpExename)); + + if(TargetBufferLength < sizeof(empty)/sizeof(WCHAR)) + return 0; + + lstrcpyW(lpTargetBuffer, empty); + + return 1; +} diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 76dd351..32e3523 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -452,7 +452,7 @@ @ stub GetConsoleAliasExesLengthA @ stub GetConsoleAliasExesLengthW @ stub GetConsoleAliasExesW -@ stub GetConsoleAliasW +@ stdcall GetConsoleAliasW(wstr ptr long wstr) @ stub GetConsoleAliasesA @ stub GetConsoleAliasesLengthA @ stub GetConsoleAliasesLengthW
1
0
0
0
Andrew Talbot : winmm: Sign-compare warning fix.
by Alexandre Julliard
15 Dec '08
15 Dec '08
Module: wine Branch: master Commit: adb5eb9c11c7598bf1261348aaa4b27b70af41a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adb5eb9c11c7598bf1261348a…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Fri Dec 12 20:22:03 2008 +0000 winmm: Sign-compare warning fix. --- dlls/winmm/lolvldrv.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winmm/lolvldrv.c b/dlls/winmm/lolvldrv.c index 794c117..88e3ce4 100644 --- a/dlls/winmm/lolvldrv.c +++ b/dlls/winmm/lolvldrv.c @@ -737,7 +737,7 @@ static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type) */ void MMDRV_Exit(void) { - int i; + unsigned int i; TRACE("()\n"); for (i = 0; i < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0]); i++) @@ -753,7 +753,8 @@ void MMDRV_Exit(void) } /* unload driver, in reverse order of loading */ - for (i = sizeof(MMDrvs) / sizeof(MMDrvs[0]) - 1; i >= 0; i--) + i = sizeof(MMDrvs) / sizeof(MMDrvs[0]); + while (i-- > 0) { MMDRV_ExitPerType(&MMDrvs[i], MMDRV_AUX); MMDRV_ExitPerType(&MMDrvs[i], MMDRV_MIXER);
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
123
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
Results per page:
10
25
50
100
200