summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_shader_tokens.h
AgeCommit message (Collapse)Author
2011-01-25tgsi: add support for 1D/2D texture arraysBrian Paul
2011-01-24gallium: implement modern sampling schemeZack Rusin
largely a merge of the previously discussed origin/gallium-resource-sampling but updated. the idea is to allow arbitrary binding of resources, the way opencl, new gl versions and dx10+ require, i.e. DCL RES[0], 2D, FLOAT LOAD DST[0], SRC[0], RES[0] SAMPLE DST[0], SRC[0], RES[0], SAMP[0]
2010-12-24gallium: add fragment shader property for color writes to all buffers. (v2)Dave Airlie
For GL fragColor semantics we need to tell the pipe drivers that the fragment shader color result is to be replicated to all bound color buffers, this adds the basic TGSI + documentation. v2: fix missing comma pointed out by Tilman on mesa-dev. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-10-13gallium/tgsi: add support for stencil writes.Dave Airlie
this adds the capability + a stencil semantic id, + tgsi scan support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-09-07Replace reference to tgsi-instruction-set.txt.Tilman Sauerbeck
That file has been replaced by tgsi.rst. Signed-off-by: José Fonseca <jfonseca@vmware.com>
2010-08-27gallium: Remove unnecessary header from p_shader_tokens.h.Vinson Lee
Remove p_compiler.h.
2010-06-18gallium: add a temporary array register fileZack Rusin
like normal temporaries, but allows to define a number of distinct arrays, all of which make it explicit that they contain /indexable/ registers. as a side-effect we're adding support for multi-dimensional destination registers. The whole thing looks like this: DCL TEMPX[0][0..128] # 0 array with 128 registers ADD TEMPX[0][0], IN[0], IMM[0] ADD TEMPX[0][1], IN[0], IMM[0] ABS OUT[0], TEMPX[0][TEMP[0]]
2010-06-18gallium: add a new register file - immediate arrayZack Rusin
allows one to specify a safe (bound checked) array filled with immediates. it works just like a const array and declares much like our current immediates.
2010-06-09geometry shaders: make gs work with changable primitives and variable number ↵Zack Rusin
of vertices lots and lots of fixes for geometry shaders. in particular now we work when the gs emits a different primitive than the one the pipeline was started with and also we work when gs emits more vertices than would fit in the original buffer.
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.