summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_ir.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: move shader/slang/* sources to main/slang/*Brian Paul2010-06-101-280/+0
| | | | Reduce the source tree depth a bit.
* glsl: add support for CMP instructionBrian Paul2009-09-291-0/+1
|
* glsl: when debug pragma is on, emit comments about function calls/inlinesBrian Paul2009-03-191-0/+1
| | | | BTW, the debug pragma syntax is "#pragma debug(on)"
* mesa: gl_register_file enum typedefBrian Paul2009-03-071-7/+7
|
* glsl: use new IR opcodes for TEX instructions with shadow comparisonBrian Paul2009-02-201-0/+4
| | | | | | Such TEX instructions will have the TexShadow flag set. The gl_program::ShadowSamplers field is now set in the linker. We missed that before.
* glsl: simplify IR storage for samplersBrian Paul2009-01-141-4/+9
| | | | Don't overload the Size field with the texture target, to avoid confusion.
* mesa: rework GLSL array code generationBrian Paul2008-11-191-6/+51
| | | | | | | | | | | | | | We now express arrays in terms of indirect addressing. For example: dst = a[i]; becomes: MOV dst, TEMP[1 + TEMP[2].y]; At instruction-emit time indirect addressing is converted into ARL/ ADDR-relative form: ARL ADDR.x, TEMP[2].y; MOV dst, TEMP[1 + ADDR.x]; This fixes a number of array-related issues. Arrays of arrays and complex array/struct nesting works now. There may be some regressions, but more work is coming.
* mesa: no longer need Writemask field in GLSL IR nodesBrian Paul2008-11-131-1/+0
| | | | The Swizzle and Size fields carry all the info we need now.
* mesa: add GLSL support for DP2, NRM3, NRM4 instructions (not actually ↵Brian Paul2008-11-071-0/+3
| | | | emitted yet though)
* mesa: import latest GLSL code from gallium-0.1 branchBrian Paul2008-08-161-6/+6
|
* mesa: rework array/struct addressing code.Brian Paul2008-07-291-1/+19
| | | | | | | The slang_ir_storage type now has a pointer to parent storage to represent storage of an array element within an array, or a field within a struct. This fixes some problems related to addressing of fields/elements in non- trivial cases. More work to follow.
* glsl: implement variable array indexesZack Rusin2008-06-121-0/+1
|
* Fix function call bug 11731. Also, fix up IR_CALL/IR_FUNC confusion.Brian2007-07-261-2/+0
|
* remove IR_BREAK_IF_FALSEBrian2007-03-281-1/+0
|
* Get rid of IR_CONT_IF_FALSEBrian2007-03-281-1/+0
|
* Checkpoint: implementing true CAL/RET instructions for subroutine calls.Brian2007-03-261-0/+2
| | | | | | Also, found/fixed a code generation regression: the emit_swizzle() function was always returning NULL. This caused emit_move() to miss its chance at peephole optimization.
* Get rid of IR_JUMP and related code.Brian2007-03-261-1/+1
|
* Properly free the slang_ir_node->Store data (use ref counting).Brian2007-03-241-0/+1
|
* move some code into new slang_ir.c fileBrian2007-03-241-0/+26
|
* Fix issues related to the 'continue' statement.Brian2007-03-231-1/+10
| | | | | | | | IR_LOOP now has two children: the body code, and the tail code. Tail code is the "i++" part of a for-loop, or the expression at the end of a "do {} while(expr);" loop. "continue" translates into: "execute tail code; CONT;" Also, the test for infinite do/while loops was incorrect.
* Overhaul emit_compare() function.Brian2007-03-221-7/+12
| | | | | | | | Previously, comparing vec2, vec3, vec4 was broken. Added IR_EQUAL, IR_NOTEQUAL nodes/operators to compute boolean equality/inequality vs. IR_SEQUAL/IR_SNEQUAL which work component-wise. Use IR_EQUAL/IR_NOTEQUAL for the == and != operators. To compute vec4 equality, use SNE, DP4, SEQ instruction sequence.
* Support for user-defined structures.Brian2007-03-211-0/+1
| | | | struct == and != operators not finished yet. Struct assignment works though.
* Added IR_SLE and IR_SLT for <= and < operations.Brian2007-03-081-0/+2
| | | | | | Using IR_SGE and IR_SGT with transposed args doesn't work since the __asm calls don't do argument matching by name, but by position. This fixes the broken lessThan() and lessThanEqual() functions.
* IR_CJUMP0/1 no longer used/neededBrian2007-03-081-2/+0
|
* Replace slang_ir_node::Target w/ Field. Remove Comment field. Clean-up.Brian2007-02-231-4/+5
|
* Re-implement branching with slang_labels.Brian2007-02-231-1/+3
| | | | | | This eliminates the NOP instructions that had been used as placeholders for branch targets. Also, fix "return" statement bug.
* Use IR_LOOP to represent do-while and for-loops.Brian2007-02-071-1/+6
| | | | Also, start moving high vs. low-level instruction selection into slang_emit.c
* replace IR_BEGIN_LOOP/IR_END_LOOP with IR_LOOPBrian2007-02-061-2/+1
|
* redo IR_IF node, removing IR_ELSE, IR_ENDIFBrian2007-02-061-3/+1
|
* Initial implementation of high-level flow-control instructions.Brian2007-02-051-0/+2
| | | | | | 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.
* Initial support of loop and subroutine instructions.Brian2007-02-051-3/+20
| | | | | New high-level flow-control instructions, both at IR level and GPU instructions for looping and subroutines.
* Overhaul handling of writemasks/swizzling. This fixes two problem cases:Brian2007-01-311-3/+3
| | | | | vec2 v; v.x = v.y = 1.0; // chained assignment vec4 v; v.zx = vec2(a,b); // swizzled writemask
* New asm instruction and IR_CLAMP node type to allow clamping to [0,1] with ↵Brian2007-01-311-0/+1
| | | | instruction saturate-write option. Not finished yet.
* noise functionsBrian2007-01-281-0/+4
|
* implement mix() with LRP instructionBrian2007-01-281-1/+3
|
* Clean-up of var/temp allocation function parameters.Brian2007-01-271-2/+4
|
* Initial implementation of OPCODE_IF/ELSE/ENDIF instructions.Brian2007-01-201-0/+3
|
* Implement do/while loops. Replace IR_CJUMP with IR_CJUMP0 and IR_CJUMP1 soBrian2007-01-191-1/+2
| | | | we can either jump on zero, or non-zero predicate.
* Implement fragment discard/kill.Brian2007-01-191-1/+2
|
* Reimplement code for swizzling so that expressions like (p+q).x for vectors ↵Brian2007-01-181-2/+3
| | | | p and q works correctly.
* added IR_F_TO_I, update commentsBrian2007-01-171-3/+4
|
* Redo the way array indexes are handled. Resolve storage location at code ↵Brian2007-01-151-0/+1
| | | | emit time, not codegen time.
* Rework code related to temp register allocation, both for user variablesBrian2007-01-131-0/+1
| | | | | | and expression temporarires. Much better register utilization now. Lots of other fixes. The OpenGL GLSL "orange book" brick shader demo works now.
* Implement shadow samplers and dFdx(), dFdy() code generation.Brian2007-01-091-0/+2
|
* Implement projective texture sampling, 3D textures. Disable some debug output.Brian2007-01-081-0/+1
|
* Checkpoint glsl compiler work: sampler uniforms now implemented, linked ↵Brian2007-01-051-1/+0
| | | | properly.
* initial code to get texture sampling limping alongBrian2007-01-041-2/+5
|
* fix typosBrian2006-12-221-2/+2
|
* added IR_NEG for negationBrian2006-12-211-1/+2
|
* New IR_COND node for evaluating conditional expressions (for if/while/for).Brian2006-12-201-18/+19
|