summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_codegen.c
AgeCommit message (Collapse)Author
2007-02-26Overhaul of error handling.Brian
2007-02-23comments, clean-upBrian
2007-02-23Replace slang_ir_node::Target w/ Field. Remove Comment field. Clean-up.Brian
2007-02-23remove old _slang_gen_if()Brian
2007-02-23Re-implement branching with slang_labels.Brian
This eliminates the NOP instructions that had been used as placeholders for branch targets. Also, fix "return" statement bug.
2007-02-22emit high-level IF/ELSE/ENDIF for vertex progs nowBrian
2007-02-22remove unneeded #includes, misc clean-upBrian
2007-02-22get rid of some unused slang_variable fieldsBrian
2007-02-22Replace slang_allocate_storage() with simpler _slang_attach_storage()Brian
2007-02-21disable debugBrian
2007-02-21checkpoint overhaul of pre-defined uniform codeBrian
2007-02-20alloc IR_FIELD's Storage in codegen, like IR_ELEMENTBrian
2007-02-20work on struct/array handlingBrian
2007-02-20implement support for pre-defined uniform structs (state vars)Brian
2007-02-16change all enum tokens to uppercaseBrian
2007-02-16added a commentBrian
2007-02-09re-enable free'ing of IR treesBrian
2007-02-08Check for constant-valued while/do loop conditions.Brian
Allows us to: 1. avoid generating constant-valued BRK test for while(1).. 2. discard entire loop for while(0). 3. detection infinite loops at compile-time.
2007-02-08optimize conditional breaks/continuesBrian
2007-02-08remove some cruftBrian
2007-02-08fix broken BRA for return stmtsBrian
2007-02-08Use conditional break in for/do/while loops.Brian
2007-02-07remove old loop break/cont stuffBrian
2007-02-07Remove old functions for generating BRA-based looping.Brian
2007-02-07Use IR_LOOP to represent do-while and for-loops.Brian
Also, start moving high vs. low-level instruction selection into slang_emit.c
2007-02-06Implement CONT, improve BRK.Brian
IR_LOOP's BranchNode ptr is the head of a linked list of CONT and BRK nodes. After emitting loop, walk over the linked list, filling in the CONT/BRK instruction's BranchTarget field (location of the ENDLOOP instruction, or one past).
2007-02-06replace IR_BEGIN_LOOP/IR_END_LOOP with IR_LOOPBrian
2007-02-06new_node[0123]() functionsBrian
2007-02-06redo IR_IF node, removing IR_ELSE, IR_ENDIFBrian
2007-02-05BRK instruction's BranchTarget field now used for efficiently breaking out ↵Brian
of loops. BRK's BranchTarget field actually points to the top of the loop, not the bottom, since we don't know the later's location yet. In the interpreter, basically do an indirect jump to update the PC.
2007-02-05Use IR node's BranchNode field for IF/ELSE/ENDIF instructions.Brian
This allows us to back-patch the IF/ELSE instruction's BranchTarget field to point to the location of the ELSE/ENDIF instructions. No longer have to search for ELSE/ENDIF in the interpreter. Also makes it trivial to translate IF/ELSE instructions into conditional/unconditional BRA instructions.
2007-02-05set UseHighLevelInstructions = false for nowBrian
2007-02-05Initial implementation of high-level flow-control instructions.Brian
IF/ELSE/ENDIF and BEGIN_LOOP/END_LOOP/BREAK instructions seem to work. Disabled by default though until better tested. Implemented IR_NOT, but needs optimization.
2007-02-05Initial support of loop and subroutine instructions.Brian
New high-level flow-control instructions, both at IR level and GPU instructions for looping and subroutines.
2007-02-03Add literal_size field to slang_operation.Brian
Used to track the number of components in a float/int/bool literal. Helps with some typechecking things. Fixes problems with calls such as "distance(v2, vec2(1.0, 2.0))"
2007-02-02add vec4_texcube to AsmInfo[]Brian
2007-02-02move _slang_locate_function()Brian
2007-02-02s/slang_assembly_typeinfo/slang_typeinfo/Brian
2007-02-02s/slang_assembly_name_space/slang_name_space/Brian
2007-02-02rename slang_assemble_typeinfo.[ch] to slang_typeinfo.[ch]Brian
2007-02-02remove more slang assembly-related codeBrian
2007-02-02move some functions, disable some code in preparation for removing assembly codeBrian
2007-02-02Move guts of slang_lookup_constant() into a new function in slang_simplify.cBrian
2007-02-02replace abort() with _mesa_problem()Brian
2007-02-02try to simplify variable initializersBrian
2007-02-01Fix logic in _slang_simplify(): vec2() constructor case wasn't getting used.Brian
2007-01-31Overhaul handling of writemasks/swizzling. This fixes two problem cases:Brian
vec2 v; v.x = v.y = 1.0; // chained assignment vec4 v; v.zx = vec2(a,b); // swizzled writemask
2007-01-31New asm instruction and IR_CLAMP node type to allow clamping to [0,1] with ↵Brian
instruction saturate-write option. Not finished yet.
2007-01-28noise functionsBrian
2007-01-28implement mix() with LRP instructionBrian