summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_cs.h
AgeCommit message (Collapse)Author
2011-02-10r300g: simplify WRITE_RELOC API and cleanupMarek Olšák
2011-01-08r300g: rework command submission and resource space checkingMarek Olšák
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.
2010-12-05r300g: cleanup winsysMarek Olšák
2010-12-03r300g: use internal BO handle for add_buffer and write_relocMarek Olšák
Small perf improvement in ipers. radeon_drm_get_cs_handle is exactly what this commit tries to avoid in every write_reloc.
2010-07-26r300g: fix macro substitution problemDave Airlie
isn't a problem yet, but have issues in hiz branch. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-16r300g: rebuild winsys and command submission to support multiple contextsMarek Olšák
2010-06-19r300g: more informative warning in END_CSMarek Olšák
2010-06-14r300g: drop begin_cs/end_csMarek Olšák
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.
2010-06-14r300g: simplify reloc macrosMarek Olšák
2010-06-14r300g: count CS dwords on debug builds onlyMarek Olšák
2010-06-13r300g: add API for building command buffersMarek Olšák
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).
2010-06-13r300g: inline FLUSH_CSMarek Olšák
The fewer macros, the better.
2010-06-13r300g: reorder CS macros and document them a littleMarek Olšák
2010-06-13r300g: drop DBG_CSMarek Olšák
I'd like the CS macros to be as lightweight as possible for performance reasons.
2010-06-13r300g: inline CHECK_CSMarek Olšák
2010-06-02r300g: use r300_buffer_domain everywhereMarek Olšák
2010-05-26r300g: add get_cs_info winsys entrypoint, abandon check_csMarek Olšák
2010-04-26r300g: Rudimentary stats, printed on exit.Corbin Simpson
Whoo!
2010-04-26r300g: Add CS table writing.Corbin Simpson
2010-03-21r300g: fix scons buildMarek Olšák
2010-03-15r300g: rebuild screen/winsys interfaceDave Airlie
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>
2010-02-22Revert "r300g: rebuild winsys/pipe buffer handling and add buffer map"Dave Airlie
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>
2010-02-22r300g: rebuild winsys/pipe buffer handling and add buffer mapDave Airlie
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>
2010-01-12r300g: silence a warningMarek Olšák
2009-12-09r300g: clean up r300_emit_aosMarek Olšák
2009-12-04r300g, radeong: fix the CS overflowMarek Olšák
2009-12-02r300g, radeong: De-specialize r300_winsys into radeon_winsys.Corbin Simpson
There's like five good reasons for this, I swear.
2009-11-07r300g: enable CS dumpingMaciej Cencora
2009-09-27r300g: add some debugging infoMaciej Cencora
2009-09-06r300g: Debug flags infrastructureNicolai Hähnle
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
2009-06-05r300-gallium: Mute some debug info.Corbin Simpson
Most of it is no longer interesting.
2009-05-20radeon-gallium: Don't permit reading and writing a BO in one CS.Corbin Simpson
This fixes some silent problems in current libdrm_radeon. surface_copy still locks up hard.
2009-05-01r300-gallium, radeon-winsys: Reorganize r300_winsys header, break ABI.Corbin Simpson
Make things more consistent, prepare for more function hooks.
2009-04-08r300-gallium: Properly emit indexbufs.Corbin Simpson
This fixes hardlocks with anything using elts.
2009-03-20r300-gallium: Misspelled macro name.Corbin Simpson
*pulls paper bag down over head*
2009-03-20r300-gallium: Put r300_cs_inlines to bed.Corbin Simpson
Guess it was a mistake in the first place. Oops.
2009-03-20r300-gallium: Simplify/neaten up packet3.Corbin Simpson
Deck chairs on the Hindenburg. :3
2009-02-16r300-gallium: Add verbosity level to debugging.Corbin Simpson
Makes it a bit more manageable to read through the console logs.
2009-02-15r300-gallium: Use fui instead of a roll-my-own.Corbin Simpson
Man, util/u_math just gets better by the day.
2009-02-06r300: Clean up CS counting.Corbin Simpson
2009-02-01r300: Unbreak emit, fix up a bunch of little things.Corbin Simpson
2009-02-01r300: attempt at trivial/clear on r5xxJoakim Sindholt
2009-02-01Ack, forgot to update the index again.Corbin Simpson
2009-02-01r300: A handful of thingys.Corbin Simpson
2009-02-01r300: Count BEGIN_CS, END_CS, warn if count is off.Corbin Simpson
2009-02-01r300: Working trivial/clear for RV410.Corbin Simpson
This might work for other people too.
2009-02-01BROKENCorbin Simpson
This commit is only to protect against data loss, so please skip it when bisecting. Thanks.
2009-02-01r300: Newlines, dammit!Corbin Simpson
2009-02-01r300: Add some useful debugging information; remove a couple compile warnings.Corbin Simpson
Deck chairs on the Titanic.
2009-02-01r300: Add num_vert_pipes (and remove busted num_pipes.)Corbin Simpson