summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_cs.h
Commit message (Collapse)AuthorAgeFilesLines
* r300g/winsys: rename r300->radeon and do a little cleanupMarek Olšák2011-04-181-4/+3
| | | | | Renaming a few files, types, and functions. Also make the winsys independent of r300g.
* r300g: simplify WRITE_RELOC API and cleanupMarek Olšák2011-02-101-33/+18
|
* r300g: rework command submission and resource space checkingMarek Olšák2011-01-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation behind this rework is to get some speed by reducing CPU overhead. The performance increase depends on many factors, but it's measurable (I think it's about 10% increase in Torcs). This commit replaces libdrm's radeon_cs_gem with our own implemention. It's optimized specifically for r300g, but r600g could use it as well. Reloc writes and space checking are faster and simpler than their counterparts in libdrm (the time complexity of all the functions is O(1) in nearly all scenarios, thanks to hashing). (libdrm's radeon_bo_gem is still being used in the driver.) It works like this: cs_add_reloc(cs, buf, read_domain, write_domain) adds a new relocation and also adds the size of 'buf' to the used_gart and used_vram winsys variables based on the domains, which are simply or'd for the accounting purposes. The adding is skipped if the reloc is already present in the list, but it accounts any newly-referenced domains. cs_validate is then called, which just checks: used_vram/gart < vram/gart_size * 0.8 The 0.8 number allows for some memory fragmentation. If the validation fails, the pipe driver flushes CS and tries do the validation again, i.e. it validates only that one operation. If it fails again, it drops the operation on the floor and prints some nasty message to stderr. cs_write_reloc(cs, buf) just writes a reloc that has been added using cs_add_reloc. The read_domain and write_domain parameters have been removed, because we already specify them in cs_add_reloc. The space checking has been tested by putting small values in vram/gart_size variables.
* r300g: cleanup winsysMarek Olšák2010-12-051-4/+4
|
* r300g: use internal BO handle for add_buffer and write_relocMarek Olšák2010-12-031-3/+3
| | | | | | | Small perf improvement in ipers. radeon_drm_get_cs_handle is exactly what this commit tries to avoid in every write_reloc.
* r300g: fix macro substitution problemDave Airlie2010-07-261-2/+2
| | | | | | isn't a problem yet, but have issues in hiz branch. Signed-off-by: Dave Airlie <airlied@redhat.com>
* r300g: rebuild winsys and command submission to support multiple contextsMarek Olšák2010-07-161-41/+32
|
* r300g: more informative warning in END_CSMarek Olšák2010-06-191-4/+8
|
* r300g: drop begin_cs/end_csMarek Olšák2010-06-141-4/+0
| | | | | | | | | | I have had a look at the libdrm sources and they just contain more or less the same checking we do in macros, and begin_cs may realloc the CS buffer if we overflow it, which never happens with r300g. So these are pretty much useless. There is a small but measurable performance increase by dropping the two functions.
* r300g: simplify reloc macrosMarek Olšák2010-06-141-14/+9
|
* r300g: count CS dwords on debug builds onlyMarek Olšák2010-06-141-17/+22
|
* r300g: add API for building command buffersMarek Olšák2010-06-131-0/+12
| | | | | | The idea is to build a hardware command buffer for every CSO and memcpy the buffer to a command stream at bind time (or dirty-state-emission time, to be precise).
* r300g: inline FLUSH_CSMarek Olšák2010-06-131-7/+0
| | | | The fewer macros, the better.
* r300g: reorder CS macros and document them a littleMarek Olšák2010-06-131-37/+42
|
* r300g: drop DBG_CSMarek Olšák2010-06-131-45/+0
| | | | | I'd like the CS macros to be as lightweight as possible for performance reasons.
* r300g: inline CHECK_CSMarek Olšák2010-06-131-4/+1
|
* r300g: use r300_buffer_domain everywhereMarek Olšák2010-06-021-5/+0
|
* r300g: add get_cs_info winsys entrypoint, abandon check_csMarek Olšák2010-05-261-1/+1
|
* r300g: Rudimentary stats, printed on exit.Corbin Simpson2010-04-261-0/+3
| | | | Whoo!
* r300g: Add CS table writing.Corbin Simpson2010-04-261-0/+7
|
* r300g: fix scons buildMarek Olšák2010-03-211-2/+1
|
* r300g: rebuild screen/winsys interfaceDave Airlie2010-03-151-5/+17
| | | | | | | | | | | | | | | | | | | | This creates a cleaner winsys and drop the simple screen stuff. It makes r300g use pb_bufmgr structs. It also tries to avoid overheads from mapping too often. v5: clean warnings v6: break out of cache check on first buffer - since most likely the first busy one implies all after it are busy. v7: cleanup a bit v8-merged: drop cman for now to just get all the interface changes in first. rework to changes that happened upstream Signed-off-by: Dave Airlie <airlied@redhat.com>
* Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"Dave Airlie2010-02-221-17/+5
| | | | | | | | | | This reverts commit fff5be8e7b4557c221f2425dcafc2e7cbbba76ba. Probably went too soon with this, dileX reported OA not working for him it works here fine, but the optimisations I wanted aren't working properly yet so I'll fix that now. Signed-off-by: Dave Airlie <airlied@redhat.com>
* r300g: rebuild winsys/pipe buffer handling and add buffer mapDave Airlie2010-02-221-5/+17
| | | | | | | | | | | | | This creates a cleaner winsys and drop the simple screen stuff. It makes r300g use pb_bufmgr structs and adds usage of the cached bufmgr for vertex/index buffers. It also avoids mapping too often. I'm not 100% sure this is perfect but it won't find its own bugs. Signed-off-by: Dave Airlie <airlied@redhat.com>
* r300g: silence a warningMarek Olšák2010-01-121-1/+1
|
* r300g: clean up r300_emit_aosMarek Olšák2009-12-091-0/+9
|
* r300g, radeong: fix the CS overflowMarek Olšák2009-12-041-1/+1
|
* r300g, radeong: De-specialize r300_winsys into radeon_winsys.Corbin Simpson2009-12-021-2/+3
| | | | There's like five good reasons for this, I swear.
* r300g: enable CS dumpingMaciej Cencora2009-11-071-2/+2
|
* r300g: add some debugging infoMaciej Cencora2009-09-271-10/+20
|
* r300g: Debug flags infrastructureNicolai Hähnle2009-09-061-9/+10
| | | | | | | | | | | So that debugging is no longer a full-spam-or-nothing approach, you are now supposed to set the RADEON_DEBUG environment flag just like for classic Mesa. The available debug flags are different, however. Just running an OpenGL application with RADEON_DEBUG set to an arbitrary string will print out helpful information. Everything must be compiled with -DDEBUG for any of this to work
* r300-gallium: Mute some debug info.Corbin Simpson2009-06-051-6/+13
| | | | Most of it is no longer interesting.
* radeon-gallium: Don't permit reading and writing a BO in one CS.Corbin Simpson2009-05-201-2/+3
| | | | | | This fixes some silent problems in current libdrm_radeon. surface_copy still locks up hard.
* r300-gallium, radeon-winsys: Reorganize r300_winsys header, break ABI.Corbin Simpson2009-05-011-9/+9
| | | | Make things more consistent, prepare for more function hooks.
* r300-gallium: Properly emit indexbufs.Corbin Simpson2009-04-081-0/+10
| | | | This fixes hardlocks with anything using elts.
* r300-gallium: Misspelled macro name.Corbin Simpson2009-03-201-1/+1
| | | | *pulls paper bag down over head*
* r300-gallium: Put r300_cs_inlines to bed.Corbin Simpson2009-03-201-1/+16
| | | | Guess it was a mistake in the first place. Oops.
* r300-gallium: Simplify/neaten up packet3.Corbin Simpson2009-03-201-3/+0
| | | | Deck chairs on the Hindenburg. :3
* r300-gallium: Add verbosity level to debugging.Corbin Simpson2009-02-161-5/+9
| | | | Makes it a bit more manageable to read through the console logs.
* r300-gallium: Use fui instead of a roll-my-own.Corbin Simpson2009-02-151-13/+3
| | | | Man, util/u_math just gets better by the day.
* r300: Clean up CS counting.Corbin Simpson2009-02-061-0/+1
|
* r300: Unbreak emit, fix up a bunch of little things.Corbin Simpson2009-02-011-2/+7
|
* r300: attempt at trivial/clear on r5xxJoakim Sindholt2009-02-011-2/+2
|
* Ack, forgot to update the index again.Corbin Simpson2009-02-011-3/+3
|
* r300: A handful of thingys.Corbin Simpson2009-02-011-2/+4
|
* r300: Count BEGIN_CS, END_CS, warn if count is off.Corbin Simpson2009-02-011-1/+5
|
* r300: Working trivial/clear for RV410.Corbin Simpson2009-02-011-2/+6
| | | | This might work for other people too.
* BROKENCorbin Simpson2009-02-011-5/+10
| | | | | This commit is only to protect against data loss, so please skip it when bisecting. Thanks.
* r300: Newlines, dammit!Corbin Simpson2009-02-011-3/+3
|
* r300: Add some useful debugging information; remove a couple compile warnings.Corbin Simpson2009-02-011-4/+12
| | | | Deck chairs on the Titanic.