Matteo Bruni : d3dcompiler: Type names have to be allocated on the heap.

Alexandre Julliard julliard at winehq.org
Tue Jul 10 19:01:42 CDT 2012


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

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Jul 10 15:39:42 2012 +0200

d3dcompiler: Type names have to be allocated on the heap.

---

 dlls/d3dcompiler_43/hlsl.y |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index ea6bb12..5223189 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -473,31 +473,31 @@ type:                     base_type
 
 base_type:                KW_VOID
                             {
-                                $$ = new_hlsl_type("void", HLSL_CLASS_SCALAR, HLSL_TYPE_VOID, 1, 1);
+                                $$ = new_hlsl_type(d3dcompiler_strdup("void"), HLSL_CLASS_SCALAR, HLSL_TYPE_VOID, 1, 1);
                             }
                         | KW_SAMPLER
                             {
-                                $$ = new_hlsl_type("sampler", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
+                                $$ = new_hlsl_type(d3dcompiler_strdup("sampler"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
                                 $$->sampler_dim = HLSL_SAMPLER_DIM_GENERIC;
                             }
                         | KW_SAMPLER1D
                             {
-                                $$ = new_hlsl_type("sampler1D", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
+                                $$ = new_hlsl_type(d3dcompiler_strdup("sampler1D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
                                 $$->sampler_dim = HLSL_SAMPLER_DIM_1D;
                             }
                         | KW_SAMPLER2D
                             {
-                                $$ = new_hlsl_type("sampler2D", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
+                                $$ = new_hlsl_type(d3dcompiler_strdup("sampler2D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
                                 $$->sampler_dim = HLSL_SAMPLER_DIM_2D;
                             }
                         | KW_SAMPLER3D
                             {
-                                $$ = new_hlsl_type("sampler3D", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
+                                $$ = new_hlsl_type(d3dcompiler_strdup("sampler3D"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
                                 $$->sampler_dim = HLSL_SAMPLER_DIM_3D;
                             }
                         | KW_SAMPLERCUBE
                             {
-                                $$ = new_hlsl_type("samplerCUBE", HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
+                                $$ = new_hlsl_type(d3dcompiler_strdup("samplerCUBE"), HLSL_CLASS_OBJECT, HLSL_TYPE_SAMPLER, 1, 1);
                                 $$->sampler_dim = HLSL_SAMPLER_DIM_CUBE;
                             }
                         | TYPE_IDENTIFIER




More information about the wine-cvs mailing list