Open GoogleCodeExporter opened 9 years ago
Original comment by oetu...@nvidia.com
on 30 Mar 2015 at 1:58
Another complex type of case is:
float a[3];
float b[3];
float c[3];
bool d = (a = b) == (a = c);
In this case, at least one temporary variable is needed to store one of the
results of the assignment. For simplicity, it might be the best to always use
temporary variables for storing results of assignment, so that the above code
would become:
float a[3];
float b[3];
float c[3];
float a0[3];
angle_assign_3_float(a0, b);
float a1[3];
angle_assign_3_float(a1, c);
bool d = angle_eq_3_float(a0, a1);
angle_assign_3_float(a, a0);
angle_assign_3_float(a, a1);
Original comment by oetu...@nvidia.com
on 30 Mar 2015 at 2:25
Project: angle/angle
Branch : master
Author : Olli Etuaho <oetuaho@nvidia.com>
Commit : 1269076cbfe23a1a87487eca8315e5786de01f66
Code-Review 0 : Nicolas Capens, Olli Etuaho
Code-Review +1: Jamie Madill
Code-Review +2: Geoff Lang
Verified 0 : Geoff Lang, Jamie Madill, Nicolas Capens
Verified +1: Olli Etuaho
Commit Queue : Chumped
Change-Id : Ibf9d71a75d27d139d2aabb5162ab04a0974321d3
Reviewed-at : https://chromium-review.googlesource.com/263222
Add basic support for assigning arrays in HLSL output
Implement support for assignments where the return value of the assignment
is not used in another part of the expression.
TEST=WebGL conformance tests
BUG=angleproject:960
src/compiler/translator/OutputHLSL.cpp
src/compiler/translator/OutputHLSL.h
Original comment by bugdro...@chromium.org
on 2 Apr 2015 at 4:47
Project: angle/angle
Branch : master
Author : Olli Etuaho <oetuaho@nvidia.com>
Commit : b2d6a9be287f04a596871cabfa5d69ae6a390ba1
Code-Review 0 : Nicolas Capens, Olli Etuaho
Code-Review +1: Jamie Madill
Code-Review +2: Geoff Lang
Verified 0 : Geoff Lang, Jamie Madill, Nicolas Capens
Verified +1: Olli Etuaho
Commit Queue : Chumped
Change-Id : I11353d7ed7160c853e58a0ef3471ca439cb314c8
Reviewed-at : https://chromium-review.googlesource.com/263070
Stub simplifying array assignment for HLSL output
Add an AST traverser that rejects shaders with expressions that use the return
value of an assignment where an array is assigned to another array. In the
future this should be made into a tool that can simplify these expressions so
that return values of array assignments are not used.
In its current form this code prevents OutputHLSL from producing garbage code
when the original code contains expressions like a = (b = c); where a, b, and c
are all arrays.
BUG=angleproject:960
src/compiler.gypi
src/compiler/translator/SimplifyArrayAssignment.cpp
src/compiler/translator/SimplifyArrayAssignment.h
src/compiler/translator/TranslatorHLSL.cpp
Original comment by bugdro...@chromium.org
on 2 Apr 2015 at 4:50
Original issue reported on code.google.com by
oetu...@nvidia.com
on 30 Mar 2015 at 1:57