Commit f6b22a75 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3dcompiler: Put data type name of constants on the heap.

parent feda13db
......@@ -1770,7 +1770,7 @@ primary_expr: C_FLOAT
}
c->node.type = HLSL_IR_CONSTANT;
set_location(&c->node.loc, &yylloc);
c->node.data_type = new_hlsl_type("float", HLSL_CLASS_SCALAR, HLSL_TYPE_FLOAT, 1, 1);
c->node.data_type = new_hlsl_type(d3dcompiler_strdup("float"), HLSL_CLASS_SCALAR, HLSL_TYPE_FLOAT, 1, 1);
c->v.value.f[0] = $1;
$$ = &c->node;
}
......@@ -1784,7 +1784,7 @@ primary_expr: C_FLOAT
}
c->node.type = HLSL_IR_CONSTANT;
set_location(&c->node.loc, &yylloc);
c->node.data_type = new_hlsl_type("int", HLSL_CLASS_SCALAR, HLSL_TYPE_INT, 1, 1);
c->node.data_type = new_hlsl_type(d3dcompiler_strdup("int"), HLSL_CLASS_SCALAR, HLSL_TYPE_INT, 1, 1);
c->v.value.i[0] = $1;
$$ = &c->node;
}
......@@ -1798,7 +1798,7 @@ primary_expr: C_FLOAT
}
c->node.type = HLSL_IR_CONSTANT;
set_location(&c->node.loc, &yylloc);
c->node.data_type = new_hlsl_type("bool", HLSL_CLASS_SCALAR, HLSL_TYPE_BOOL, 1, 1);
c->node.data_type = new_hlsl_type(d3dcompiler_strdup("bool"), HLSL_CLASS_SCALAR, HLSL_TYPE_BOOL, 1, 1);
c->v.value.b[0] = $1;
$$ = &c->node;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment