Age | Commit message (Collapse) | Author |
|
this adds the capability + a stencil semantic id, + tgsi scan support.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Useful to give human legible names in other cases.
|
|
|
|
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]]
|
|
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.
|
|
|
|
|
|
|
|
It was only used for D3D's REP/END/BGNFOR/ENDFOR. D3D's aL register is
just like another address register now.
|
|
|
|
|
|
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.
|
|
|
|
The dimension index always addresses the second-dimension axis.
|
|
Conflicts:
src/gallium/auxiliary/tgsi/tgsi_dump.c
src/gallium/include/pipe/p_shader_tokens.h
|
|
|
|
Modify the translate module to respect instance divisors and accept
instance id as a parameter to calculate input vertex offset.
|
|
It doesn't seem necessary, and more importantly, tgsi_parse doesn't know
how to read them.
|
|
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.
|
|
|
|
in particular asm text parsing and sanity checking were missing code
to handle multi-dimensional arrays/geometry shaders
|
|
|
|
Conflicts:
src/mesa/state_tracker/st_draw.c
|
|
use correct number of vertex inputs
fix not running pipeline in case of edgeflags
changes to mesa to tgsi translation still very broken
|
|
adds support for properties to all parts of the tgsi framework, plus
introduces a new register which will be used for system generated
values.
|
|
|
|
SrcRegister -> Register
SrcRegisterInd -> Indirect
SrcRegisterDim -> Dimension
SrcRegisterDimInd -> DimIndirect
|
|
DstRegister -> Register
DstRegisterInd -> Indirect
|
|
DeclarationRange -> Range
|
|
InstructionPredicate -> Predicate
InstructionLabel -> Label
InstructionTexture -> Texture
FullSrcRegisters -> Src
FullDstRegisters -> Dst
|
|
Rename Semantic.SemanticName to Semantic.Name. Similar for
SemanticIndex, and the members of the tgsi_version struct.
|
|
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.
|
|
|
|
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.
|
|
Manual merge of ureg changes on the branch. Too much unrelated stuff
for a proper merge.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Includes the TGSI interpreter, but not the SSE/PPC/etc code generators.
|
|
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.
|
|
Don't print the meaningless and confusing CONSTANT interpolation
attribute after everything else.
|
|
The debug functions depend on several util function for os abstractions, and
these depend on debug functions, so a seperate module is not possible.
|
|
|
|
(cherry picked from commit 434e255eae90b0f3d836d452b7d3b0c5aadf78b8)
|
|
|
|
|
|
This fixes a stack overflow when dumping shaders.
It ended up being pretty much as the original code Michal had before,
before I went on a cleanup rampage on it and took things that ended up
needing...
|
|
long shaders
|