Commit Graph

34 Commits

Author SHA1 Message Date
Keith Whitwell
da253319f9 gallium: remove extended negate also, and also the ExtSwz token
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.
2009-10-23 14:50:02 +01:00
Keith Whitwell
b9cb74c7f8 gallium: remove the swizzling parts of ExtSwizzle
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.
2009-10-23 14:31:24 +01:00
Keith Whitwell
4e1d51786e gallium: remove noise opcodes
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.
2009-10-23 13:56:07 +01:00
Keith Whitwell
b3f4b56a3b tgsi: remove redundant CND0 opcode
Can be implemented with CMP src2, src1, src0
2009-09-01 17:30:01 +01:00
Michal Krol
cb90c43676 Rename TGSI LOOP instruction to better match theri usage.
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-31 18:14:40 +02:00
Michal Krol
cf8907018e tgsi: Declare a LOOP register.
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-30 10:34:06 +02:00
Keith Whitwell
d0d98f3ecf gallium: clean up opcode definitions
Remove commented-out opcodes.  Remove information about API mappings
to opcodes, but add a reference to tgsi-instruction-set.txt where
that information is better presented.
2009-07-23 14:39:07 +01:00
Keith Whitwell
78379abcbf gallium: remove deprecated TGSI opcodes
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-23 14:38:26 +01:00
Keith Whitwell
ede9f3b52e gallium: remove multiple aliases for TGSI opcodes
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-22 12:42:09 +01:00
Keith Whitwell
fd31f92cea gallium: simplify tgsi_full_immediate struct
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-22 12:42:09 +01:00
Zack Rusin
1c04731b87 gallium: fix the front face semantics
mesa allocates both frontface and pointcoord registers within the fog
coordinate register, by using swizzling. to make it cleaner and easier
for drivers we want each of them in its own register. so when doing
compilation from the mesa IR to tgsi allocate new registers for both
and add new semantics to the respective declarations.
2009-07-01 10:45:55 -04:00
Michal Krol
fb88908f5c tgsi: Consider INDEX, NEGATE, MULTIPLYMATRIX opcodes for removal. 2009-03-10 10:27:24 +01:00
Michal Krol
bf3930453c gallium: Rename Size member of TGSI token to NrTokens.
Driver writers often got confused and assumed Size to be
the number of immediate values in Immediate declaration.
2009-02-10 15:12:34 +01:00
Brian Paul
868c607c17 tgsi: doxygen comments 2008-11-24 13:11:05 -07:00
Brian Paul
434e255eae tgsi: add tgsi_declaration fields for centroid sampling, invariant optimization 2008-11-24 13:11:05 -07:00
José Fonseca
984a7c4e9c gallium: Fix doxygen comments. 2008-09-19 10:40:42 +09:00
Michal Krol
146a0fba00 gallium: Add note about vs_2_0 EXPP mapping. 2008-08-19 15:32:09 +02:00
Michal Krol
235981d871 gallium: Remove TGSI_CC_UN. 2008-08-18 17:49:01 +02:00
Michal Krol
9804ab9acc gallium: Make a note that OPCODE_KIL is a conditional kill.
Map OPCODE_TEXKILL to OPCODE_KIL.
2008-08-13 09:15:27 +02:00
Michal Krol
f5c51ebd2a tgsi: Parse destination operand modulate modifier. 2008-07-13 15:23:14 +02:00
Michal Krol
3d5dcc2203 tgsi: Parse texture instructions correctly. 2008-07-13 13:17:41 +02:00
Michal Krol
bd3b47590e tgsi: Remove depricated ATTRIB interpolate mode. 2008-07-13 13:17:30 +02:00
Michal Krol
837d49a84e gallium: The SWZ opcode no longer aliases MOV.
Also, when the extended swizzle token is used, the simple swizzle
and negate are set to X,Y,Z,W and FALSE, respectively.
2008-06-02 11:34:56 +02:00
Michal Krol
4e33edfd06 gallium: Refactor TGSI decalaration tokens.
* Incorporate declaration_interpolation into declaration itself.
* Remove declaration_mask -- always use declaration_range.
2008-05-31 18:56:20 +02:00
Michal Krol
bcb454e7a6 tgsi: Drop pre-ps_2_0 opcodes. 2008-03-13 18:12:36 +01:00
Michal Krol
78ddfbd130 tgsi: Remove OPCODE_TEXCOORD, OPCODE_TEXCRD aliases. 2008-03-13 13:00:44 +01:00
Michal Krol
ba75e82b6e tgsi: Remove ExtDivide field from existence. Implement OPCODE_TXP. 2008-03-12 16:41:25 +01:00
Michal Krol
70ae7f09c7 tgsi: Introduce OPCODE_TXP. Depricate ExdDivide field. 2008-03-12 14:55:18 +01:00
Michal Krol
130b315454 tgsi: Map OPCODE_TEXKILL to OPCODE_KILP. 2008-03-11 23:22:34 +01:00
Zack Rusin
e884c7ed9a start implementing start of bultins 2008-03-01 15:28:00 -05:00
José Fonseca
94c73d1bb9 gallium: Remove // comments. 2008-02-27 16:23:50 +09:00
Brian
35ca45daba gallium: added TGSI_FILE_COUNT 2008-02-23 16:15:54 -07:00
Keith Whitwell
4339744c16 [PATCH] gallium: include p_compiler.h for boolean defn 2008-02-21 19:17:27 +00:00
José Fonseca
b642730be9 Code reorganization: move files into their places.
This is in a separate commit to ensure renames are properly preserved.
2008-02-15 17:45:40 +09:00