summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv50/nv50_program.c
AgeCommit message (Collapse)Author
2009-06-05nouveau: remove unneeded code from ws, use pipe_buffer_ instead of ws->Ben Skeggs
2009-06-05nouveau: move channel creation into pipe driversBen Skeggs
2009-06-05nouveau: call notifier/grobj etc funcs directlyBen Skeggs
libdrm_nouveau is linked with the winsys, there's no good reason to do all this through yet another layer.
2009-06-05nouveau: pass nouveau_bo instead of pipe_buffer to so_ callsBen Skeggs
2009-05-28nv50: negate sources directly where supportedChristoph Bumiller
2009-05-28nv50: introduce emit_cvt and use itChristoph Bumiller
This makes some code cleaner, and we can now easily do CEIL and TRUNC.
2009-05-28nv50: fix TXPChristoph Bumiller
For TXP we need to divide texture coords by their w component, or use the coords' 1/w in the perspective interpolation instruction. This also tries to support 1D, 3D and CUBE textures, and lets the instruction only load the components that are used.
2009-05-28nv50: use multiple constant buffersChristoph Bumiller
Use different buffers for immds, FP params, and VP params. One has to map constant buffer indices in shader code to buffers defined via CB_DEF. In principle, we could use more buffers so we'd have to change the shader code less frequently.
2009-05-28nv50: don't look for unfreed temps in free_nv50_pcChristoph Bumiller
Since we stopped using alloc_temp to get hw indices for FP attrs there shouldn't be any non-deallocated temps left.
2009-05-28nv50: release hw TEMPs earlyChristoph Bumiller
Since we know when we don't use a TEMP or FP ATTR register anymore, we can release their hw resources early.
2009-05-28nv50: allow immediates for MOV, ADD and MULChristoph Bumiller
Immediates are inlined now where possible, so we need to set pc->allow32 to FALSE in LIT where we have the conditional MOV, since immediates swallow the predicate bits.
2009-05-28nv50: enable half insns for MOV and MULChristoph Bumiller
2009-05-28nv50: make sure half-long insns are pairedChristoph Bumiller
I chose to just convert unpaired 32 bit length instructions after parsing all instructions, although it might be possible to determine beforehand whether there would be any lone ones, and then even do some swapping to bring them together ...
2009-05-28nv50: enable KIL in register 19a8Christoph Bumiller
2009-05-28nv50: don't overwrite sources before they're usedChristoph Bumiller
This would have happened in p.e. ADD TEMP[0], TEMP[0].xyxy, TEMP[1] or RCP/RSQ TEMP[i], TEMP[i].
2009-05-28nv50: put FP outputs where they belongChristoph Bumiller
Depth output in fragment programs should end up in the first register after the color outputs.
2009-05-28nv50: modified FP attribute loadingChristoph Bumiller
VP outputs that should be loadable in the FP are mapped to interpolant indices by HPOS, COL0 etc.; of course HPOS is always written, so the highest byte of 1988 is a bitmask that selects which components of HPOS are used for interpolants, i.e. the FP inputs in COL0 start at index POPCNT(1988[24:28]).
2009-05-28nv50: inspect decl semantic and interpolation modeChristoph Bumiller
Record interpolation mode for attributes while parsing declarations, and also remember the indices of FP color inputs and FP depth output, which has to end up in the highest output register.
2009-05-28nv50: record last access to temp and attr regsChristoph Bumiller
We now inspect the TGSI instructions in tx_prep to determine where temps and FP attrs are last accessed. This will enable us to reclaim some temporaries early and we also use it to omit pre-loading FP attributes that aren't used.
2009-05-28nv50: save some space in immediate bufferChristoph Bumiller
We could do even better (like just allocating 1 value in alloc_immd), but that's fine for now I guess.
2009-05-28nv50: fix SIGN_SET case in tgsi_srcChristoph Bumiller
2009-05-28nv50: set dst.z,w to 0,1 in SCS and XPDChristoph Bumiller
According to tgsi-instruction-set.txt, if they are written, z and w should be set to 0 and 1 respectively in SCS, and w to 1.0 in XPD.
2009-05-28nv50: make LRP instruction nicerChristoph Bumiller
2009-05-28nv50: fix some memory leaks in shader assemblerChristoph Bumiller
2009-03-07nouveau: make stateobjs start off with refcount of 1Ben Skeggs
2009-03-04gallium: Unify reference counting.Michel Dänzer
The core reference counting code is centralized in p_refcnt.h. This has some consequences related to struct pipe_buffer: * The screen member of struct pipe_buffer must be initialized, or pipe_buffer_reference() will crash trying to destroy a buffer with reference count 0. u_simple_screen takes care of this, but I may have missed some of the drivers not using it. * Except for rare exceptions deep in winsys code, buffers must always be allocated via pipe_buffer_create() or via screen->*buffer_create() rather than via winsys->*buffer_create().
2009-02-05nv50: stop using nouveau_push.h, it's evilBen Skeggs
2009-02-02gallium: remove pipe_buffer from surfacesZack Rusin
this change disassociates, at least from the driver perspective, the surface from buffer. surfaces are technically now views on the textures so make it so by hiding the buffer in the internals of textures.
2009-01-13nv50: change some magic reg, makes more things workBen Skeggs
No real idea what this does.. but a lot of things that misrendered and made the GPU throw a DATA_ERROR now work.. I'm wondering what side-effects we'll see from this :)
2009-01-13nv50: implement KIL enough for progs/fp/kil to workBen Skeggs
2009-01-12nv50: disable shader debugBen Skeggs
2009-01-06nv50: fill image unit index in TEX varientsBen Skeggs
2009-01-06nv50: fix crash in nv50_program_destroyBen Skeggs
2009-01-06nv50: add TXP to TEX case.. not correct, but anyway..Ben Skeggs
2009-01-06nv50: indentation for TEX is a little overenthusiasticBen Skeggs
2009-01-06nv50: ensure we actually get contiguous regs for TEX insn.Ben Skeggs
Still many more horrible things to fix here...
2008-08-07nouveau: fix buildBen Skeggs
2008-07-11nv50: add some texture formatsBen Skeggs
2008-07-11nv50: add license headers to .c filesBen Skeggs
2008-07-11nv50: more "abuse" by using libc malloc etc..Ben Skeggs
2008-06-29nv50: fixes after rebase + commits note on the code that was just pushed.Ben Skeggs
OK, seems a lot of people have been getting the idea that nouveau is dying lately - I decided to commit some of the work I've been doing lately to prove them wrong :) Progress on my side is slow due to lack of time mainly, but I'm still around. Firstly, don't even bother trying to use gallium on G8x/G9x yet, it won't work. I've deliberately left all the necessary winsys changes out of the commits for a very good reason - I don't know what we're going to need from the DRM exactly yet and don't want to be continually breaking interfaces as I discover additional requirements. On my side, I think I've gone through about 3 different DRM interface changes, and have just discovered that I may need more yet. It'd be very annoying for everyone who uses nouveau to keep things in sync. Once I've got it sorted - I'll commit a lot of cool stuff. Stay tuned. Also, don't look at the shader code.. it's horribly nasty and full of hacks, I used it as an opportunity to learn G8x GPU programs at the same time. New semi-decent code is in works, and will follow at some point. :)
2008-06-29nv50: whoopsBen Skeggs
2008-06-29nv50: remove some debugBen Skeggs
2008-06-29nv50: simplify emit_interp a bitBen Skeggs
2008-06-29nv50: some people are just born stupid.. really..Ben Skeggs
2008-06-29nv50: make TEX a halfieBen Skeggs
2008-06-29nv50: separate state validation and upload, similar to nv40Ben Skeggs
2008-06-29nv50: hack of a TEX opcodeBen Skeggs
2008-06-29nv50: hacks for stuff I don't really get yetBen Skeggs
2008-06-29nv50: abuse constbuf upload for program uploadBen Skeggs