summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_shader_tokens.h
AgeCommit message (Collapse)Author
2010-05-03gallium: Remove loop register file.José Fonseca
It was only used for D3D's REP/END/BGNFOR/ENDFOR. D3D's aL register is just like another address register now.
2010-04-27gallium: Drop BGNFOR, ENDFOR, REP, and ENDREP opcodes.José Fonseca
Arcane DX9 opcodes that never were emitted by Mesa and have no DX10 counterpart. Slated for removal for quite some time now.
2010-02-09gallium: Add cylindrical wrap info to TGSI declaration.Michal Krol
2010-01-29tgsi: add properties for fragment coord conventions (v3)Luca Barbieri
Changes in v3: - Documented the new properties - Added comments for property values - Rebased to current master Changes in v2: - Caps are added in a separate, subsequent patch This adds two TGSI fragment program properties that indicate the fragment coord conventions. The properties behave as described in the extension spec for GL_ARB_fragment_coord_conventions, but the default origin in upper left instead of lower left as in OpenGL. The syntax is: PROPERTY FS_COORD_ORIGIN [UPPER_LEFT|LOWER_LEFT] PROPERTY FS_COORD_PIXEL_CENTER [HALF_INTEGER|INTEGER] The names have been chosen for consistency with the GS properties and the OpenGL extension spec. The defaults are of course the previously assumed conventions: UPPER_LEFT and HALF_INTEGER.
2010-01-28gallium: Add tgsi_declaration_dimension token.Michal Krol
This will allow us to declare two-dimensional constant buffers.
2010-01-05Merge branch 'master' into instanced-arraysMichal Krol
Conflicts: src/gallium/auxiliary/tgsi/tgsi_dump.c src/gallium/include/pipe/p_shader_tokens.h
2010-01-05gallium: Add UMOD TGSI opcode.Michal Krol
Either that or have UDIV have two destination operands.
2010-01-05gallium: Add SWITCH, CASE, DEFAULT and ENDSWITCH opcodes to TGSI.Michal Krol
Provide reference implementation of them in tgsi_exec. Note that BREAK opcode is overloaded and can be used to break out of either a loop or a switch-case statement.
2010-01-05gallium: Add signed/unsigned int immediate data types.Michal Krol
2010-01-05Remove TGSI_OPCODE_SHR, map existing usage to TGSI_OPCODE_ISHR.Michal Krol
This is to differentiate it from its unsigned version, TGSI_OPCODE_USHR.
2010-01-05gallium: Add more integer TGSI opcodes.Michal Krol
2009-12-25gallium: remove TGSI_SEMANTIC_VERTICESZack Rusin
it's a leftover from an early version of geometry shading support. geometry shaders now encode the primitive size in the PROPERTY token and don't need special input with their size.
2009-12-25gallium: add geometry shader support to galliumZack Rusin
2009-12-23gallium: Add interfaces needed for instanced drawing.Michal Krol
2009-12-22Merge branch 'gallium-edgeflags'Roland Scheidegger
Conflicts: src/mesa/state_tracker/st_draw.c
2009-12-14tgsi: add properties and system value registerZack Rusin
adds support for properties to all parts of the tgsi framework, plus introduces a new register which will be used for system generated values.
2009-12-09gallium: first steps to treat edgeflags as regular vertex elementKeith Whitwell
The idea here is to eliminate the set_edgeflags() call in pipe_context by treating edgeflags as a regular vertex element. Edgeflags provoke special treatment in hardware, which means we need to label them in some way, in this case we'll be passing them through the vertex shader and labelling the vertex shader output with a new TGSI semantic (TGSI_SEMANTIC_EDGEFLAG).
2009-11-27gallium: Remove tgsi_version token.Michal Krol
Not really needed, never served its purpose.
2009-11-24tgsi: reduce repetition of structure name in its membersKeith Whitwell
Rename Semantic.SemanticName to Semantic.Name. Similar for SemanticIndex, and the members of the tgsi_version struct.
2009-11-24gallium: simplify tgsi tokens furtherKeith Whitwell
Drop anonymous 'Extended' fields, have every optional token named explicitly in its parent. Eg. there is now an Instruction.Label flag, etc. Drop destination modifiers and other functionality which cannot be generated by tgsi_ureg.c, which is now the primary way of creating shaders. Pull source modifiers into the source register token, drop the second negate flag. The source register token is now full - if we need to expand it, probably best to move all of the modifiers to a new token and have a single flag for it.
2009-11-24gallium: Refactor the instruction predicate TGSI token.Michal Krol
Rename it to tgsi_instruction_predicate -- it's no longer an extended token. Its presence is indicated by a new flag in tgsi_instruction that indicates whether an instruction is predicated. Also, change predicate index representation to match the other tokens that specify register indices.
2009-11-02gallium: Cleanup predicate and condition code TGSI tokens.Michal Krol
There is little point in having a special TGSI token just to handle predicate register updates. Remove tgsi_dst_register_ext_predicate token and instead use a new PREDICATE register file to update predicates. Actually, the contents of the obsolete token are being moved to tgsi_instruction_ext_predicate, where they should be from the very beginning. Remove the NVIDIA-specific condition code tokens -- nobody uses them and they can be emulated with predicates if needed. Introduce PIPE_CAP_SM3 that indicates whether a driver supports SM3-level instructions, and in particular predicates. Add PIPE_CAP_MAX_PREDICATE_REGISTERS that can be used to query the driver how many predicate registers it supports (currently it would be 1).
2009-10-23gallium: remove extended negate also, and also the ExtSwz tokenKeith Whitwell
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-23gallium: remove the swizzling parts of ExtSwizzleKeith Whitwell
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-23gallium: remove noise opcodesKeith Whitwell
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-09-01tgsi: remove redundant CND0 opcodeKeith Whitwell
Can be implemented with CMP src2, src1, src0
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: 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-23gallium: clean up opcode definitionsKeith Whitwell
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-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-01gallium: fix the front face semanticsZack Rusin
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-03-10tgsi: Consider INDEX, NEGATE, MULTIPLYMATRIX opcodes for removal.Michal Krol
2009-02-10gallium: Rename Size member of TGSI token to NrTokens.Michal Krol
Driver writers often got confused and assumed Size to be the number of immediate values in Immediate declaration.
2008-11-24tgsi: doxygen commentsBrian Paul
2008-11-24tgsi: add tgsi_declaration fields for centroid sampling, invariant optimizationBrian Paul
2008-09-19gallium: Fix doxygen comments.José Fonseca
2008-08-19gallium: Add note about vs_2_0 EXPP mapping.Michal Krol
2008-08-18gallium: Remove TGSI_CC_UN.Michal Krol
2008-08-13gallium: Make a note that OPCODE_KIL is a conditional kill.Michal Krol
Map OPCODE_TEXKILL to OPCODE_KIL.
2008-07-13tgsi: Parse destination operand modulate modifier.Michal Krol
2008-07-13tgsi: Parse texture instructions correctly.Michal Krol
2008-07-13tgsi: Remove depricated ATTRIB interpolate mode.Michal Krol
2008-06-02gallium: The SWZ opcode no longer aliases MOV.Michal Krol
Also, when the extended swizzle token is used, the simple swizzle and negate are set to X,Y,Z,W and FALSE, respectively.
2008-05-31gallium: Refactor TGSI decalaration tokens.Michal Krol
* Incorporate declaration_interpolation into declaration itself. * Remove declaration_mask -- always use declaration_range.
2008-03-13tgsi: Drop pre-ps_2_0 opcodes.Michal Krol
2008-03-13tgsi: Remove OPCODE_TEXCOORD, OPCODE_TEXCRD aliases.Michal Krol
2008-03-12tgsi: Remove ExtDivide field from existence. Implement OPCODE_TXP.Michal Krol
2008-03-12tgsi: Introduce OPCODE_TXP. Depricate ExdDivide field.Michal Krol