summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_program.c
AgeCommit message (Collapse)Author
2009-12-31nv50: add support for subroutinesChristoph Bumiller
2009-12-31nv50: alloc_reg on reg_instanceChristoph Bumiller
If we create multiple instances of an nv50_reg referencing them same resource, register allocation from alloc_reg has to be done with the original nv50_reg.
2009-12-31nv50: neg and abs modifiers for flopsChristoph Bumiller
Also fixes RSQ of negative sources.
2009-12-31nv50: don't negate immediates in set_immdChristoph Bumiller
This negation would only be triggered in situations where it's incorrect. The caller of set_immd should negate the immediate value in the instruction itself if desired, and will also know if it's a float or an int. ADD TEMP[0], CONST[0], -IMMD[0] would load the immediate into extra TEMP, negated, and set the negate flag in add as well - double negation.
2009-12-28nv50: Dehexify and bring up to date with new method defines.Marcin Kościelnicki
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-24nv50: support TGSI_OPCODE_CONTChristoph Bumiller
2009-12-24nv50: make edgeflags workChristoph Bumiller
It doesn't seem to be possible to set the egdeflag in the vertex shader, so we need to fallback to pushing vertices through the FIFO and use method 0x15e4 if they are used. This only works if VP does MOV OUT[X] IN[Y] where X is the edgeflag output, and Y is saved so we can tell the correct input later. The VP still writes the useless values to wasted outputs as punishment.
2009-12-22nv50: correct the negation of DDY sourcesChristoph Bumiller
The state tracker now does the correct thing, so interpret negation normally.
2009-12-20nv50: make address reg allocation a little less hackyChristoph Bumiller
Before I tried to distinguish int +0 and -0, and regs relative to $a1 would have been considered reserved for TGSI. This would probably never occur, let it be fixed even so.
2009-12-20nv50: use BREAKADDR and BREAK for loopsChristoph Bumiller
This is easier, we don't have to record all the BRK branches to fill in the address at ENDLOOP - which wasn't done before and thus made all but the last BRK branch jump to the start. Also, we don't risk reactivting threads that already left the loop if we join threads after a conditional with a BRK (although it might be wiser to remove the join altogether in such cases).
2009-12-20nv50: handle TGSI_OPCODE_RET,KILPChristoph Bumiller
2009-12-14nv50: be more cautious about using reg_instanceChristoph Bumiller
Trying to free part of nv50_pc->reg_instances[] for an nv50_reg representing an indirect constant resulted in a segmentation fault.
2009-12-14nv50: store immediates as uint32Christoph Bumiller
Sometimes we want non-float immediates, hacking them into floats isn't nice. Sorry, this should have already been committed before.
2009-12-13nouveau: nv50: Add missing ctor_immd_4u32 functionPatrice Mandin
2009-12-13nv50: add craziness for non-constant TXB and TXLChristoph Bumiller
If lod or bias can be non-constant across a quad of fragments, we need to execute TEX separately for each value. Don't ask why.
2009-12-12nv50: support TXB and TXLChristoph Bumiller
... and don't set the 'live' flag for TEX anymore, we'd have to know if results affect the inputs for another TEX, and I'm not going to do that kind of analysis now.
2009-12-12nv50: add src_mask case for IF opcodeChristoph Bumiller
2009-12-12nv50: use copies of tgsi src nv50_regsChristoph Bumiller
So we can use the 'mod' member without concern if a source is used multiple times in 1 insn.
2009-12-01Merge commit 'origin/tgsi-simplify-ext'Keith Whitwell
Conflicts: src/gallium/drivers/r300/r300_vs.c
2009-11-29nv50: match VP outputs to FP inputs ourselvesChristoph Bumiller
For each FP input, don't assume that the VP output will be at the same position, but scan the semantics instead, then put the correct output reg indices into VP_RESULT_MAP. Position is still assumed to be the first output/input. See 07fafc7c9346aa260829603bf3188596481e9e62, which renders previous assumptions incorrect.
2009-11-29nv50: don't permanently negate src in emit_ddyChristoph Bumiller
2009-11-27nv50: do conversion of last insn to 64 bit format firstChristoph Bumiller
Simplifies things since the second to last one will then be converted in the subsequent pass that ensures alignment automatically.
2009-11-24tgsi: rename fields of tgsi_full_src_register to reduce verbosityKeith Whitwell
SrcRegister -> Register SrcRegisterInd -> Indirect SrcRegisterDim -> Dimension SrcRegisterDimInd -> DimIndirect
2009-11-24tgsi: rename fields of tgsi_full_dst_register to reduce verbosityKeith Whitwell
DstRegister -> Register DstRegisterInd -> Indirect
2009-11-24tgsi: rename fields of tgsi_full_declaration to reduce verbosityKeith Whitwell
DeclarationRange -> Range
2009-11-24tgsi: rename fields of tgsi_full_instruction to avoid excessive verbosityKeith Whitwell
InstructionPredicate -> Predicate InstructionLabel -> Label InstructionTexture -> Texture FullSrcRegisters -> Src FullDstRegisters -> Dst
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: try and update r300 and nv drivers for tgsi changesKeith Whitwell
It would be nice if these drivers built under the linux-debug header so that these types of interface changes can be minimally propogated into those drivers by people without the hardware. They don't have to generate a working driver -- though a command-dumping winsys would be an excellent for regression checking.
2009-11-04nv50: fix shader emit_tex for cube texturesChristoph Bumiller
2009-11-04nv50: add abs-modifier for emit_minmaxChristoph Bumiller
2009-11-01nv50: handle TGSI_SEMANTIC_FACEChristoph Bumiller
2009-11-01nv50: make IF condition safeChristoph Bumiller
Don't assume that a SET that writes to IF's argument directly precedes the IF.
2009-11-01nv50: implement TGSI_OPCODE_AND/OR/XORChristoph Bumiller
Will use AND for gl_FrontFacing, the face input is either 0 or 0xffffffff.
2009-10-31nv50: use SIFC also for shader uploadChristoph Bumiller
Adds a more generic SIFC transfer function.
2009-10-31nv50: make MRTs workChristoph Bumiller
We have to indicate to the hw whether the FP exports multiple colour results. Method 0x121c is used to specify the number of RTs. Also deactivate zeta explicitly if there's no zsbuf.
2009-10-23nv50: do SIGN_SET as one instructionChristoph Bumiller
2009-10-23nv50: fix saturation outside of tx_insn caseChristoph Bumiller
2009-10-23nv50: allow all 127 TEMP regsChristoph Bumiller
We should really learn to not waste so many though.
2009-10-23nv50: fix address reg codeChristoph Bumiller
Contained some rather obvious thinking errors before, and didn't consider offsets from TGSI ADDRESS regs.
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-19nv50: add support for address regsChristoph Bumiller
Allow indirect uniform access and increase the limit on parameters from 128 to 512.
2009-10-19nv50: cleanup emit_kilChristoph Bumiller
2009-10-19nv50: implement TGSI_OPCODE_CMPChristoph Bumiller
2009-10-19nv50: quick fix for insn src negationChristoph Bumiller
We only have a per nv50_reg negation flag, if an nv50_reg is used more than once in a TGSI op with different sign modes, we'd generate wrong code. We probably can't do much better without more invasive changes.
2009-10-19nv50: add support for DDX and DDY opcodesChristoph Bumiller
2009-09-25nv50: fix TEX for WriteMask not equal 0xfChristoph Bumiller
If you e.g. only need alpha, it ends up in the first reg, not the last, as it would when reading rgb too.
2009-09-25nv50: RCP and RSQ cannot load from VP inputsChristoph Bumiller
2009-09-25nv50: fix CEIL and TRUNCChristoph Bumiller
Separated the integer rounding mode flag for cvt.
2009-09-25nv50: implement BGNLOOP, BRK, ENDLOOPChristoph Bumiller
There's a good chance a loop won't execute correctly though since our TEMP allocation assumes programs to be executed linearly. Will fix later.
2009-09-25nv50: implement IF, ELSE, ENDIF opcodesChristoph Bumiller