summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_emit.c
AgeCommit message (Collapse)Author
2008-07-01mesa: make _slang_swizzle_swizzle() non-privateBrian Paul
2008-06-12glsl: implement variable array indexesZack Rusin
2008-05-14Updated GLSL uniform/sampler handling from gallium-0.1 branchBrian Paul
Previously, the shader linker combined the uniforms used by the vertex and fragment shaders into a combined set of uniforms. This made the implementation of glUniform*() simple, but was rather inefficient otherwise. Now each shader gets its own set of uniforms (no more modelview matrix showing up in the fragment shader uniforms, for example). cherry-picked by hand from gallium-0.1 branch
2008-05-14fix some additional program refcounting bugsBrian Paul
2008-03-14init tmpNode to zerosBrian
2008-03-14mesa: fix emit_clamp() so that we don't use an output register as temporaryBrian
IR_CLAMP is decomposed into OPCODE_MIN+OPCODE_MAX. Allocate a temporary register for the intermediate value so we don't inadvertantly use an output register (which are write-only on some GPUs).
2007-11-27set fp->UsesKill when emitting OPCODE_KILBrian
2007-11-23Fix parsing of gl_FrontLightModelProduct.sceneColor, don't segfault on ↵Brian
variable array indexes.
2007-10-02fix comment: s/branch/kill/Brian
2007-07-26Fix function call bug 11731. Also, fix up IR_CALL/IR_FUNC confusion.Brian
2007-07-04Be more consistant with paths in #includes. Eventually, eliminate a bunch ↵Brian
of -I flags.
2007-04-21Remove all the USE_MEMPOOL debug code.Brian
2007-04-21Use new memory pool allocator. Lots of debug code still in place...Brian
2007-04-21free subroutine array (fix mem leak)Brian
2007-04-16Fix some assertions that could occur when an error was earlier logged.Brian
2007-04-09undo a debug/test changeBrian
2007-03-31always emit BGN/ENDSUB, for now anywayBrian
2007-03-28cond code fixBrian
2007-03-28fix cond code swizzle bugBrian
2007-03-28optimization for the emit_not() functionBrian
2007-03-28remove IR_BREAK_IF_FALSEBrian
2007-03-28Get rid of IR_CONT_IF_FALSEBrian
2007-03-28Don't emit OPCODE_CONT0/1, BRK0/1 instructions, clean-ups elsewhere.Brian
2007-03-28added some null ptr checks to handle error recoveryBrian
2007-03-28Use constant_to_src_reg() to simplify some codeBrian
2007-03-28Fix, clean-up code related to comparisons, condition codes, etc.Brian
2007-03-27Implement true CAL/RET subroutines. Some optimizations, clean-ups coming...Brian
2007-03-26Checkpoint: implementing true CAL/RET instructions for subroutine calls.Brian
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.
2007-03-26Get rid of IR_JUMP and related code.Brian
2007-03-26Get rid of SLANG_OPER_GOTO, start rewrite of 'return' handling.Brian
2007-03-26remove debug abort() callsBrian
2007-03-26Additional error checking for 'return' statements.Brian
2007-03-26undo some debugging hacksBrian
2007-03-26Fix a few issues with computing storage sizes with respect to swizzles.Brian
2007-03-26remove incorrect assertionsBrian
2007-03-24move some code into new slang_ir.c fileBrian
2007-03-23Fix issues related to the 'continue' statement.Brian
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.
2007-03-23Add the ability to generate programs that doesn't use condition codes.Brian
ctx->Shader.EmitCondCodes determines if we use condition codes. If not, IF statement uses first operand's X component as the condition. Added OPCODE_BRK0, OPCODE_BRK1, OPCODE_CONT0, OPCODE_CONT1 to handle the common cases of conditional break/continue.
2007-03-23updated commentBrian
2007-03-22Overhaul emit_compare() function.Brian
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.
2007-03-22First pass at implementing structure compares.Brian
Need to improve this. There may be holes in a structure so we can't just blindly compare the full 4-float registers.
2007-03-21Support for user-defined structures.Brian
struct == and != operators not finished yet. Struct assignment works though.
2007-03-14remove old assertionBrian
2007-03-13disable some debug outputBrian
2007-03-13Shuffle some code around in the emit_tex() and emit_move() instructions.Brian
Note that the inst ptr returned by new_instruction() may become invalid after calling emit_() since the emit functions may allocate new instructions which is done vial realloc(). Also, add some new assertions to try to catch this kind of bug.
2007-03-10add NULL ptr check in emit_cond()Brian
2007-03-08Added IR_SLE and IR_SLT for <= and < operations.Brian
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.
2007-03-08fix tmp storage problem for IR_I_TO_FBrian
2007-03-08fix assertionBrian
2007-03-08IR_CJUMP0/1 no longer used/neededBrian