summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.c
AgeCommit message (Collapse)Author
2009-09-03aux/tgsi: pull back ureg work from 0.1 branchKeith Whitwell
Manual merge of ureg changes on the branch. Too much unrelated stuff for a proper merge.
2009-09-01tgsi: remove redundant CND0 opcodeKeith Whitwell
Can be implemented with CMP src2, src1, src0
2009-08-20tgsi: handle SOA dependencies for MOV/SWZBrian Paul
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.
2009-08-17gallium: memset() tgsi_exec_machine to all zeros in tgsi_exec_machine_create()Brian Paul
This fixes invalid values for CondStackTop, LoopStackTop, etc.
2009-07-31Rename TGSI LOOP instruction to better match theri usage.Michal Krol
The LOOP/ENDLOOP pair is renamed to BGNFOR/ENDFOR as its behaviour is similar to a C language for-loop. The BGNLOOP2/ENDLOOP2 pair is renamed to BGNLOOP/ENDLOOP as now there is no name collision.
2009-07-23gallium: remove deprecated TGSI opcodesKeith Whitwell
Various opcodes which can be implemented trivially with other TGSI opcodes, such as matrix multiplication and negation. These were not used by any state tracker or implemented by any of the drivers.
2009-07-22gallium: remove multiple aliases for TGSI opcodesKeith Whitwell
This is a source of ongoing confusion. TGSI has multiple names for opcodes where the same semantics originate in multiple shader APIs. For instance, TGSI includes both Mesa/GLSL and DX/SM30 names for opcodes with the same semantics, but aliases those names to the same underlying opcode number. This makes it very difficult to visually inspect two sets of opcodes (eg in state tracker & driver) and check if they implement the same functionality. This patch arbitarily rips out the versions of the opcodes not currently favoured by the mesa state tracker and leaves us with a single name for each distinct operation.
2009-07-22gallium: simplify tgsi_full_immediate structKeith Whitwell
Remove the need to have a pointer in this struct by just including the immediate data inline. Having a pointer in the struct introduces complications like needing to alloc/free the data pointed to, uncertainty about who owns the data, etc. There doesn't seem to be a need for it, and it is unlikely to make much difference plus or minus to performance. Added some asserts as we now will trip up on immediates with more than four elements. There were actually already quite a few such asserts, but the >4 case could be used in the future to specify indexable immediate ranges, such as lookup tables.
2009-07-16tgsi: no need to separately malloc input and output arraysKeith Whitwell
Can now guarantee alignment in the initial allocation of the tgsi exec machine.
2009-07-16gallium: proper constructor and destructor for tgsi_exec_machineKeith Whitwell
Centralize the creation, initialization and destruction of this struct. Use align_malloc instead of home-brew alternatives.
2009-07-10tgis: implement indirect addressing for destination registersBrian Paul
Includes the TGSI interpreter, but not the SSE/PPC/etc code generators.
2009-04-29tgsi: added tgsi_check_soa_dependencies() and related debug code (disabled)Brian Paul
The TGSI interpeter operates in SOA style. We need to check for data dependencies in instructions which read from and write to the same register. For now just adding some debug code to detect that condition. Actual fixes to follow.
2009-04-03tgsi/exec: Actually enable switch-case for FLR.Michal Krol
2009-03-31tgsi: added some helpful debug functions in the tgsi interpreterBrian Paul
Check for NaN/Inf, print exec vectors, print temp registers.
2009-03-26tgsi: pass zero vector to texture sampler for 1D case instead of NULLBrian Paul
Fixes segfault when sampling 1D textures.
2009-03-12tgsi: Localise SCS code.Michal Krol
2009-03-12tgsi: Rewrite NRM opcode, store 1.0 in W component.Michal Krol
2009-03-11tgsi: Implement RFL, SFL, STR, X2D opcodes.Michal Krol
2009-03-11tgsi: Implement RCC opcode.Michal Krol
2009-03-10tgsi: Untabify.Michal Krol
2009-03-10tgsi: Implement CLAMP opcode.Michal Krol
2009-03-10tgsi: Consider INDEX, NEGATE, MULTIPLYMATRIX opcodes for removal.Michal Krol
2009-03-10tgsi: ARL and FLOOR opcodes have the same implementation.Michal Krol
2009-03-09tgsi: Implement CND, CND0 opcodes.Michal Krol
2009-03-09tgsi: Remove redundant micro_ge() -- use micro_le().Michal Krol
2009-02-20gallium: use the TGSI_TEXTURE_SHADOW1D/2D/RECT texture types for TEX ↵Brian Paul
instructions These texture types were defined but never put to use. For the time being though, the Mesa->TGSI translater isn't emitting these targets. See the XXX comment in map_texture_target().
2009-02-16gallium: fix glean's vertProg1Alan Hourihane
RSQ test 2 (reciprocal square toot of negative value)
2009-02-10tgsi: Fix build -- rename Size to NrTokens.Michal Krol
2009-01-27tgsi: silence some warningsKeith Whitwell
2008-12-16tgsi: use flr(), not trunc() for ARLBrian Paul
2008-12-01gallium: minor texture-related clean-ups, comments, etcBrian
2008-11-26tgsi: Implement OPCODE_SSG/SGN.Michal Krol
2008-11-26tgsi: Implement OPCODE_ARR.Michal Krol
2008-11-23softpipe: remove old/unneeded dependencies between TGSI exec and softpipeBrian
Use tgsi_sampler struct as a base class. Softpipe subclasses it and adds the fields it needs.
2008-11-18tgsi: Return 0.0 for negative constant register indices.Michal Krol
2008-11-18tgsi: Keep address register as a floating point.Michal Krol
2008-11-12tgsi: More comments on source register indirect and 2D indexing.Michal Krol
2008-11-07gallium: implement TGSI_OPCODE_DP2A, add sqrt to NRM3/NRM4Brian Paul
2008-11-07Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
2008-11-06gallium: implement TGSI_OPCODE_NRM/NRM4 in tgsi_exec.cBrian
2008-11-06Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
2008-11-05gallium: check execution mask in indirect register loadsBrian
Zero-out the index for disabled execution channels to avoid using potential garbage values (thus avoiding bad array indexing).
2008-11-05Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
Conflicts: src/gallium/auxiliary/rtasm/rtasm_execmem.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_log.c src/mesa/state_tracker/st_atom_framebuffer.c
2008-11-05gallium: added some sanity check assertions for constant buffer indexingBrian Paul
2008-09-12gallium: silence warningBrian Paul
2008-09-10tgsi: Verify constants are set before attempting to read them.José Fonseca
2008-08-24gallium: refactor/replace p_util.h with util/u_memory.h and util/u_math.hBrian Paul
Also, rename p_tile.[ch] to u_tile.[ch]
2008-08-22gallium: use new util_fast_exp2(), _log2(), pow() functionsBrian Paul
New code surrounded with #if FAST_MATH to allow comparing against original code if we need to debug.
2008-08-19tgsi: Implement LOG opcode for SSE2 codegen.Michal Krol
2008-08-19tgsi: Implement EXP opcode for SSE2.Michal Krol