Rico Schüller : d3dcompiler: Parse OSGN in the reflection interface.

Alexandre Julliard julliard at winehq.org
Wed Dec 22 10:57:39 CST 2010


Module: wine
Branch: master
Commit: ae98cb46596f467d629ff5d0c7f6c626efda4cff
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ae98cb46596f467d629ff5d0c7f6c626efda4cff

Author: Rico Schüller <kgbricola at web.de>
Date:   Wed Dec 22 12:15:21 2010 +0100

d3dcompiler: Parse OSGN 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 5c4f80f..37d3ea1 100644
--- a/dlls/d3dcompiler_43/d3dcompiler_private.h
+++ b/dlls/d3dcompiler_43/d3dcompiler_private.h
@@ -98,6 +98,7 @@ struct d3dcompiler_shader_reflection
     D3D_TESSELLATOR_DOMAIN tessellator_domain;
 
     struct d3dcompiler_shader_signature *isgn;
+    struct d3dcompiler_shader_signature *osgn;
 };
 
 /* reflection handling */
diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c
index a8cf31f..219050c 100644
--- a/dlls/d3dcompiler_43/reflection.c
+++ b/dlls/d3dcompiler_43/reflection.c
@@ -42,6 +42,12 @@ static void reflection_cleanup(struct d3dcompiler_shader_reflection *ref)
         free_signature(ref->isgn);
         HeapFree(GetProcessHeap(), 0, ref->isgn);
     }
+
+    if (ref->osgn)
+    {
+        free_signature(ref->osgn);
+        HeapFree(GetProcessHeap(), 0, ref->osgn);
+    }
 }
 
 static inline struct d3dcompiler_shader_reflection *impl_from_ID3D11ShaderReflection(ID3D11ShaderReflection *iface)
@@ -495,6 +501,23 @@ HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_reflection
                 }
                 break;
 
+            case TAG_OSGN:
+                reflection->osgn = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*reflection->osgn));
+                if (!reflection->osgn)
+                {
+                    ERR("Failed to allocate OSGN memory.\n");
+                    hr = E_OUTOFMEMORY;
+                    goto err_out;
+                }
+
+                hr = d3dcompiler_parse_signature(reflection->osgn, section->data, section->data_size);
+                if (FAILED(hr))
+                {
+                    WARN("Failed to parse section OSGN.\n");
+                    goto err_out;
+                }
+                break;
+
             default:
                 FIXME("Unhandled section %s!\n", debugstr_an((const char *)&section->tag, 4));
                 break;




More information about the wine-cvs mailing list