summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi
Commit message (Collapse)AuthorAgeFilesLines
* tgsi/ureg: Allow for multiple extended instruction tokens.Michal Krol2009-11-042-75/+94
| | | | | For example, we would like to have a predicate and texture token in one instruction to do predicated texture sampling.
* tgsi: Up tgsi_exec's control flow nesting to 32.Michal Krol2009-11-031-3/+3
|
* tgsi/ureg: Add negate and swizzle for predicates.Michal Krol2009-11-022-22/+208
|
* tgsi/ureg: Update for gallium interface changes.Michal Krol2009-11-022-22/+69
|
* tgsi: Update for gallium interface changes.Michal Krol2009-11-0210-542/+137
|
* gallium: remove extended negate also, and also the ExtSwz tokenKeith Whitwell2009-10-238-202/+2
| | | | | | Likewise, the extended negate functionality hasn't been used since mesa switched to using tgsi_ureg to build programs, and has been translating the SWZ opcode internally to a single MAD.
* gallium: remove the swizzling parts of ExtSwizzleKeith Whitwell2009-10-2313-262/+38
| | | | | | | | | These haven't been used by the mesa state tracker since the conversion to tgsi_ureg, and it seems that none of the other state trackers are using it either. This helps simplify one of the biggest suprises when starting off with TGSI shaders.
* gallium: remove noise opcodesKeith Whitwell2009-10-233-24/+4
| | | | | | | | | | | Provide a dummy implementation in the GL state tracker (move 0.5 to the destination regs). At some point, a motivated person could add a better implementation of noise. Currently not even the nvidia binary drivers do anything more than this. In any case, the place to do this is in the GL state tracker, not the poor driver.
* Merge branch 'mesa_7_6_branch'Brian Paul2009-09-241-5/+5
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/r600/r700_assembler.c src/mesa/drivers/dri/r600/r700_chip.c src/mesa/drivers/dri/r600/r700_render.c src/mesa/drivers/dri/r600/r700_vertprog.c src/mesa/drivers/dri/r600/r700_vertprog.h src/mesa/drivers/dri/radeon/radeon_span.c
| * tgsi/sse: Pass the lodbias, not zero. More comments.Brian Paul2009-09-241-5/+5
| | | | | | | | This fixes the glean/glsl1 "texture2D(), with bias" test when using SSE.
* | tgsi/sse: remove old commentsBrian Paul2009-09-241-8/+0
| |
* | tgsi/sse: implement SEQ, SGT, SLE, SNEBrian Paul2009-09-241-4/+4
| |
* | tgsi: Scan input interpolators, too.Michal Krol2009-09-172-0/+2
| |
* | tgsi: handle some src/dst aliasing in tgsi_sse2.cKeith Whitwell2009-09-131-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | Src/Dst aliasing (aka SOA dependencies) requires some care to ensure intermediate results do not overwrite yet-to-be read source registers. This change ensures that MOV/SWZ handle this correctly, which is poor but no worse than the current tgsi_exec.c path. Remove the fallback as there is nothing to be gained correctness-wise between the two implementations now. Fixing this properly looks like a bit of work in this code, but might be easily achieved by sending destination writes to temporary storage.
* | tgsi: implement saturationKeith Whitwell2009-09-121-17/+26
| | | | | | | | Fix recent performance regression.
* | tgsi: add missing implementation of constant decl changeKeith Whitwell2009-09-121-8/+61
| |
* | ureg: add a mechanism to get the built tokens rather than a full shaderKeith Whitwell2009-09-122-0/+30
| | | | | | | | | | | | Previously ureg would always call the driver's create-shader function. This allows the caller the opportunity to hold onto the tokens if it needs to reuse them, eg. to create an internal draw shader.
* | ureg: add generic emitters for tex and branch instructionsKeith Whitwell2009-09-122-11/+80
| | | | | | | | Couldn't previously emit these except by calling the opcode-specific helper.
* | tgsi/ureg: give ureg_DECL_constant an explicit index parameterKeith Whitwell2009-09-122-2/+6
| | | | | | | | | | Avoid the need to emit all constant declarations in order. Makes referring to a specific constant in the constant buffer much easier.
* | tgsi/ureg: VS inputs don't have any semantic tags, just an indexKeith Whitwell2009-09-122-38/+37
| | | | | | | | Fix ureg_DECL_vs_input to reflect this and fix up all callers.
* | tgsi: free tokens on errorKeith Whitwell2009-09-121-0/+3
| |
* | tgsi: sanity check ureg programsKeith Whitwell2009-09-121-0/+10
| |
* | tgsi: add const qualifierKeith Whitwell2009-09-122-2/+2
|/
* tgsi: use new tgsi_call_record to handle execution mask stacksBrian Paul2009-09-102-14/+43
| | | | This fixes some issues when "return"ing from nested loops/conditionals.
* tgsi: Document differencies between vs_1_1 and vs_2_0 for EXPP and LOGP.Michal Krol2009-09-041-2/+12
|
* aux/tgsi: pull back ureg work from 0.1 branchKeith Whitwell2009-09-039-173/+424
| | | | | Manual merge of ureg changes on the branch. Too much unrelated stuff for a proper merge.
* tgsi: remove redundant CND0 opcodeKeith Whitwell2009-09-015-21/+2
| | | | Can be implemented with CMP src2, src1, src0
* tgsi: Only free temp uregs.José Fonseca2009-08-241-2/+3
| | | | | Shorthand. (cherry picked from commit de911220bbbe74cff0c79b260456ff36122b7b5b)
* tgsi: Pass pipe_context as a parameter to ureg_create_shader.José Fonseca2009-08-242-14/+30
| | | | | Simplifies migration to tgsi_ureg. (cherry picked from commit f574398c07c41cb8d31249a7186fc178ef7d552a)
* tgsi: add generic instruction builderKeith Whitwell2009-08-242-0/+33
| | | | | | When translating an incoming shader (rather than building one from scratch) it's preferable to be able to call a single, generic instruction emitter rather than figuring out which of the opcode-specific functions to call.
* tgsi: when printing/dumping programs indent loops and conditionalsBrian Paul2009-08-201-0/+35
|
* tgsi: check for SOA dependencies in SSE and PPC code generatorsBrian Paul2009-08-202-0/+8
| | | | Fall back to interpreter for now. This doesn't happen very often.
* tgsi: handle SOA dependencies for MOV/SWZBrian Paul2009-08-202-14/+44
| | | | | | | | | | | | | | | | | | | | | | SOA dependencies can happen when a register is used both as a source and destination and the source is swizzled. For example: MOV T, T.yxwz; would expand into: MOV t0, t1; MOV t1, t0; MOV t2, t3; MOV t3, t2; The second instruction will produce the wrong result since we wrote to t0 in the first instruction. We need to use an intermediate temporary to fix this. This will take more work to fix for all TGSI instructions. This seems to happen with MOV instructions more than anything else so fix that case now and warn on others. Fixes piglit glsl-vs-loop test (when not using SSE). See bug 23317.
* tgsi: added tgsi_full_instruction::Flags fieldBrian Paul2009-08-202-0/+3
| | | | Users of the parser can make use of this.
* tgsi: Add missing include.José Fonseca2009-08-191-0/+1
| | | | (cherry picked from commit d2787c02c130b1fe20d0c032d468622f2fdaef79)
* tgsi: Fix typo in ureg constant creation.José Fonseca2009-08-191-1/+1
| | | | (cherry picked from commit aa40c9abc7787fdf46cb661a4d0bb8bec513fc63)
* tgsi: silence compiler warningKeith Whitwell2009-08-191-1/+1
|
* tgsi: remove unused function argumentKeith Whitwell2009-08-191-4/+2
|
* tgsi: add missing functionality to support instructions with labelsKeith Whitwell2009-08-192-1/+57
| | | | | | | | | | | | | | | | Could previously emit opcodes with label arguments, but was no way to patch them with the actual destinations of those labels. Adds two functions: ureg_get_instruction_number - to get the id of the next instruction to be emitted ureg_fixup_label - to patch an emitted label to point to a given instruction number. Need some more complex examples than u_simple_shader, so far this has only been compile-tested.
* Merge branch 'mesa_7_5_branch'Brian Paul2009-08-182-0/+9
|\
| * tgsi/ppc: we don't implement saturation modes yetBrian Paul2009-08-181-0/+5
| |
| * tgsi/sse: we don't implement saturation modes yetBrian Paul2009-08-181-0/+4
| | | | | | | | Fixes piglit fp-generic tests/shaders/generic/lrp_sat.fp, bug 23316.
* | gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create()Brian Paul2009-08-171-8/+2
| | | | | | | | This fixes invalid values for CondStackTop, LoopStackTop, etc.
* | tgsi: add simple facility for releasing and reusing temporariesKeith Whitwell2009-08-132-4/+40
| |
* | tgsi: rename ureg src/dest convertersKeith Whitwell2009-08-131-3/+3
| | | | | | | | Also fix a typo in ureg_src().
* | tgsi: turn off debuggingKeith Whitwell2009-08-131-1/+1
| |
* | tgsi: use REALLOC for growing token poolKeith Whitwell2009-08-131-11/+5
| |
* | tgsi: add tgsi_ureg, a simplified tgsi shader builderKeith Whitwell2009-08-135-0/+1381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is modelled on the nice & easy-to-use facilities we had for building shaders in mesa, eg. in texenvprogram.c and friends. Key points include pass-by-value register structs that can be manipulated in a functional style, eg: negate(swizzle(reg, X,X,X,X)) and per-opcode instruction functions, eg: emit_MOV( p, writemask(dst, 0x1), negate(src)); and similar. Additionally, the interface allows mixed emit of instructions and decls, which are sorted out internally to obey TGSI ordering. Immediates may be emitted at any time and are scanned against existing immediates to try and reduce redundancy. Not all TGSI functionality is accessible through this interface, but most or all of what mesa uses should be.
* | gallium: fix debug_printf() format stringBrian Paul2009-08-111-1/+1
| |
* | tgsi: report opcode name in addition to the number when translation failsBrian Paul2009-08-032-3/+9
| |