summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/tgsi
AgeCommit message (Collapse)Author
2009-08-03tgsi: report opcode name in addition to the number when translation failsBrian Paul
2009-08-03tgsi: added tgsi_get_opcode_name()Brian Paul
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-30tgsi: Add proper constraints to sanity.Michal Krol
2009-07-30tgsi: Declare a LOOP register.Michal Krol
The only valid usage for LOOP/ENDLOOP instructions is LOOP[0] as a destination register. The only valid usage for the remaining instructions is LOOP[0].x as an indirect register.
2009-07-30tgsi: Fix number operands for LOOP/ENDLOOP.Michal Krol
2009-07-30tgsi: Document LOOP/ENDLOOP instruction operation.Michal Krol
2009-07-29gallium: fix SSE shadow texture instructionsBrian Paul
When sampling a 2D shadow map we need 3 texcoord components, not 2. The third component (distance from light source) is compared against the texture sample to return the result (visible vs. occluded). Also, enable proper handling of TGSI_TEXTURE_SHADOW targets in Mesa->TGSI translation. There's a possibility for breakage in gallium drivers if they fail to handle the TGSI_TEXTURE_SHADOW1D / TGSI_TEXTURE_SHADOW2D / TGSI_TEXTURE_SHADOWRECT texture targets for TGSI_OPCODE_TEX/TXP instructions, but that should be easy to fix. With these changes, progs/demos/shadowtex.c renders properly again with softpipe.
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-23gallium: Fix PPC build.Michel Dänzer
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-20tgsi: get texturing working in vertex shader sse2 pathKeith Whitwell
2009-07-20tgsi: fix regression in indexed const lookupsKeith Whitwell
This function was calling get_input_base() and get_output_base() to get the names of a couple of register to use as temps. Those functions no longer return registers, so adjust it to get the registers elsewhere. This change doesn't address the issue that it's a fairly poor way to grab a register name by calling a function with an apparently unrelated meaning.
2009-07-16tgsi: simplify and fix sse KIL implementationKeith Whitwell
Use sse_movmskps to extract the correct bits of the comparison result for use in updating the killmask. Simplify some logic around identifying the set of necessary comparisons to make.
2009-07-16tgsi: initial texturing support on sse pathKeith Whitwell
Most obvious problem is drawpixels comes out blocky, but this may be an existing issue of KIL on the sse path.
2009-07-16tgsi: make sse function callout mechanism more genericKeith Whitwell
Take a list of arguments rather than hardcoding TEMP_R0.
2009-07-16tgsi: reduce x86 reg usage in tgsi_sse generated programsKeith Whitwell
Pass the tgsi_exec_machine struct in directly and just hold a single pointer to this struct, rather than keeping one for each of its internal members.
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: reduce recursive include of tgsi_exec.hKeith Whitwell
A lot of draw code no longer needs to see this header.
2009-07-16tgsi: make function call code in tgsi_sse.c less opaqueKeith Whitwell
Explictly pass src and dst arguments (previously dst argument was also being used as a src). Separate argument handling from the rest of the function call emit.
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-10tgsi: update some assertionsBrian Paul
2009-07-10tgsi: tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACEBrian Paul
Same story as in the tgsi_dump.c code (see prev commit).
2009-07-10tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACEBrian Paul
Fixes TGSI dump output when front/back-face register is declared. Also, add some assertions to make sure the semantic/interpolate string arrays have as many elements as there are tokens in the p_shader_tokens.h file. That should catch problems like this in the future.
2009-07-10tgis: implement indirect addressing for destination registersBrian Paul
Includes the TGSI interpreter, but not the SSE/PPC/etc code generators.
2009-06-26tgsi: correct handling of return value from util_vsnprintfKeith Whitwell
We were failing to deal with: - vsnprintf returns negative value on error. - vsnprintf returns the number of chars that *would* have been written on truncation.
2009-06-04tgsi: increase MAX_LABELS to 4096Brian Paul
2009-05-08gallium/tgsi: hack around linker/archiver breakageKeith Whitwell
Add a dummy function which exists only so that tgsi_text_translate() doesn't get magic-ed out of the libtgsi.a archive by the build system. Don't remove unless you know this has been fixed - check on mingw/scons builds as well.
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-24tgis: SSE code generator doesn't yet support indirect addressing of temp regsBrian Paul
Fall back to interpreter in this case.
2009-04-10tgsi/sse2: Cleanup NRM/NRM4 implementation.Michal Krol
Fix comments. Make sure .w is set to 1.0 for NRM. Optimise for non-.xyzw writemasks.
2009-04-09tgsi/sse2: Fix build.Michal Krol
2009-04-09tgsi/sse2: Fix ARL instruction.Michal Krol
2009-04-09tgsi/sse2: Fix LIT instruction.Michal Krol
2009-04-03tgsi/exec: Actually enable switch-case for FLR.Michal Krol
2009-04-03tgsi/text: Allow optional component selection for indirect registers.Michal Krol
2009-04-03tgsi/text: Allow `-|src|` variant of `-(|src|)`.Michal Krol
2009-04-01tgsi: Fix structure members initialisation.Michal Krol
2009-04-01tgsi: Lookup alternate instruction mnemonics when parsing tgsi text.Michal Krol
2009-04-01tgsi: Provide alternate instruction mnemonics in tgsi info.Michal Krol
2009-04-01tgsi/doc: Fix typo.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-30tgsi: Condition codes are implied in KILP.Michal Krol
2009-03-30tgsi: Explain symbols used in instruction set documentation.Michal Krol
2009-03-30tgsi: Document BRA opcode.Michal Krol
2009-03-26tgsi: pass zero vector to texture sampler for 1D case instead of NULLBrian Paul
Fixes segfault when sampling 1D textures.
2009-03-22tgsi: minor commentsBrian Paul
2009-03-21tgsi: Document KIL, KILP instructions.Michal Krol
2009-03-19tgsi: Document vs_2_0 instruction set operations.Michal Krol