Module: wine Branch: master Commit: bfcd413553b4c8ca4a22b95a3399118ae7964f72 URL: http://source.winehq.org/git/wine.git/?a=commit;h=bfcd413553b4c8ca4a22b95a33...
Author: Rico Schüller kgbricola@web.de Date: Wed Dec 22 12:15:36 2010 +0100
d3dcompiler: Parse PCSG in the reflection interface.
---
dlls/d3dcompiler_43/d3dcompiler_private.h | 1 + dlls/d3dcompiler_43/reflection.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 37d3ea1..9355c44 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -99,6 +99,7 @@ struct d3dcompiler_shader_reflection
struct d3dcompiler_shader_signature *isgn; struct d3dcompiler_shader_signature *osgn; + struct d3dcompiler_shader_signature *pcsg; };
/* reflection handling */ diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index 219050c..89f868b 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -48,6 +48,12 @@ static void reflection_cleanup(struct d3dcompiler_shader_reflection *ref) free_signature(ref->osgn); HeapFree(GetProcessHeap(), 0, ref->osgn); } + + if (ref->pcsg) + { + free_signature(ref->pcsg); + HeapFree(GetProcessHeap(), 0, ref->pcsg); + } }
static inline struct d3dcompiler_shader_reflection *impl_from_ID3D11ShaderReflection(ID3D11ShaderReflection *iface) @@ -518,6 +524,23 @@ HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection } break;
+ case TAG_PCSG: + reflection->pcsg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->pcsg)); + if (!reflection->pcsg) + { + ERR("Failed to allocate PCSG memory.\n"); + hr = E_OUTOFMEMORY; + goto err_out; + } + + hr = d3dcompiler_parse_signature(reflection->pcsg, section->data, section->data_size); + if (FAILED(hr)) + { + WARN("Failed to parse section PCSG.\n"); + goto err_out; + } + break; + default: FIXME("Unhandled section %s!\n", debugstr_an((const char *)§ion->tag, 4)); break;