Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libdrm_nouveau is linked with the winsys, there's no good reason to do all
this through yet another layer.
|
|
|
|
|
|
|
|
|
|
|
|
This makes some code cleaner, and we can now easily
do CEIL and TRUNC.
|
|
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.
|
|
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.
|
|
Since we stopped using alloc_temp to get hw indices for FP attrs
there shouldn't be any non-deallocated temps left.
|
|
Since we know when we don't use a TEMP or FP ATTR register anymore,
we can release their hw resources early.
|
|
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.
|
|
|
|
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 ...
|
|
|
|
This would have happened in p.e. ADD TEMP[0], TEMP[0].xyxy, TEMP[1]
or RCP/RSQ TEMP[i], TEMP[i].
|
|
Depth output in fragment programs should end up in the first
register after the color outputs.
|
|
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]).
|
|
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.
|
|
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.
|
|
We could do even better (like just allocating 1 value in alloc_immd),
but that's fine for now I guess.
|
|
|
|
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.
|
|
|
|
|
|
Also implement context member functions to optimize away those
flushes whenever possible.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
|
|
|
|
this is so much nicer :)
|
|
Only allows clearing currently bound buffers, but colour and depth/stencil in
a single call.
|
|
|
|
|
|
|
|
|
|
I should have gotten most uses and implementation
correctly fixed, but things might break.
Feel free to blame me.
|
|
GeForce 8/9 are a bit more consistent than nv40 so far, so this was
overkill before.
|
|
|
|
Setup screen->pipe before using it (screen->constbuf =
screen->pipe.buffer_create(...))
|
|
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().
|
|
It's possible a state tracker will map/unmap a transfer object many times.
Delaying upload until the object is destroyed will prevent unnecessary
uploads to the GPU.
Also fixing a typo here, was unmapping the wrong buffer on transfer_unmap!
|
|
The template makefile that most libraries in
gallium included was based on dri and had a bunch
unrelevant junk in it.
Update it and improve the depending makefiles.
|