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
February 2011
----- 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
674 discussions
Start a n
N
ew thread
Frédéric Delanoy : po: Update French translation.
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: 65c35aad8e8e8f019b246ab71887965815f0b16e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=65c35aad8e8e8f019b246ab71…
Author: Frédéric Delanoy <frederic.delanoy(a)gmail.com> Date: Fri Feb 18 18:17:51 2011 +0100 po: Update French translation. --- po/fr.po | 198 +++++++++++++++++++++++--------------------------------------- 1 files changed, 74 insertions(+), 124 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=65c35aad8e8e8f019b246…
1
0
0
0
Rico Schüller : d3dcompiler: Parse reflection variables.
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: 0e8d142ea6f0a1eb0b2641706932e95fdef5a6ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e8d142ea6f0a1eb0b2641706…
Author: Rico Schüller <kgbricola(a)web.de> Date: Sun Feb 20 21:21:23 2011 +0100 d3dcompiler: Parse reflection variables. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 13 +++ dlls/d3dcompiler_43/reflection.c | 158 ++++++++++++++++++++++++++++- 2 files changed, 169 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index bec51e5..948a0c5 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -64,6 +64,17 @@ struct d3dcompiler_shader_signature char *string_data; }; +struct d3dcompiler_shader_reflection_variable +{ + ID3D11ShaderReflectionVariable ID3D11ShaderReflectionVariable_iface; + + char *name; + UINT start_offset; + UINT size; + UINT flags; + LPVOID default_value; +}; + struct d3dcompiler_shader_reflection_constant_buffer { ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer_iface; @@ -75,6 +86,8 @@ struct d3dcompiler_shader_reflection_constant_buffer UINT variable_count; UINT size; UINT flags; + + struct d3dcompiler_shader_reflection_variable *variables; }; /* ID3D11ShaderReflection */ diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index d1f2fb7..27b1cd2 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -60,6 +60,22 @@ static BOOL copy_name(const char *ptr, char **name) return TRUE; } +static BOOL copy_value(const char *ptr, void **value, DWORD size) +{ + if (!ptr || !size) return TRUE; + + *value = HeapAlloc(GetProcessHeap(), 0, size); + if (!*value) + { + ERR("Failed to allocate vlaue memory.\n"); + return FALSE; + } + + memcpy(*value, ptr, size); + + return TRUE; +} + static void free_signature(struct d3dcompiler_shader_signature *sig) { TRACE("Free signature %p\n", sig); @@ -68,8 +84,28 @@ static void free_signature(struct d3dcompiler_shader_signature *sig) HeapFree(GetProcessHeap(), 0, sig->string_data); } +static void free_variable(struct d3dcompiler_shader_reflection_variable *var) +{ + if (var) + { + HeapFree(GetProcessHeap(), 0, var->name); + HeapFree(GetProcessHeap(), 0, var->default_value); + } +} + static void free_constant_buffer(struct d3dcompiler_shader_reflection_constant_buffer *cb) { + if (cb->variables) + { + unsigned int i; + + for (i = 0; i < cb->variable_count; ++i) + { + free_variable(&cb->variables[i]); + } + HeapFree(GetProcessHeap(), 0, cb->variables); + } + HeapFree(GetProcessHeap(), 0, cb->name); } @@ -537,6 +573,49 @@ const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflect d3dcompiler_shader_reflection_constant_buffer_GetVariableByName, }; +/* ID3D11ShaderReflectionVariable methods */ + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetDesc( + ID3D11ShaderReflectionVariable *iface, D3D11_SHADER_VARIABLE_DESC *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); + + return E_NOTIMPL; +} + +static ID3D11ShaderReflectionType * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetType( + ID3D11ShaderReflectionVariable *iface) +{ + FIXME("iface %p stub!\n", iface); + + return NULL; +} + +static ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetBuffer( + ID3D11ShaderReflectionVariable *iface) +{ + FIXME("iface %p stub!\n", iface); + + return NULL; +} + +static UINT STDMETHODCALLTYPE d3dcompiler_shader_reflection_variable_GetInterfaceSlot( + ID3D11ShaderReflectionVariable *iface, UINT index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return 0; +} + +const struct ID3D11ShaderReflectionVariableVtbl d3dcompiler_shader_reflection_variable_vtbl = +{ + /* ID3D11ShaderReflectionVariable methods */ + d3dcompiler_shader_reflection_variable_GetDesc, + d3dcompiler_shader_reflection_variable_GetType, + d3dcompiler_shader_reflection_variable_GetBuffer, + d3dcompiler_shader_reflection_variable_GetInterfaceSlot, +}; + static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) { const char *ptr = data; @@ -647,6 +726,75 @@ static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, c return E_FAIL; } +static HRESULT d3dcompiler_parse_variables(struct d3dcompiler_shader_reflection_constant_buffer *cb, + const char *data, DWORD data_size, const char *ptr) +{ + struct d3dcompiler_shader_reflection_variable *variables; + unsigned int i; + HRESULT hr; + + variables = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cb->variable_count * sizeof(*variables)); + if (!variables) + { + ERR("Failed to allocate variables memory.\n"); + return E_OUTOFMEMORY; + } + + for (i = 0; i < cb->variable_count; i++) + { + struct d3dcompiler_shader_reflection_variable *v = &variables[i]; + DWORD offset; + + v->ID3D11ShaderReflectionVariable_iface.lpVtbl = &d3dcompiler_shader_reflection_variable_vtbl; + + read_dword(&ptr, &offset); + if (!copy_name(data + offset, &v->name)) + { + ERR("Failed to copy name.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + TRACE("Variable name: %s.\n", debugstr_a(v->name)); + + read_dword(&ptr, &v->start_offset); + TRACE("Variable offset: %u\n", v->start_offset); + + read_dword(&ptr, &v->size); + TRACE("Variable size: %u\n", v->size); + + read_dword(&ptr, &v->flags); + TRACE("Variable flags: %u\n", v->flags); + + /* todo: Parse types */ + read_dword(&ptr, &offset); + FIXME("Variable type offset: %x\n", offset); + + read_dword(&ptr, &offset); + TRACE("Variable default value offset: %x\n", offset); + if (!copy_value(data + offset, &v->default_value, offset ? v->size : 0)) + { + ERR("Failed to copy name.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + if ((cb->reflection->target & 0xffff) >= 0x500) + skip_dword_unknown(&ptr, 4); + } + + cb->variables = variables; + + return S_OK; + +err_out: + for (i = 0; i < cb->variable_count; i++) + { + free_variable(&variables[i]); + } + HeapFree(GetProcessHeap(), 0, variables); + return hr; +} + static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) { const char *ptr = data; @@ -779,9 +927,15 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c read_dword(&ptr, &cb->variable_count); TRACE("Variable count: %u\n", cb->variable_count); - /* todo: Parse variables */ read_dword(&ptr, &offset); - FIXME("Variable offset: %x\n", offset); + TRACE("Variable offset: %x\n", offset); + + hr = d3dcompiler_parse_variables(cb, data, data_size, data + offset); + if (hr != S_OK) + { + FIXME("Failed to parse variables."); + goto err_out; + } read_dword(&ptr, &cb->size); TRACE("Cbuffer size: %u\n", cb->size);
1
0
0
0
Rico Schüller : d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetDesc().
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: c6ec32aec72d3ac04c326e90785d4054c9116190 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6ec32aec72d3ac04c326e907…
Author: Rico Schüller <kgbricola(a)web.de> Date: Sun Feb 20 21:21:21 2011 +0100 d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetDesc(). --- dlls/d3dcompiler_43/reflection.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 4aeb70f..d1f2fb7 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -480,12 +480,37 @@ const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl = /* ID3D11ShaderReflectionConstantBuffer methods */ +static inline struct d3dcompiler_shader_reflection_constant_buffer *impl_from_ID3D11ShaderReflectionConstantBuffer(ID3D11ShaderReflectionConstantBuffer *iface) +{ + return CONTAINING_RECORD(iface, struct d3dcompiler_shader_reflection_constant_buffer, ID3D11ShaderReflectionConstantBuffer_iface); +} + static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetDesc( ID3D11ShaderReflectionConstantBuffer *iface, D3D11_SHADER_BUFFER_DESC *desc) { - FIXME("iface %p, desc %p stub!\n", iface, desc); + struct d3dcompiler_shader_reflection_constant_buffer *This = impl_from_ID3D11ShaderReflectionConstantBuffer(iface); - return E_NOTIMPL; + TRACE("iface %p, desc %p\n", iface, desc); + + if (This == &null_constant_buffer) + { + WARN("Null constant buffer specified\n"); + return E_FAIL; + } + + if (!desc) + { + WARN("Invalid argument specified\n"); + return E_FAIL; + } + + desc->Name = This->name; + desc->Type = This->type; + desc->Variables = This->variable_count; + desc->Size = This->size; + desc->uFlags = This->flags; + + return S_OK; } static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByIndex(
1
0
0
0
Rico Schüller : d3dcompiler: Implement ID3D11ShaderReflection::GetConstantBufferByName().
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: dd934099e14d0edc8f27d63f4201cb111248e9dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd934099e14d0edc8f27d63f4…
Author: Rico Schüller <kgbricola(a)web.de> Date: Sun Feb 20 21:21:18 2011 +0100 d3dcompiler: Implement ID3D11ShaderReflection::GetConstantBufferByName(). --- dlls/d3dcompiler_43/reflection.c | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 3c4d138..4aeb70f 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -237,9 +237,31 @@ static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompil static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName( ID3D11ShaderReflection *iface, LPCSTR name) { - FIXME("iface %p, name \"%s\" stub!\n", iface, name); + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); + unsigned int i; - return NULL; + TRACE("iface %p, name %s\n", iface, debugstr_a(name)); + + if (!name) + { + WARN("Invalid argument specified\n"); + return &null_constant_buffer.ID3D11ShaderReflectionConstantBuffer_iface; + } + + for (i = 0; i < This->constant_buffer_count; ++i) + { + struct d3dcompiler_shader_reflection_constant_buffer *d = &This->constant_buffers[i]; + + if (!strcmp(d->name, name)) + { + TRACE("Returning ID3D11ShaderReflectionConstantBuffer %p.\n", d); + return &d->ID3D11ShaderReflectionConstantBuffer_iface; + } + } + + WARN("Invalid name specified\n"); + + return &null_constant_buffer.ID3D11ShaderReflectionConstantBuffer_iface; } static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetResourceBindingDesc(
1
0
0
0
Rico Schüller : d3dcompiler: Implement ID3D11ShaderReflection::GetConstantBufferByIndex().
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: a7483f4bcc13f287c1f1b0150304ee471b12fcfd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a7483f4bcc13f287c1f1b0150…
Author: Rico Schüller <kgbricola(a)web.de> Date: Sun Feb 20 21:21:14 2011 +0100 d3dcompiler: Implement ID3D11ShaderReflection::GetConstantBufferByIndex(). --- dlls/d3dcompiler_43/reflection.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index b382d83..3c4d138 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -31,6 +31,11 @@ enum D3DCOMPILER_SIGNATURE_ELEMENT_SIZE D3DCOMPILER_SIGNATURE_ELEMENT_SIZE7 = 7, }; +const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflection_constant_buffer_vtbl; + +/* null objects - needed for invalid calls */ +static struct d3dcompiler_shader_reflection_constant_buffer null_constant_buffer = {{&d3dcompiler_shader_reflection_constant_buffer_vtbl}}; + static BOOL copy_name(const char *ptr, char **name) { size_t name_len; @@ -216,9 +221,17 @@ static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetDesc(ID3D11Sha static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByIndex( ID3D11ShaderReflection *iface, UINT index) { - FIXME("iface %p, index %u stub!\n", iface, index); + struct d3dcompiler_shader_reflection *This = impl_from_ID3D11ShaderReflection(iface); - return NULL; + TRACE("iface %p, index %u\n", iface, index); + + if (index >= This->constant_buffer_count) + { + WARN("Invalid argument specified\n"); + return &null_constant_buffer.ID3D11ShaderReflectionConstantBuffer_iface; + } + + return &This->constant_buffers[index].ID3D11ShaderReflectionConstantBuffer_iface; } static struct ID3D11ShaderReflectionConstantBuffer * STDMETHODCALLTYPE d3dcompiler_shader_reflection_GetConstantBufferByName(
1
0
0
0
Rico Schüller : d3dcompiler: Parse reflection constant buffers.
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: 3f6c54f26306dee49064c20e7c780d1f49ffbbf8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f6c54f26306dee49064c20e7…
Author: Rico Schüller <kgbricola(a)web.de> Date: Sun Feb 20 21:21:11 2011 +0100 d3dcompiler: Parse reflection constant buffers. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 14 ++++ dlls/d3dcompiler_43/reflection.c | 106 +++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 4 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index bc99322..bec51e5 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -64,6 +64,19 @@ struct d3dcompiler_shader_signature char *string_data; }; +struct d3dcompiler_shader_reflection_constant_buffer +{ + ID3D11ShaderReflectionConstantBuffer ID3D11ShaderReflectionConstantBuffer_iface; + + struct d3dcompiler_shader_reflection *reflection; + + char *name; + D3D_CBUFFER_TYPE type; + UINT variable_count; + UINT size; + UINT flags; +}; + /* ID3D11ShaderReflection */ struct d3dcompiler_shader_reflection { @@ -109,6 +122,7 @@ struct d3dcompiler_shader_reflection struct d3dcompiler_shader_signature *pcsg; char *resource_string; D3D11_SHADER_INPUT_BIND_DESC *bound_resources; + struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers; }; /* reflection handling */ diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index e1ba543..b382d83 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -63,6 +63,11 @@ static void free_signature(struct d3dcompiler_shader_signature *sig) HeapFree(GetProcessHeap(), 0, sig->string_data); } +static void free_constant_buffer(struct d3dcompiler_shader_reflection_constant_buffer *cb) +{ + HeapFree(GetProcessHeap(), 0, cb->name); +} + static void reflection_cleanup(struct d3dcompiler_shader_reflection *ref) { TRACE("Cleanup %p\n", ref); @@ -85,6 +90,17 @@ static void reflection_cleanup(struct d3dcompiler_shader_reflection *ref) HeapFree(GetProcessHeap(), 0, ref->pcsg); } + if (ref->constant_buffers) + { + unsigned int i; + + for (i = 0; i < ref->constant_buffer_count; ++i) + { + free_constant_buffer(&ref->constant_buffers[i]); + } + } + + HeapFree(GetProcessHeap(), 0, ref->constant_buffers); HeapFree(GetProcessHeap(), 0, ref->bound_resources); HeapFree(GetProcessHeap(), 0, ref->resource_string); HeapFree(GetProcessHeap(), 0, ref->creator); @@ -427,6 +443,40 @@ const struct ID3D11ShaderReflectionVtbl d3dcompiler_shader_reflection_vtbl = d3dcompiler_shader_reflection_GetThreadGroupSize, }; +/* ID3D11ShaderReflectionConstantBuffer methods */ + +static HRESULT STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetDesc( + ID3D11ShaderReflectionConstantBuffer *iface, D3D11_SHADER_BUFFER_DESC *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); + + return E_NOTIMPL; +} + +static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByIndex( + ID3D11ShaderReflectionConstantBuffer *iface, UINT index) +{ + FIXME("iface %p, index %u stub!\n", iface, index); + + return NULL; +} + +static ID3D11ShaderReflectionVariable * STDMETHODCALLTYPE d3dcompiler_shader_reflection_constant_buffer_GetVariableByName( + ID3D11ShaderReflectionConstantBuffer *iface, LPCSTR name) +{ + FIXME("iface %p, name %s stub!\n", iface, name); + + return NULL; +} + +const struct ID3D11ShaderReflectionConstantBufferVtbl d3dcompiler_shader_reflection_constant_buffer_vtbl = +{ + /* ID3D11ShaderReflectionConstantBuffer methods */ + d3dcompiler_shader_reflection_constant_buffer_GetDesc, + d3dcompiler_shader_reflection_constant_buffer_GetVariableByIndex, + d3dcompiler_shader_reflection_constant_buffer_GetVariableByName, +}; + static HRESULT d3dcompiler_parse_stat(struct d3dcompiler_shader_reflection *r, const char *data, DWORD data_size) { const char *ptr = data; @@ -542,11 +592,10 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c const char *ptr = data; DWORD size = data_size >> 2; DWORD offset, cbuffer_offset, resource_offset, creator_offset; - unsigned int i; - unsigned int string_data_offset; - unsigned int string_data_size; + unsigned int i, string_data_offset, string_data_size; char *string_data = NULL, *creator = NULL; D3D11_SHADER_INPUT_BIND_DESC *bound_resources = NULL; + struct d3dcompiler_shader_reflection_constant_buffer *constant_buffers = NULL; HRESULT hr; TRACE("Size %u\n", size); @@ -640,15 +689,64 @@ static HRESULT d3dcompiler_parse_rdef(struct d3dcompiler_shader_reflection *r, c } } - /* todo: Parse Constant buffers */ + if (r->constant_buffer_count) + { + constant_buffers = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, r->constant_buffer_count * sizeof(*constant_buffers)); + if (!constant_buffers) + { + ERR("Failed to allocate constant buffer memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + ptr = data + cbuffer_offset; + for (i = 0; i < r->constant_buffer_count; i++) + { + struct d3dcompiler_shader_reflection_constant_buffer *cb = &constant_buffers[i]; + + cb->ID3D11ShaderReflectionConstantBuffer_iface.lpVtbl = &d3dcompiler_shader_reflection_constant_buffer_vtbl; + cb->reflection = r; + + read_dword(&ptr, &offset); + if (!copy_name(data + offset, &cb->name)) + { + ERR("Failed to copy name.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + TRACE("Name: %s.\n", debugstr_a(cb->name)); + + read_dword(&ptr, &cb->variable_count); + TRACE("Variable count: %u\n", cb->variable_count); + + /* todo: Parse variables */ + read_dword(&ptr, &offset); + FIXME("Variable offset: %x\n", offset); + + read_dword(&ptr, &cb->size); + TRACE("Cbuffer size: %u\n", cb->size); + + read_dword(&ptr, &cb->flags); + TRACE("Cbuffer flags: %u\n", cb->flags); + + read_dword(&ptr, &cb->type); + TRACE("Cbuffer type: %#x\n", cb->type); + } + } r->creator = creator; r->resource_string = string_data; r->bound_resources = bound_resources; + r->constant_buffers = constant_buffers; return S_OK; err_out: + for (i = 0; i < r->constant_buffer_count; ++i) + { + free_constant_buffer(&constant_buffers[i]); + } + HeapFree(GetProcessHeap(), 0, constant_buffers); HeapFree(GetProcessHeap(), 0, bound_resources); HeapFree(GetProcessHeap(), 0, string_data); HeapFree(GetProcessHeap(), 0, creator);
1
0
0
0
Jörg Höhle : winmm: Let WideCharToMultiByte search for NUL string terminator (Valgrind).
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: fd8576bfdbaa6de55ba5bb5833f7f92173035a62 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd8576bfdbaa6de55ba5bb583…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Sun Feb 20 18:55:12 2011 +0100 winmm: Let WideCharToMultiByte search for NUL string terminator (Valgrind). --- dlls/winmm/mci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/winmm/mci.c b/dlls/winmm/mci.c index 8a889d2..0fcccec 100644 --- a/dlls/winmm/mci.c +++ b/dlls/winmm/mci.c @@ -464,7 +464,7 @@ static void MCI_UnmapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR dwParam2, if (!result) { WideCharToMultiByte(CP_ACP, 0, - mci_sysinfoW->lpstrReturn, mci_sysinfoW->dwRetSize, + mci_sysinfoW->lpstrReturn, -1, mci_sysinfoA->lpstrReturn, mci_sysinfoA->dwRetSize, NULL, NULL); } @@ -482,7 +482,7 @@ static void MCI_UnmapMsgAtoW(UINT msg, DWORD_PTR dwParam1, DWORD_PTR dwParam2, if (!result) { WideCharToMultiByte(CP_ACP, 0, - mci_infoW->lpstrReturn, mci_infoW->dwRetSize, + mci_infoW->lpstrReturn, -1, mci_infoA->lpstrReturn, mci_infoA->dwRetSize, NULL, NULL); }
1
0
0
0
Jerome Leclanche : winemenubuilder: Make sure extension-based mimetypes are always lowercase.
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: 44527f57b2c4722b3317b2a03ba6b1d2ac7fc538 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=44527f57b2c4722b3317b2a03…
Author: Jerome Leclanche <adys.wh(a)gmail.com> Date: Sun Feb 20 18:05:44 2011 +0000 winemenubuilder: Make sure extension-based mimetypes are always lowercase. --- programs/winemenubuilder/winemenubuilder.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 070a8c2..e0c8e8f 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -2321,7 +2321,7 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package char *progIdA = NULL; char *mimeProgId = NULL; - extensionA = wchars_to_utf8_chars(extensionW); + extensionA = wchars_to_utf8_chars(strlwrW(extensionW)); if (extensionA == NULL) { WINE_ERR("out of memory\n");
1
0
0
0
Alexander Scott-Johns : comctl32: Fix read of uninitialized data in notify_itemactivate (Valgrind).
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: 60b5d91abb613a38af6abc0fa38dd21ab0912446 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=60b5d91abb613a38af6abc0fa…
Author: Alexander Scott-Johns <alexander.scott.johns(a)googlemail.com> Date: Fri Feb 18 23:21:34 2011 +0000 comctl32: Fix read of uninitialized data in notify_itemactivate (Valgrind). --- dlls/comctl32/listview.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 4dad175..01c5864 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -865,6 +865,7 @@ static inline void notify_itemactivate(const LISTVIEW_INFO *infoPtr, const LVHIT item.mask = LVIF_PARAM|LVIF_STATE; item.iItem = htInfo->iItem; item.iSubItem = 0; + item.stateMask = (UINT)-1; if (LISTVIEW_GetItemT(infoPtr, &item, TRUE)) { nmia.lParam = item.lParam; nmia.uOldState = item.state;
1
0
0
0
Alexander Scott-Johns : comctl32: Fix read of uninitialized data in LISTVIEW_GetItemExtT when LVIF_TEXT is not set (Valgrind).
by Alexandre Julliard
21 Feb '11
21 Feb '11
Module: wine Branch: master Commit: f2df2f38e6ff67ff7d4042b25966f19f0cc7b735 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2df2f38e6ff67ff7d4042b25…
Author: Alexander Scott-Johns <alexander.scott.johns(a)googlemail.com> Date: Fri Feb 18 13:42:56 2011 +0000 comctl32: Fix read of uninitialized data in LISTVIEW_GetItemExtT when LVIF_TEXT is not set (Valgrind). --- dlls/comctl32/listview.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index dc96200..4dad175 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6743,7 +6743,7 @@ static BOOL LISTVIEW_GetItemExtT(const LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVIte pszText = lpLVItem->pszText; bResult = LISTVIEW_GetItemT(infoPtr, lpLVItem, isW); - if (bResult && lpLVItem->pszText != pszText) + if (bResult && (lpLVItem->mask & LVIF_TEXT) && lpLVItem->pszText != pszText) { if (lpLVItem->pszText != LPSTR_TEXTCALLBACKW) textcpynT(pszText, isW, lpLVItem->pszText, isW, lpLVItem->cchTextMax);
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
68
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
Results per page:
10
25
50
100
200