d884f60861f270cdcf7d9d47765efcf1e1de30b6 |
|
20-Mar-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Convert ir_call to be a statement rather than a value. Aside from ir_call, our IR is cleanly split into two classes: - Statements (typeless; used for side effects, control flow) - Values (deeply nestable, pure, typed expression trees) Unfortunately, ir_call confused all this: - For void functions, we placed ir_call directly in the instruction stream, treating it as an untyped statement. Yet, it was a subclass of ir_rvalue, and no other ir_rvalue could be used in this way. - For functions with a return value, ir_call could be placed in arbitrary expression trees. While this fit naturally with the source language, it meant that expressions might not be pure, making it difficult to transform and optimize them. To combat this, we always emitted ir_call directly in the RHS of an ir_assignment, only using a temporary variable in expression trees. Many passes relied on this assumption; the acos and atan built-ins violated it. This patch makes ir_call a statement (ir_instruction) rather than a value (ir_rvalue). Non-void calls now take a ir_dereference of a variable, and store the return value there---effectively a call and assignment rolled into one. They cannot be embedded in expressions. All expression trees are now pure, without exception. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
807e967c615dc80a264af5a89af7649f95481744 |
|
23-Sep-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Use ir_rvalue to represent generic error_type values. Currently, ir_call can be used as either a statement (for void functions) or a value (for non-void functions). This is rather awkward, as it's the only class that can be used in both forms. A number of places use ir_call::get_error_instruction() to construct a generic value of error_type. If ir_call is to become a statement, it can no longer serve this purpose. Unfortunately, none of our classes are particularly well suited for this, and creating a new one would be rather aggrandizing. So, this patch introduces ir_rvalue::error_value(), a static method that creates an instance of the base class, ir_rvalue. This has the nice property that you can't accidentally try and access uninitialized fields (as it doesn't have any). The downside is that the base class is no longer abstract. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
cc81eb09b928389f926b3512c18b3298777d2928 |
|
19-Aug-2011 |
Paul Berry <stereotype441@gmail.com> |
glsl hierarchical visitor: Do not overwrite base_ir for parameter lists. This patch fixes a bug in ir_hirearchical_visitor: when traversing an exec_list representing the formal or actual parameters of a function, it modified base_ir to point to each parameter in turn, rather than leaving it as a pointer to the enclosing statement. This was a problem, since base_ir is used by visitor classes to locate the statement containing the node being visited (usually so that additional statements can be inserted before or after it). Without this fix, visitors might attempt to insert statements into parameter lists. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
1e3bcbdf31f09666ba358f35ff9486faee3642ca |
|
25-Feb-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Add a new ir_txs (textureSize) opcode to ir_texture. One unique aspect of TXS is that it doesn't have a coordinate. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
c5a27b5939427bdc95c926b450ed3de1ff4baafb |
|
09-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Change texel offsets to a single vector rvalue. Having these as actual integer values makes it difficult to implement the texture*Offset built-in functions, since the offset is actually a function parameter (which doesn't have a constant value). The original rationale was that some hardware needs these offset baked into the instruction opcode. However, at least i965 should be able to support non-constant offsets. Others should be able to rely on inlining and constant propagation.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
c8ee8e07f7cc8f18d367ffcec065b45f8a6976f4 |
|
06-Aug-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Set a flag when visiting the assignee of an assignment
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
748f81a8eacabf07e1d26372a61683e6759a61a3 |
|
05-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Make the HV actually call ir_texture's visit_leave.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
61a44ccaef63a8ad36ebd934e6944ede5587e4d5 |
|
19-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
exec_list: Fix foreach_list_safe. It now works correctly when nodes are removed, as it was originally intended to do; it no longer processes nodes added to the list before the current node, nor those added immediately after the current node. This matches the behavior of Linux's list_for_each_safe.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
a4dde28ee6893ab99c6ca93699392bb8bc2d981c |
|
08-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl2: Use new foreach_list_safe abstraction.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
773025b92c934014b9ceb4ebfdabcfc9d8587aa2 |
|
07-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Don't forget to walk the parameters to a function in the hv. Fixes segfaults from use after free after the steal of ir nodes and free of the compile context.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
8a1f186cc55979bb9df0a88b48da8d81460c3e7c |
|
01-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Add a pass to convert mod(a, b) to b * fract(a/b). This is used by the Mesa IR backend to implement mod, fixing glsl-fs-mod.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
16efab1c4dee6e6a827ba5f1c482378159545ae5 |
|
30-Jun-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl2: Define new ir_discard instruction.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|
29285882676388aacff123e8bdf025904abf8ea9 |
|
25-Jun-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Move the compiler to the subdirectory it will live in in Mesa.
/external/mesa3d/src/glsl/ir_hv_accept.cpp
|