mesa.git
14 years agoAdd missing 'else's to fix extension processing
Ian Romanick [Fri, 23 Apr 2010 20:32:23 +0000 (13:32 -0700)]
Add missing 'else's to fix extension processing

The missing else-statements caused all of the extensions execpt
GL_ARB_texture_rectangle to be unsupported.

This causes the following tests to pass:

     glslparsertest/glsl2/draw_buffers-04.frag

14 years agoFix illegal (var_ref (array_ref ...)) in matrix constructors.
Kenneth Graunke [Thu, 22 Apr 2010 07:25:55 +0000 (00:25 -0700)]
Fix illegal (var_ref (array_ref ...)) in matrix constructors.

14 years agoActually emit temp declaration in vector comparison builtins.
Kenneth Graunke [Thu, 22 Apr 2010 06:58:13 +0000 (23:58 -0700)]
Actually emit temp declaration in vector comparison builtins.

14 years agoFix ir_dead_code for function refactoring.
Kenneth Graunke [Wed, 21 Apr 2010 23:02:15 +0000 (16:02 -0700)]
Fix ir_dead_code for function refactoring.

14 years agoEmit body for constructors in the right place.
Kenneth Graunke [Wed, 21 Apr 2010 22:00:29 +0000 (15:00 -0700)]
Emit body for constructors in the right place.

Previously, the body of some vector constructors were added to the wrong
function signature, and the body of matrix constructors were just being
dumped in the main instruction stream.

14 years agoRemove ir_label since it is no longer used.
Kenneth Graunke [Wed, 21 Apr 2010 22:14:02 +0000 (15:14 -0700)]
Remove ir_label since it is no longer used.

14 years agoRefactor IR function representation.
Kenneth Graunke [Wed, 21 Apr 2010 19:30:22 +0000 (12:30 -0700)]
Refactor IR function representation.

Now, ir_function is emitted as part of the IR instructions, rather than
simply existing in the symbol table.  Individual ir_function_signatures
are not emitted themselves, but only as part of ir_function.

14 years agoUse ir_function_signature::function_name() rather than direct access.
Kenneth Graunke [Wed, 21 Apr 2010 22:17:26 +0000 (15:17 -0700)]
Use ir_function_signature::function_name() rather than direct access.

14 years agoEnsure that both parameter lists are the same length in function overloading.
Kenneth Graunke [Wed, 21 Apr 2010 18:52:05 +0000 (11:52 -0700)]
Ensure that both parameter lists are the same length in function overloading.

Fixes new test function-05.glsl, where the second function has matching
parameter types, but less of them.

14 years agoAdd missing break statement
Ian Romanick [Wed, 21 Apr 2010 22:08:08 +0000 (15:08 -0700)]
Add missing break statement

14 years agoRemove dead code assignments and variable declarations.
Eric Anholt [Fri, 16 Apr 2010 23:43:47 +0000 (16:43 -0700)]
Remove dead code assignments and variable declarations.

This pass only works on assignments where the variable is never
referenced.  There is no code flow analysis, so it can't do a better
job of avoiding redundant assignments.

For now, the optimizer only does do_dead_code_unlinked(), so it won't
trim the builtin variable list or initializers outside of the scope of
functions.  This is because we don't have the visibility into other
functions that might get linked in in order to eliminate work on
global variables.

14 years agoMark some variables as having usage beyond the shader's scope.
Eric Anholt [Mon, 19 Apr 2010 18:10:37 +0000 (11:10 -0700)]
Mark some variables as having usage beyond the shader's scope.

This will be important to optimization passes.  We don't want to
dead-code eliminate writes to out varyings, or propagate uninitialized
values of uniforms.

14 years agoWhile-loops also start a new scope.
Ian Romanick [Fri, 16 Apr 2010 23:42:43 +0000 (16:42 -0700)]
While-loops also start a new scope.

14 years agoAvoid generating ir_if for &&, || short-circuiting with constant LHS.
Eric Anholt [Fri, 16 Apr 2010 20:49:04 +0000 (13:49 -0700)]
Avoid generating ir_if for &&, || short-circuiting with constant LHS.

It was breaking constant expression detection for constant
initializers, i.e. CorrectParse2.frag, CorrectParse2.vert.

14 years agoAdd support for inlining calls done inside of expressions.
Eric Anholt [Fri, 16 Apr 2010 19:53:46 +0000 (12:53 -0700)]
Add support for inlining calls done inside of expressions.

14 years agoMake && and || only evaluate the RHS when the LHS requires it.
Eric Anholt [Fri, 16 Apr 2010 08:10:32 +0000 (01:10 -0700)]
Make && and || only evaluate the RHS when the LHS requires it.

14 years agoAdd an ir_if simplification pass.
Eric Anholt [Thu, 15 Apr 2010 00:03:03 +0000 (17:03 -0700)]
Add an ir_if simplification pass.

This is relatively simple at the moment, recognizing only constant
values, and not (for example) values that are restricted to a range
that make the branching constant.  However, it does remove 59 lines
from the printout of CorrectParse2.vert.

14 years agoCheck that the return type of function definition matches its prototype.
Eric Anholt [Wed, 14 Apr 2010 23:19:19 +0000 (16:19 -0700)]
Check that the return type of function definition matches its prototype.

Doesn't fix any testcases, but fixes a FINISHME.

14 years agoCheck that function definition parameter qualifiers match proto qualifiers.
Eric Anholt [Wed, 14 Apr 2010 23:16:20 +0000 (16:16 -0700)]
Check that function definition parameter qualifiers match proto qualifiers.

Fixes function9.frag.

14 years agoReturn the rvalue of a variable decl to fix while (bool b = condition) {}
Eric Anholt [Wed, 14 Apr 2010 22:38:52 +0000 (15:38 -0700)]
Return the rvalue of a variable decl to fix while (bool b = condition) {}

14 years agoFix the type of gl_FogFragCoord.
Eric Anholt [Wed, 14 Apr 2010 22:27:39 +0000 (15:27 -0700)]
Fix the type of gl_FogFragCoord.

14 years agoAdd an implementation of gentype-only clamp().
Eric Anholt [Thu, 8 Apr 2010 22:41:19 +0000 (15:41 -0700)]
Add an implementation of gentype-only clamp().

14 years agoAdd builtin implementations of vector comparison functions.
Eric Anholt [Thu, 8 Apr 2010 22:35:34 +0000 (15:35 -0700)]
Add builtin implementations of vector comparison functions.

Fixes CorrectFunction1.vert, glsl-fs-notequal.frag.

14 years agoAdd support for builtin gentype mix(gentype a, gentype b)
Eric Anholt [Thu, 8 Apr 2010 22:10:37 +0000 (15:10 -0700)]
Add support for builtin gentype mix(gentype a, gentype b)

Fixes glsl-fs-mix.frag, glsl-fs-mix-constant.frag.

14 years agoAdd buitlin functions for any(), all(), not().
Eric Anholt [Thu, 8 Apr 2010 22:02:59 +0000 (15:02 -0700)]
Add buitlin functions for any(), all(), not().

14 years agoAdd builtin normalize() functions.
Eric Anholt [Thu, 8 Apr 2010 21:34:38 +0000 (14:34 -0700)]
Add builtin normalize() functions.

Fixes CorrectSqizzle2.vert.

14 years agoRepeat the optimization passes until we stop making progress.
Eric Anholt [Thu, 8 Apr 2010 20:42:48 +0000 (13:42 -0700)]
Repeat the optimization passes until we stop making progress.

14 years agoAdd inlining support for array dereferences.
Eric Anholt [Thu, 8 Apr 2010 20:40:52 +0000 (13:40 -0700)]
Add inlining support for array dereferences.

14 years agoInline functions consisting of a return of an expression.
Eric Anholt [Wed, 7 Apr 2010 18:46:26 +0000 (11:46 -0700)]
Inline functions consisting of a return of an expression.

14 years agoRemove extraneous base-class constructor calls
Ian Romanick [Thu, 8 Apr 2010 01:03:50 +0000 (18:03 -0700)]
Remove extraneous base-class constructor calls

14 years agoMake function bodies rely on the parameter variable declarations.
Eric Anholt [Wed, 7 Apr 2010 21:32:53 +0000 (14:32 -0700)]
Make function bodies rely on the parameter variable declarations.

Previously, generating inlined function bodies was going to be
difficult, as there was no mapping between the body's declaration of
variables where parameter values were supposed to live and the
parameter variables that a caller would use in paramater setup.
Presumably this also have been a problem for actual codegen.

14 years agoMake dot() take the right number of args.
Eric Anholt [Wed, 7 Apr 2010 22:18:37 +0000 (15:18 -0700)]
Make dot() take the right number of args.

14 years agoFix the returns of builtin functions to actually return.
Eric Anholt [Wed, 7 Apr 2010 20:34:15 +0000 (13:34 -0700)]
Fix the returns of builtin functions to actually return.

14 years agoPut function bodies under function signatures, instead of flat in the parent.
Eric Anholt [Wed, 7 Apr 2010 20:19:11 +0000 (13:19 -0700)]
Put function bodies under function signatures, instead of flat in the parent.

This will let us know the length of function bodies for the purpose of
inlining (among other uses).

14 years agoClarify the types of various exec_list in ir.h
Eric Anholt [Wed, 7 Apr 2010 19:35:34 +0000 (12:35 -0700)]
Clarify the types of various exec_list in ir.h

14 years agoTreat texture rectangles as an extension that is enabled be default
Ian Romanick [Thu, 8 Apr 2010 00:13:44 +0000 (17:13 -0700)]
Treat texture rectangles as an extension that is enabled be default

14 years agoAdd support for GL_ARB_draw_buffers extension
Ian Romanick [Wed, 7 Apr 2010 23:59:46 +0000 (16:59 -0700)]
Add support for GL_ARB_draw_buffers extension

14 years agoClean up error reporting in _mesa_glsl_process_extension
Ian Romanick [Wed, 7 Apr 2010 23:57:56 +0000 (16:57 -0700)]
Clean up error reporting in _mesa_glsl_process_extension

14 years agoAdd tracking for extension based warnings
Ian Romanick [Wed, 7 Apr 2010 23:53:54 +0000 (16:53 -0700)]
Add tracking for extension based warnings

Using '#extension foo: warn' instructs the compiler to generate a
warning when some feature of the extension 'foo' is used.  This patch
adds some infrastructure needed to support that for variables.

Similar changes will be needed for types and built-in functions.

14 years agoEmit a warning when an unknown extension is used with #extension
Ian Romanick [Wed, 7 Apr 2010 21:50:36 +0000 (14:50 -0700)]
Emit a warning when an unknown extension is used with #extension

14 years agoAdd _mesa_glsl_warning to emit warnings to the shader log
Ian Romanick [Wed, 7 Apr 2010 21:47:46 +0000 (14:47 -0700)]
Add _mesa_glsl_warning to emit warnings to the shader log

14 years agoBegin processing #extension directive
Ian Romanick [Wed, 7 Apr 2010 23:46:25 +0000 (16:46 -0700)]
Begin processing #extension directive

Nowhere near complete.  It just parses correctly at this point.

14 years agoUse _mesa_glsl_shader_target_name
Ian Romanick [Wed, 7 Apr 2010 23:41:40 +0000 (16:41 -0700)]
Use _mesa_glsl_shader_target_name

14 years agoAdd utility function to get the name of a shader target
Ian Romanick [Wed, 7 Apr 2010 23:44:30 +0000 (16:44 -0700)]
Add utility function to get the name of a shader target

14 years agoCall glsl_type::get_instance correctly: the number of rows must be at least 1
Ian Romanick [Wed, 7 Apr 2010 23:09:47 +0000 (16:09 -0700)]
Call glsl_type::get_instance correctly: the number of rows must be at least 1

This causes the following tests to pass:

    shaders/glsl-tex-mvp.vert

14 years agoEat whitespace while in the PP state
Ian Romanick [Wed, 7 Apr 2010 21:49:59 +0000 (14:49 -0700)]
Eat whitespace while in the PP state

14 years agoPartially fix comment handling in preprocessor directives.
Ian Romanick [Wed, 7 Apr 2010 20:43:52 +0000 (13:43 -0700)]
Partially fix comment handling in preprocessor directives.

Multi-line /* */ comments are still broken.  I think this will wait to
be fixed until we have a real preprocessor.

14 years agoAdd support for bool to ir_equal and ir_nequal constant handling
Ian Romanick [Wed, 7 Apr 2010 23:48:42 +0000 (16:48 -0700)]
Add support for bool to ir_equal and ir_nequal constant handling

14 years agoAdd gl_ClipDistance in fragment shader
Ian Romanick [Wed, 7 Apr 2010 23:47:44 +0000 (16:47 -0700)]
Add gl_ClipDistance in fragment shader

14 years agoGenerate correct IR for do-while loops
Ian Romanick [Tue, 6 Apr 2010 01:07:27 +0000 (18:07 -0700)]
Generate correct IR for do-while loops

Previously the same code was generated for a while loop and a do-while
loop.  This pulls the code that generates the conditional break into a
separate method.  This method is called either at the beginning or the
end depending on the loop type.

Reported-by: Kenneth Graunke <kenneth@whitecape.org>
14 years agoProcess ast_jump_statement into ir_loop_jump
Ian Romanick [Tue, 6 Apr 2010 00:13:47 +0000 (17:13 -0700)]
Process ast_jump_statement into ir_loop_jump

Specifically, handle 'break' and 'continue' inside loops.

This causes the following tests to pass:

    glslparsertest/shaders/break.frag
    glslparsertest/shaders/continue.frag

14 years agoAdd dynamic cast for ir_loop
Ian Romanick [Tue, 6 Apr 2010 00:13:14 +0000 (17:13 -0700)]
Add dynamic cast for ir_loop

14 years agoBegin tracking the nesting of loops and switch-statements
Ian Romanick [Tue, 6 Apr 2010 00:01:53 +0000 (17:01 -0700)]
Begin tracking the nesting of loops and switch-statements

14 years agoUse switch based on mode in ast_jump_statement::hir
Ian Romanick [Mon, 5 Apr 2010 23:53:19 +0000 (16:53 -0700)]
Use switch based on mode in ast_jump_statement::hir

14 years agoAdd some newlines when printing ir_loop instructions
Ian Romanick [Mon, 5 Apr 2010 23:38:20 +0000 (16:38 -0700)]
Add some newlines when printing ir_loop instructions

14 years agoProcess ast_iteration_statement into ir_loop
Ian Romanick [Mon, 5 Apr 2010 23:37:49 +0000 (16:37 -0700)]
Process ast_iteration_statement into ir_loop

This causes the following tests to pass:
     glslparsertest/shaders/dowhile.frag
     glslparsertest/shaders/while.frag
     glslparsertest/shaders/while1.frag
     glslparsertest/shaders/while2.frag

14 years agoAdd ir_loop_jump to represent 'break' and 'continue' in loops
Ian Romanick [Mon, 5 Apr 2010 23:28:15 +0000 (16:28 -0700)]
Add ir_loop_jump to represent 'break' and 'continue' in loops

14 years agoAdd ir_loop to represent loops
Ian Romanick [Mon, 5 Apr 2010 23:16:07 +0000 (16:16 -0700)]
Add ir_loop to represent loops

This touches a lot of files because everything derived from ir_visitor
has to be updated.  This is the primary disadvantage of the visitor pattern.

14 years agoAdd some linebreaks in the ir_print_visitor of if statement bodies.
Eric Anholt [Tue, 6 Apr 2010 19:13:02 +0000 (12:13 -0700)]
Add some linebreaks in the ir_print_visitor of if statement bodies.

14 years agoMake constant folding descend into if statements.
Eric Anholt [Tue, 6 Apr 2010 18:52:09 +0000 (11:52 -0700)]
Make constant folding descend into if statements.

14 years agoDescend down the tree in more locations in constant folding.
Eric Anholt [Tue, 6 Apr 2010 18:42:01 +0000 (11:42 -0700)]
Descend down the tree in more locations in constant folding.

14 years agoPerform constant folding on array indices.
Eric Anholt [Tue, 6 Apr 2010 18:11:05 +0000 (11:11 -0700)]
Perform constant folding on array indices.

Replaces a constant var deref with a constant value in CorrectParse1.frag.

14 years agoAdd float/int conversion to ir_constant_expression.cpp.
Eric Anholt [Tue, 6 Apr 2010 17:53:57 +0000 (10:53 -0700)]
Add float/int conversion to ir_constant_expression.cpp.

Gives CorrectParse2.frag one more constant folding.

14 years agoHandle constant expressions using derefs of const values.
Eric Anholt [Tue, 6 Apr 2010 17:30:54 +0000 (10:30 -0700)]
Handle constant expressions using derefs of const values.

Fixes CorrectParse1.frag and makes for a ton of folding in
CorrectParse2.frag.

14 years agoFold constant expressions in if conditionals.
Eric Anholt [Tue, 6 Apr 2010 17:07:20 +0000 (10:07 -0700)]
Fold constant expressions in if conditionals.

Fixes up 3 more expressions in CorrectParse2.frag.

14 years agoAdd support for =, != to ir_constant_expresion.cpp
Eric Anholt [Tue, 6 Apr 2010 17:02:27 +0000 (10:02 -0700)]
Add support for =, != to ir_constant_expresion.cpp

This results in constant folding of one more expression in CorrectParse2.frag.

14 years agoAdd ir_constant_expression.cpp support for <, >, <=, >=.
Eric Anholt [Tue, 6 Apr 2010 16:55:45 +0000 (09:55 -0700)]
Add ir_constant_expression.cpp support for <, >, <=, >=.

This results in folding one more constant expression in CorrectParse2.frag.

14 years agoAdd a constant folding optimization pass.
Eric Anholt [Mon, 5 Apr 2010 22:24:28 +0000 (15:24 -0700)]
Add a constant folding optimization pass.

14 years agoAdd definition of gl_ClipDistance[]
Eric Anholt [Sat, 3 Apr 2010 06:47:06 +0000 (23:47 -0700)]
Add definition of gl_ClipDistance[]

14 years agoSet lower bound on size implied by whole-array assignment
Ian Romanick [Mon, 5 Apr 2010 21:35:47 +0000 (14:35 -0700)]
Set lower bound on size implied by whole-array assignment

When an unsized array is accessed with a constant extension index this
sets a lower bound on the allowable sizes.  When the unsized array
gets a size set due to a whole-array assignment, this size must be at
least as large as the implied lower bound.

This causes the following tests to pass:

    glslparsertest/glsl2/array-16.vert

14 years agoAllow dereference of vectors and matrices with []
Ian Romanick [Mon, 5 Apr 2010 20:16:00 +0000 (13:16 -0700)]
Allow dereference of vectors and matrices with []

This causes the following tests to pass:
     glslparsertest/glsl2/matrix-11.vert
     glslparsertest/glsl2/matrix-12.vert
     glslparsertest/shaders/CorrectParse2.vert
     glslparsertest/shaders/CorrectSwizzle2.frag

14 years agoSet correct type for ir_dereference of a matrix or a vector
Ian Romanick [Mon, 5 Apr 2010 17:30:15 +0000 (10:30 -0700)]
Set correct type for ir_dereference of a matrix or a vector

14 years agoPropagate sizes when assigning a whole array to an unsized array
Ian Romanick [Sat, 3 Apr 2010 00:44:39 +0000 (17:44 -0700)]
Propagate sizes when assigning a whole array to an unsized array

14 years agoTrack whether whole-arrays are assignable
Ian Romanick [Sat, 3 Apr 2010 00:17:47 +0000 (17:17 -0700)]
Track whether whole-arrays are assignable

In GLSL 1.10 this was not allowed, but in GLSL 1.20 and later it is.

This causes the following tests to pass:

    glslparsertest/glsl2/array-09.vert
    glslparsertest/glsl2/array-13.vert

14 years agoWhole structures are assignable
Ian Romanick [Sat, 3 Apr 2010 00:05:59 +0000 (17:05 -0700)]
Whole structures are assignable

Whole arrays are assignable in GLSL 1.20 and later, but it's not clear
how to handle that within the IR because the IR is supposed to be
shading language version agnostic.

14 years agoUse glsl_type::element_type to get the type of array elements
Ian Romanick [Fri, 2 Apr 2010 23:08:44 +0000 (16:08 -0700)]
Use glsl_type::element_type to get the type of array elements

14 years agoEnsure that 'in' and 'inout' formal parameters are valid lvalues
Ian Romanick [Fri, 2 Apr 2010 22:51:02 +0000 (15:51 -0700)]
Ensure that 'in' and 'inout' formal parameters are valid lvalues

This causes the following tests to pass:

    glslparsertest/shaders/function10.frag

14 years agoAdditional void parameter checks
Ian Romanick [Fri, 2 Apr 2010 22:30:45 +0000 (15:30 -0700)]
Additional void parameter checks

If there is a void parameter it must not have a name, and it must be
the only parameter.

14 years agoRequire that function formal parameters have names
Ian Romanick [Fri, 2 Apr 2010 22:09:33 +0000 (15:09 -0700)]
Require that function formal parameters have names

14 years agoMake built-in gl_TexCoord available in vertex and fragment shaders
Ian Romanick [Fri, 2 Apr 2010 18:59:57 +0000 (11:59 -0700)]
Make built-in gl_TexCoord available in vertex and fragment shaders

14 years agoFix matching of integer function parameters
Ian Romanick [Fri, 2 Apr 2010 18:45:06 +0000 (11:45 -0700)]
Fix matching of integer function parameters

This causes the following tests to pass:

    glslparsertest/shaders/function10.frag

14 years agoAdd bool/int conversion as IR operations.
Eric Anholt [Fri, 2 Apr 2010 12:17:08 +0000 (02:17 -1000)]
Add bool/int conversion as IR operations.

Fixes constructor-09.glsl and CorrectParse2.frag.

14 years agoAdd conversion of bool to float as an IR operation to match int to float.
Eric Anholt [Fri, 2 Apr 2010 12:13:43 +0000 (02:13 -1000)]
Add conversion of bool to float as an IR operation to match int to float.

14 years agoAdd PASS / FAIL annotations to tests missing them.
Eric Anholt [Fri, 2 Apr 2010 11:59:50 +0000 (01:59 -1000)]
Add PASS / FAIL annotations to tests missing them.

This tricked my import of the tests into piglit.

14 years agoTest that invalid quailfiers aren't used on variables in GLSL 1.10.
Eric Anholt [Fri, 2 Apr 2010 11:53:57 +0000 (01:53 -1000)]
Test that invalid quailfiers aren't used on variables in GLSL 1.10.

14 years agoAllow array dereferences to be considered as lvalues.
Eric Anholt [Fri, 2 Apr 2010 06:27:35 +0000 (20:27 -1000)]
Allow array dereferences to be considered as lvalues.

Fixes glsl-vs-arrays.vert and glsl-vs-mov-after-deref.vert.
Regresses parser3.frag which was failing for the wrong reason.

14 years agoTest for the type being different in parameter_lists_match.
Eric Anholt [Fri, 2 Apr 2010 05:00:29 +0000 (19:00 -1000)]
Test for the type being different in parameter_lists_match.

Fixes CorrectFuncOverload.frag.

14 years agoAdd some more operations to ir_constant_expression.cpp.
Eric Anholt [Fri, 2 Apr 2010 04:35:42 +0000 (18:35 -1000)]
Add some more operations to ir_constant_expression.cpp.

14 years agoMake ir_constant_expression.cpp support multi-component types.
Eric Anholt [Fri, 2 Apr 2010 04:25:11 +0000 (18:25 -1000)]
Make ir_constant_expression.cpp support multi-component types.

14 years agoSimplify ir_constant_expression.cpp by factoring operand computation out.
Eric Anholt [Fri, 2 Apr 2010 04:07:08 +0000 (18:07 -1000)]
Simplify ir_constant_expression.cpp by factoring operand computation out.

14 years agoReject non-float varyings.
Eric Anholt [Thu, 1 Apr 2010 07:21:20 +0000 (21:21 -1000)]
Reject non-float varyings.

Fixes varying2.frag.

14 years agoRemove fake ir_binop_logic_not. I think you meant ir_unop_logic_not.
Eric Anholt [Thu, 1 Apr 2010 07:12:12 +0000 (21:12 -1000)]
Remove fake ir_binop_logic_not.  I think you meant ir_unop_logic_not.

14 years agoHandle logic not in constant expression evaluation.
Eric Anholt [Thu, 1 Apr 2010 07:09:02 +0000 (21:09 -1000)]
Handle logic not in constant expression evaluation.

14 years agoFix error handling of logic operators.
Eric Anholt [Thu, 1 Apr 2010 03:05:32 +0000 (17:05 -1000)]
Fix error handling of logic operators.

They were always throwing a type error because type wasn't being set.

14 years agoEmit errors for unfinished ast_to_hir expression operations.
Eric Anholt [Thu, 1 Apr 2010 02:53:47 +0000 (16:53 -1000)]
Emit errors for unfinished ast_to_hir expression operations.

14 years agoFix ast_logic_not handling to be unary, not binary.
Eric Anholt [Thu, 1 Apr 2010 02:50:55 +0000 (16:50 -1000)]
Fix ast_logic_not handling to be unary, not binary.

14 years agoAdd errors for type results of other expressions.
Eric Anholt [Thu, 1 Apr 2010 02:45:20 +0000 (16:45 -1000)]
Add errors for type results of other expressions.

14 years agoEmit errors from failure in arithmetic_result_type.
Eric Anholt [Thu, 1 Apr 2010 02:38:11 +0000 (16:38 -1000)]
Emit errors from failure in arithmetic_result_type.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
14 years agoStart trying to fill in a few bits of ir_constant_expression.cpp
Eric Anholt [Thu, 1 Apr 2010 02:25:12 +0000 (16:25 -1000)]
Start trying to fill in a few bits of ir_constant_expression.cpp

This makes a little progress on CorrectParse2.frag.

14 years agoCompute the constant value of a constant initializer.
Eric Anholt [Thu, 1 Apr 2010 01:53:26 +0000 (15:53 -1000)]
Compute the constant value of a constant initializer.

Fixes constFunc.frag.