Commit graph

4187 commits

Author SHA1 Message Date
Luca Barbieri
42d9f2bb7b nouveau: replace vtxbuf/idxbuf caps with BO_ flags in nouveau_screen and fix uncached reads on nv3x
Faster, simpler and more flexible.

Also, we set those flags properly on nv3x so that we don't allocate buffers in GART.

Since on AGP GART is uncached, OpenGL doesn't distinguish between vertex and index buffers, and we don't support hardware index buffers for now, this caused uncached reads.

Also check bind and not usage for PIPE_BIND_* flags, got broken in the gallium-resources transition.
2010-04-15 08:13:12 +02:00
Vinson Lee
18dc0f0b1c i915g: Remove unnecessary header. 2010-04-14 22:59:37 -07:00
Dave Airlie
7d93f2bf84 r300g: fix regression in texdepth.
texdepth stopped working when npot went in, this brings it back
to life.

< MostAwesomeDude> That looks like what I was going to do.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-15 14:56:20 +10:00
Brian Paul
8239fd4baa llvmpipe: comments for fence functions 2010-04-14 14:32:09 -06:00
Marek Olšák
d72f1c3b80 r300g: fix possible crash when shader compilation fails
This hopefully fixes the crash in the FDO bug #27634, not the bug itself.
2010-04-14 20:29:42 +02:00
Marek Olšák
ef19b2fbab r300g: simplify get_shader_constant to be rc-constant-state specific 2010-04-14 13:25:51 +02:00
Marek Olšák
ef745cf95d r300g: remove the CS compenstation for non-atomized states
Now there aren't any. If CS overflow occurs, the fix should go directly
before the problematic BEGIN_CS.
2010-04-14 04:48:19 +02:00
Marek Olšák
905fa3a07b r300g: remove always_dirty flag and correct leftovers 2010-04-14 04:48:19 +02:00
Marek Olšák
eb4e399ef0 r300g: atomize beginning occlusion query 2010-04-14 04:48:19 +02:00
Marek Olšák
3da70606b3 r300g: atomize VS constant buffer 2010-04-14 04:48:19 +02:00
Marek Olšák
abc2f29dd2 r300g: emit VS immediates along with VS code 2010-04-14 04:48:19 +02:00
Marek Olšák
6793506faa r300g: make setting up fragment depth output less hackish 2010-04-14 04:48:19 +02:00
Marek Olšák
36e0100e9e r300g: kill off r300_fragment_shader::shadow_samplers and friends 2010-04-14 04:48:19 +02:00
José Fonseca
d2c5a3093f trace: Ignore transfer_flush_region too. 2010-04-14 10:22:57 +09:00
Jakob Bornecrantz
4e20781bac i915g: Whitespace & formating 2010-04-13 23:57:43 +01:00
Jakob Bornecrantz
136bcf6cee i915g: Mark shared layouts more clearly 2010-04-13 23:52:26 +01:00
Jesse Barnes
1318848f78 Merge branch '7.8' 2010-04-13 09:40:14 -07:00
Alan Hourihane
efc69ca61c llvmpipe: disable half float formats 2010-04-13 15:40:49 +01:00
Luca Barbieri
a79521d497 nvfx: use dynamically sized rotating BO pool for fragment programs
Currently we used a single buffer for each fragment programs, leading to
rendering synchronization. This patch uses a doubly linked list of BOs,
which is dynamically resized if all the BOs are busy.

Note that inline image transfers could be an alternative option: this
will be explored later.

This removes one of the big performance limitations of the current
driver.

We also stop using pipe_resource internally in favor of using nouveau_bo
directly.
2010-04-13 09:55:49 +02:00
Vinson Lee
8316da7cd2 r300g: Silence uninitialized variable warning. 2010-04-13 00:35:10 -07:00
Luca Barbieri
50409dd71b nvfx: fix for 64-bit systems
Thanks to Patrice Mandin for debugging this.
2010-04-13 09:03:15 +02:00
Marek Olšák
745c4b5685 r300g: add generating texture coordinates for point sprites
[airlied -
	Convert sprite coord index to a per-coord enable bit
	set the rasteriser block up correctly for point sprites.

The inputs to the RS hw block change for sprite coords, so fix them up
properly - this fixes piglit point-sprite test.
]

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-13 09:18:47 +10:00
Luca Barbieri
70fe9fd007 nvfx: add LRP in vertprog
glsl generates these.
2010-04-12 23:43:40 +02:00
Luca Barbieri
b385a31452 nvfx: add SIN and COS in vertprog 2010-04-12 23:43:39 +02:00
Luca Barbieri
d2e3942531 nvfx: add missing vertprog setcond instructions
Trivially adds SEQ, SGT, SLE, SNE, SFL, STR and SSG which were missing.
2010-04-12 23:43:22 +02:00
Luca Barbieri
6f65dcfb9f nvfx: allocate a bigger block for queries
This patch allocates a bigger chunk of memory to store queries in,
increasing the (hidden) outstanding query limit.
2010-04-12 23:36:21 +02:00
Luca Barbieri
9ad385fef9 nvfx: support an unlimited number of occlusion queries
Currently on nv30/nv40 an assert will be triggered once 32 queries are
outstanding.

This violates the OpenGL/Gallium interface, which requires support for
an unlimited number of fences.

This patch fixes the problem by putting queries in a linked list and
waiting on the oldest one if allocation fails.

nVidia seems to use a similar strategy, but with 1024 instead of 32 fences.
The next patch will improve this.
2010-04-12 23:36:21 +02:00
Vinson Lee
202760b437 r300g: Move declaration before code.
Fixes SCons build.
2010-04-12 12:50:41 -07:00
Luca Barbieri
31268d2107 nvfx: fix TXL opcode value
Was broken during unification
2010-04-12 20:48:52 +02:00
Luca Barbieri
7fc7b75995 nvfx: Add support for two sided color
This patch adds support for two-sided vertex color to nv30/nv40.

When set, the COLOR0/1 fs inputs on back faces will be wired to vs outputs BCOLOR0/1.
This makes OpenGL two sided lighting work, which can be tested with progs/demos/projtex.
2010-04-12 20:46:18 +02:00
Luca Barbieri
a2ddae0fc3 nvfx: fix compile error 2010-04-12 20:43:26 +02:00
Luca Barbieri
6d6acaebad nvfx: don't use hw index buffers on nv3x and nv44
They only apparently work on nv40 grclass cards, and this was the
previous behavior of the driver.

This really needs to be investigated more.
2010-04-12 20:39:09 +02:00
Luca Barbieri
f9397f34b6 nvfx: expose PIPE_FORMAT_B8G8R8X8_UNORM support
This is implemented in nvfx_state_fb and fragtex but was missing
in nvfx_screen.

This allows to avoid glCopyTexSubImage CPU fallbacks and makes Doom 3
much faster as a result.
2010-04-12 20:23:02 +02:00
Luca Barbieri
44ef1577be nvfx: add support for ARB_half_float_vertex 2010-04-12 20:20:02 +02:00
Luca Barbieri
f9c665e9e6 nvfx: allocate buffers in GART if !NOUVEAU_SWTNL
Should improve performance and fix serious regressions on AGP cards.
2010-04-12 18:53:30 +02:00
Luca Barbieri
8f0d5382e3 nvfx: move check for NOUVEAU_SWTNL 2010-04-12 18:06:06 +02:00
Luca Barbieri
f647f46e03 nvfx: remove #include "nouveau_stateobj.h"
No longer used, finally!
2010-04-12 12:21:25 +02:00
Luca Barbieri
330925d911 nvfx: rework validation logic to use code and avoid stateobjs
This makes the code faster due to the lack of indirect calls and also
makes it much easier to understand what is actually going on.
2010-04-12 12:21:25 +02:00
Luca Barbieri
26e40448be nvfx: add NVFX_NEW_{FRAG,VERT}CONST 2010-04-12 12:13:23 +02:00
Luca Barbieri
5eb6b1a981 nvfx: so->RING_3D: vertprog
We could use an sb here instead, but there is no obvious performance
advantage, and perhaps there could be a disadvantage.
2010-04-12 12:13:23 +02:00
Luca Barbieri
f768528af5 nvfx: so->RING_3D: sr 2010-04-12 12:13:17 +02:00
Luca Barbieri
4b3b54d746 nvfx: so->sb: blend 2010-04-12 12:13:17 +02:00
Luca Barbieri
180654d2bb nvfx: so->sb: zsa 2010-04-12 12:13:17 +02:00
Luca Barbieri
cbe8ed435a nvfx: so->sb: rasterizer 2010-04-12 12:13:17 +02:00
Luca Barbieri
c8201c833c nvfx: so->RING_3D: screen 2010-04-12 12:13:17 +02:00
Luca Barbieri
4dbd029a76 nvfx: so->RING_3D: viewport 2010-04-12 12:13:17 +02:00
Luca Barbieri
f8f29e6191 nvfx: so->RING_3D: stipple 2010-04-12 12:13:17 +02:00
Luca Barbieri
5c89cb0f6c nvfx: so->RING_3D: scissor 2010-04-12 12:13:16 +02:00
Luca Barbieri
6558797f99 nvfx: so->RING_3D: blend 2010-04-12 12:13:16 +02:00
Luca Barbieri
f320176b71 nvfx: so->RING_3D: fb 2010-04-12 12:13:16 +02:00