summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ir_to_mesa: Add (almost) the rest of the builtin varyings.Eric Anholt2010-06-242-8/+58
|
* ir_to_mesa: Support gl_Position output.Eric Anholt2010-06-241-0/+3
|
* ir_to_mesa: Support gl_FragData[] output.Eric Anholt2010-06-241-2/+2
|
* ir_to_mesa: Support gl_FragData[] output.Eric Anholt2010-06-241-6/+12
|
* ir_to_mesa: Start doing some int support.Eric Anholt2010-06-241-1/+8
|
* ir_to_mesa: Fix bugs in swizzle handling for scalar operations.Eric Anholt2010-06-241-6/+7
| | | | | Looking at a vec2 / float codegen, the writemasks on the RCPs were wrong and the swizzle on the multiply by the RCP results was wrong.
* ir_to_mesa: Fix copy'n'paste bug where divide multiplied left by 1/left.Eric Anholt2010-06-241-1/+1
| | | | Multiply left by 1/right, please.
* ir_to_mesa: Emit more reduced writemasks for ops on small types.Eric Anholt2010-06-242-4/+14
| | | | | This should help prevent Mesa from having to be smart to give channel-wise drivers better information.
* ir_to_mesa: Handle swizzles on LHS of assignment (writemasks).Eric Anholt2010-06-243-31/+68
|
* ir_to_mesa: Produce multiple scalar ops when required to produce vec4s.Eric Anholt2010-06-243-9/+59
| | | | Fixes the code emitted in a test shader for vec2 texcoord / vec2 tex_size.
* ir_to_mesa: Get temps allocated at the right times.Eric Anholt2010-06-242-31/+20
| | | | | | | | | | | The alloced_vec4/vec4 distinction was an experiment to expose the cost of temps to the codegen. But the problem is that the temporary production rule gets called after the emit rule that was using the temp. We could have the args to emit_op be pointers to where the temp would get allocated later, but that seems overly hard while just trying to bring this thing up. Besides, the temps used in expressions bear only the vaguest relation to how many temps will be used after register allocation.
* ir_to_mesa: Make the first temp index we use 1 to show off bugs.Eric Anholt2010-06-242-6/+8
| | | | Regs aren't allocated at the right times yet, so we see TEMP[0] a lot.
* ir_to_mesa: Fix up the assign rule to use left and right correctly.Eric Anholt2010-06-241-2/+2
| | | | The destination of assign is in left, not in the node itself.
* ir_to_mesa: Do my best to explain how the codegen rules work.Eric Anholt2010-06-241-0/+52
|
* ir_to_mesa: Print out the ir along with the Mesa IR.Eric Anholt2010-06-243-14/+40
| | | | | | | | Ideally this would be hooked up by ir_print_visitor dumping into a string that we could include as prog_instruction->Comment when in debug mode, and not try keeping ir_instruction trees around after conversion to Mesa. The ir_print_visitor isn't set up to do that for us today.
* ir_to_mesa: Fix up src reg swizzling.Eric Anholt2010-06-241-3/+4
|
* ir_to_mesa: Remove dead code from when this was an ARB_fp printer.Eric Anholt2010-06-242-26/+0
|
* ir_to_mesa: Fill in more bits of dest resg.Eric Anholt2010-06-241-0/+2
|
* ir_to_mesa: Print out the resulting program.Eric Anholt2010-06-247-3/+1582
|
* Add missing dist file.Eric Anholt2010-06-241-1/+2
|
* Ignore the generated codegen files for now.Eric Anholt2010-06-241-0/+2
| | | | Later we'll throw them in revision control.
* ir_to_mesa: Start building GLSL IR to Mesa IR conversion.Eric Anholt2010-06-247-2/+1375
| | | | | | | There are major missing pieces here. Most operations aren't supported. Matrices need to be broken down to vector ops before we get here. Scalar operations (RSQ, RCP) are handled incorrectly. Arrays and structures are not even considered.
* Make inlined function variables auto, not in/out.Eric Anholt2010-06-241-2/+3
|
* Attach a pointer to variable names in LIR dumping.Eric Anholt2010-06-241-2/+3
| | | | | Since variable names are not unique, and we like to make lots of __retvals and assignment_tmps and a,b,c,d this helps in debugging.
* Quiet unused arg warning for ir_constant cloning.Eric Anholt2010-06-241-0/+2
|
* Move ir_constant cloning alongside the other cloning functions.Eric Anholt2010-06-242-31/+31
|
* Don't forget to add the declaration of our temporary variable for assigns.Eric Anholt2010-06-241-0/+1
| | | | | Otherwise, dead code elimination gets confused since it relies on seeing decls.
* ir_function_inlining: Re-add the "s/return/retval =/" functionality.Eric Anholt2010-06-243-2/+41
| | | | | I ripped it out with the cloning changes yesterday, and should have tested and noticed that there were now returns all over.
* Fix variable remapping in function cloning.Eric Anholt2010-06-241-1/+1
| | | | It's (ht, data, key) not (ht, key, data).
* ast_node: Remove empty destructor.Carl Worth2010-06-232-8/+0
| | | | This wasn't serving any purpose. So delete it.
* preprocessor: Initialize a potentially uninitialized variable.Carl Worth2010-06-231-1/+1
| | | | | | | | | | | My current reading of the relevant static functions suggests that last is never used without being uninitialized, (we only use it if the expansion function returned non-NULL and the expansion functions always set it before returning non-NULL). Apparently gcc isn't coming to the same conclusion. Initializing this to NULL nicely quites gcc and will guarantee a nice, early segfault if my anaylsis turns out to be wrong.
* preprocessor: Remove dead code _token_list_lengthCarl Worth2010-06-231-18/+0
| | | | As gcc noticed, this function is not currently being used. Good-bye.
* preprocessor: Remove dead code _string_list_append_listCarl Worth2010-06-231-15/+0
| | | | As gcc noticed, this function is not currently being used. Good-bye.
* configure: Ensure that config.h can be safely included multiple times.Carl Worth2010-06-231-0/+4
| | | | | Use AH_TOP and AH_BOTTOM macros so that the standard include guard mechanisms are emitted by autoheader into the generated config.h file.
* configure: Remove some dead code.Carl Worth2010-06-231-7/+0
| | | | | | | | This block of code is useless because a (nearly-equivalent) assignment is made immediately after. The only difference is the omission of -Wunreadchable-code in the assignment being used. Presumably, that was intended to be -Wunreachable-code (without the first 'd'), but since this hasn't been being used we just drop it.
* Fix typos of "variable" as "varaible"Carl Worth2010-06-232-2/+2
| | | | | One of these was just in a comment. But ther other was in an enum tag, (which is apparently not being used anywhere yet).
* ir_variable: Add some missing initialization to the constructor.Carl Worth2010-06-231-1/+3
| | | | Thanks to valgrind for noticing this problem.
* Fix double usage of the post-inc/dec's temporary pre-inc/dec copy.Eric Anholt2010-06-231-5/+4
| | | | Fixes CorrectSwizzle3.frag.
* Avoid using the RHS of an assignment twice.Eric Anholt2010-06-231-3/+19
| | | | | This would fix double-evaluation of assignment RHS expressions, including possible side effects.
* get_lvalue_copy doesn't need all the checking of do_assignment().Eric Anholt2010-06-231-6/+3
|
* ast_to_hir: Clone LHS derefs of assignment expressions.Eric Anholt2010-06-231-5/+10
|
* ir_function_inlining: Allow inlining of loops and conditionals.Eric Anholt2010-06-231-25/+1
| | | | The new cloning code handles them.
* Add a virtual clone() method to ir_instruction.Eric Anholt2010-06-2310-328/+305
| | | | | This will be used by function inlining, the linker, and avoiding double usage of the LHS deref chains in ++, *=, and similar operations.
* Avoid using the same ir_constant 0.0 multiple times in mat constructors.Eric Anholt2010-06-231-2/+1
|
* glcpp: Support line continuations within preprocessor directives.Kenneth Graunke2010-06-231-0/+79
| | | | Fixes CorrectPreprocess5.frag.
* glcpp: Make standalone binary use preprocess().Kenneth Graunke2010-06-232-9/+56
| | | | | | | | This prevents the two code paths from getting out of sync. Also, future work will need the shader source as a string anyway. Unfortunately, this copies and pastes load_text_file from main.cpp, with small changes (support for reading from stdin, talloc).
* glcpp: Fix "dangerous trailing context" warning.Kenneth Graunke2010-06-231-1/+1
| | | | | Flex couldn't be sure whether "def" and "ndef" were part of the #ifdef and #ifndef patterns or the trailing context of the #if pattern.
* Remove comment support from the main lexer.Kenneth Graunke2010-06-231-10/+1
| | | | Now handled by the preprocessor.
* glcpp: Recognize plain "//" as a comment.Kenneth Graunke2010-06-231-1/+1
| | | | | Found in glsl-orangebook-ch06-bump.(frag|vert). This was resulting in the comments getting passed through to the main compiler's lexer.
* Generate errors for empty constructors instead of assertingIan Romanick2010-06-231-1/+8
| | | | | | This causes the following tests to pass: glslparsertest/glsl2/constructor-10.vert