Matteo Bruni : d3dcompiler: Store location information in constants, variable dereferences and constructors.
Alexandre Julliard
julliard at winehq.org
Tue Jul 17 11:05:32 CDT 2012
Module: wine
Branch: master
Commit: be350b0bb39ee1f2bc76237cbacf7ea8d788752e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=be350b0bb39ee1f2bc76237cbacf7ea8d788752e
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Mon Jul 16 20:39:19 2012 +0200
d3dcompiler: Store location information in constants, variable dereferences and constructors.
---
dlls/d3dcompiler_43/hlsl.y | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index cf0c7b5..f7f62fe 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -799,6 +799,7 @@ primary_expr: C_FLOAT
return -1;
}
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->v.value.f[0] = $1;
$$ = &c->node;
@@ -812,6 +813,7 @@ primary_expr: C_FLOAT
return -1;
}
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->v.value.i[0] = $1;
$$ = &c->node;
@@ -825,6 +827,7 @@ primary_expr: C_FLOAT
return -1;
}
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->v.value.b[0] = $1;
$$ = &c->node;
@@ -832,7 +835,13 @@ primary_expr: C_FLOAT
| variable
{
struct hlsl_ir_deref *deref = new_var_deref($1);
- $$ = deref ? &deref->node : NULL;
+ if (deref)
+ {
+ $$ = &deref->node;
+ set_location(&$$->loc, &@1);
+ }
+ else
+ $$ = NULL;
}
| '(' expr ')'
{
@@ -888,6 +897,7 @@ postfix_expr: primary_expr
constructor = d3dcompiler_alloc(sizeof(*constructor));
constructor->node.type = HLSL_IR_CONSTRUCTOR;
+ set_location(&constructor->node.loc, &@3);
constructor->node.data_type = $2;
constructor->arguments = $4;
More information about the wine-cvs
mailing list