Commit graph

201327 commits

Author SHA1 Message Date
Brian
299dffce4f Cell: wait_on_mask_all() 2008-01-10 21:59:15 -07:00
Brian
aee5f471ce Cell: remove unneeded #includes 2008-01-10 21:53:38 -07:00
Brian
71caa922e0 Cell: compute bounding box in cell_vbuf_draw() 2008-01-10 21:50:55 -07:00
Brian
ea190f4b41 Cell: remove unused color field 2008-01-10 21:50:31 -07:00
Brian
6059ecaabe Cell: remove unused code 2008-01-10 21:37:55 -07:00
Brian
c56b20971b Cell: make vertex_header and prim_header types private to tri.c 2008-01-10 21:35:13 -07:00
Brian
44f4b9b9ea Cell: avoid copying vertex data 2008-01-10 21:22:03 -07:00
Brian
02f6f9f8d4 Cell: move tile-related code into new tile.[ch] files. 2008-01-10 17:30:51 -07:00
Brian
6c11485405 Cell: use new ASSERT macro instead of standard assert
The later doesn't seem to work properly in SPU code.
2008-01-10 17:14:06 -07:00
Brian
b324722542 Cell: enable vbuf path by default 2008-01-10 17:03:21 -07:00
Brian
152f1d84d4 Cell: checkpoint: draw_vbuf code in place and works, but not enabled by default yet. 2008-01-10 17:01:52 -07:00
Brian
cac8892ddb Additional parameters to vbuf_render->draw()
Pass complete information about vertex/index buffer location, size, etc.
2008-01-10 17:01:11 -07:00
Eric Anholt
540faf5f91 [965] Remove an open-coded memcpy. 2008-01-10 15:05:39 -08:00
Eric Anholt
9bf9122925 [intel] Remove gratuitous (batchbuffer) flush before doing buffer clears.
Increases OA performance by about 3%.
2008-01-10 14:51:02 -08:00
Eric Anholt
3d273ae44e [intel] Report buffer size when allocating with INTEL_DEBUG=bufmgr and TTM. 2008-01-10 14:43:43 -08:00
Eric Anholt
609ad99a1a [965] Improve performance by allocating CURBE buffers a page at a time.
Since each one is only 64b, and kernel allocations are a page anyway, this
lets us reduce buffer allocation by packing many CURBEs into one buffer, for
each batchbuffer submitted.  Improves openarena performance by around 10%.
2008-01-10 14:43:16 -08:00
Brian
763e30748e Cell: initial implementation of vbuf code.
The draw module's vbuf stage builds buffers of post-transformed vertices
and issues draw-elements calls to render them.  We'll pass the vertex and
index buffers to the SPUs...
2008-01-10 15:14:58 -07:00
Brian
2da5afbd3f Cell: call draw_compute_vertex_size() 2008-01-10 15:13:14 -07:00
Eric Anholt
4e5b3626a1 [intel] Remove a gratuitous flush at the end of ClearWithTris. 2008-01-10 13:46:49 -08:00
Eric Anholt
ab2933df65 [intel] Only flush batch when changing draw buffers, not every cliprect update.
The previous code would reference freed memory on window moves.
2008-01-10 13:24:14 -08:00
Eric Anholt
a04b632350 [intel] Add more cliprect modes to cover other meanings for batch emits.
The previous change gave us only two modes, one which looped over the batch
per cliprect (3d drawing) and one that didn't (state updeast).
However, we really want 4:

- Batch doesn't care about cliprects (state updates)
- Batch needs DRAWING_RECTANGLE looping per cliprect (3d drawing)
- Batch needs to be executed just once (region fills, copies, etc.)
- Batch already includes cliprect handling, and must be flushed by unlock time
  (copybuffers, clears).

All callers should now be fixed to use one of these states for any batchbuffer
emits.  Thanks to Keith Whitwell for pointing out the failure.
2008-01-10 12:34:08 -08:00
Brian
cd89fe2d39 Cell: s/free/align_free/ 2008-01-10 11:26:20 -07:00
Brian
d07b86dedf Cell: clean-up cell_spu_exit() code 2008-01-10 11:26:20 -07:00
Brian
e6b33b6f35 bump CELL_MAX_VERTS to 240 2008-01-10 11:26:20 -07:00
Brian
3d9c84c1b8 comment about vertex data in emit_vertex() 2008-01-10 11:25:25 -07:00
Brian
fd8b5ede95 clean-up comments, code 2008-01-10 11:25:25 -07:00
Michel Dänzer
ede7b00b59 softpipe: Simplify texture memory layout. 2008-01-10 10:06:00 +01:00
Michel Dänzer
51ea675745 Add glapi/ path for inclusion of glapioffsets.h.
Not sure why this is only needed now...
2008-01-10 10:06:00 +01:00
Xiang, Haihao
7086df5868 i965: fix bug #14002 2008-01-10 16:48:33 +08:00
Xiang, Haihao
c30392f187 i965: fix segfault caused by commit e131c46b20. 2008-01-10 16:45:35 +08:00
Kristian Høgsberg
e131c46b20 [intel] Simplify intelCreateBuffer() a bit.
Drop a bunch of unused arguments from intel_create_renderbuffer() and
introduce intel_renderbuffer_set_region() to set the region for
a renderbuffer.
2008-01-09 20:43:18 -05:00
Kristian Høgsberg
33c42c1262 [intel] Prepare intelCopyBuffer() for private back buffers. 2008-01-09 20:43:18 -05:00
Brian
d23869a88a Cell: initial implementation of tile status optimizations
Tiles are marked as CLEAR, DEFINED or DIRTY to avoid making unnecessary
get_tile() and put_tile() calls.
2008-01-09 17:50:37 -07:00
Brian
18b0f34521 Cell: start using DMA tags in a more sensible way, move waits() later when possible. 2008-01-09 17:50:37 -07:00
Brian
c7a22c3979 move cliprect bounds, do trivial rejection triangle clipping 2008-01-09 17:50:37 -07:00
Brian
d48c6e7b21 Cell: remove some debug printfs, predicate others with Debug boolean 2008-01-09 17:50:37 -07:00
Brian
abee68a722 Cell: implemement basic Z testing
Also, improve some surface clearing code
2008-01-09 17:50:37 -07:00
Jerome Glisse
934468296c softpipe: map only once in softpipe_map_surfaces
softpipe_map_surfaces get call several time but softpipe_unmap_surfaces
get call only once. So to make sure stuff are properly unmap when
softpipe_unmap_surfaces get call we map surfaces only one time in
softpipe_map_surfaces.
2008-01-10 01:14:07 +01:00
Kristian Høgsberg
24e7e45768 Factor out code to do the DRM_I830_GETPARAM ioctl. 2008-01-09 19:08:55 -05:00
Kristian Høgsberg
f1139e4c66 Fold DoBindContext() helper function into driBindContext(). 2008-01-09 19:08:55 -05:00
Eric Anholt
4225876bf0 [intel] Re-allocate backing buffer objects on BufferData.
This may allow better concurrency (noop in openarena performance now), but is
also important for the previous commit -- otherwise, we may end up with
BufferData, draw_prims, BufferData and the draw_prims would use the new VBO
data instead of old.  This could still occur with user-supplied VBOs and poor
use of MapBuffer without BufferData.
2008-01-09 14:41:55 -08:00
Eric Anholt
7da98d7eba [965] Allow more than one draw_prims per batchbuffer.
The comment about (vbo)_exec_api.c appeared to be stale, as the VBO code seems
to only use non-named VBOs (not actual VBOs) or freshly-allocated VBO data.

This brings a 2x speedup to openarena, because we can submit nearly-full
batchbuffers instead of many 450-byte ones.
2008-01-09 14:41:54 -08:00
Eric Anholt
dc1608ae9d [965] Replace the always_update dirty flag with BRW_NEW_BATCH.
This allows us to avoid re-emitting some state when validate_state happens
multiple times per batchbuffer.  Even though we flush batch per primitive
currently, that may still happen already if the primitive changed (this should
probably be fixed as well).
2008-01-09 14:41:53 -08:00
Eric Anholt
5f86ae057a [intel] Rename lost_hardware vtbl entry to new_batch.
Both drivers have ended up relying on lost_hardware being called after each
batch buffer, so update the name.  This removes one of the calls on 965 whic
h was outside of the batchbuffer handling code and just duplicating what had
already happened through batchbuffer handling.
2008-01-09 14:41:42 -08:00
Eric Anholt
d9edd8e905 [965] Remove drawing rect upload, which is handled (better) by the kernel. 2008-01-09 14:41:41 -08:00
Eric Anholt
beddf653a9 [intel] Clean up cliprect handling in intel drivers.
In particular, batch buffers are no longer flushed when switching from
CLIPRECTS to NO_CLIPRECTS or vice versa, and 965 just uses DRM cliprect
handling for primitives instead of trying to sneak in its own to avoid the
DRM stuff. The disadvantage is that we will re-execute state updates per
cliprect, but the advantage is that we will be able to accumulate larger
batch buffers, which were proving to be a major overhead.
2008-01-09 14:41:40 -08:00
Eric Anholt
7ce12b0863 [intel] Remove the dead intel->need_flush member. 2008-01-09 14:41:39 -08:00
Eric Anholt
5a49e84fcd [965] Clarify a bit of index buffer upload code. 2008-01-09 14:41:38 -08:00
Brian
8c4806ccc4 fix bug 13978: glDrawBuffersARB() didn't set all necessary state 2008-01-09 14:20:51 -07:00
Eric Anholt
c0fd6a0903 [intel] Add TTM bufmgr debug for type or offset migration of buffers. 2008-01-08 10:08:54 -08:00