summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_flush.c
AgeCommit message (Collapse)Author
2011-03-11gallium: remove flags from the flush functionMarek Olšák
The drivers have been changed so that they behave as if all of the flags were set. This is already implicit in most hardware drivers and required for multiple contexts. Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag to decide whether flush_frontbuffer should be called. New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
2011-03-08r300g: decide whether a flush should be asynchronous when calling itMarek Olšák
Thread offloading is not sometimes desirable, e.g. when mapping a buffer.
2011-03-02r300g: require DRM 2.3.0 (kernel 2.6.34)Marek Olšák
Running any older kernel is not recommended anyway.
2011-02-18r300g: remove tracking whether vertex buffers need to be validatedMarek Olšák
This was getting hard to maintain and didn't really bring any real benefits. Instead, validate buffers when the vertex array state is dirty.
2011-02-15r300g: offload the CS ioctl to another threadMarek Olšák
This is a multi-threading optimization which hides the kernel overhead behind a thread. It improves performance in CPU-limited apps by 2-15%. Of course you must have at least 2 cores for it to make any difference. It can be disabled with: export RADEON_THREAD=0
2011-02-15r300g: implement fences using dummy relocationsMarek Olšák
So finally we have them.
2011-02-14r300g: do not track whether occlusion queries have been flushedMarek Olšák
The winsys takes care of flushing automatically.
2011-02-14r300g: emit 3D_LOAD_VBPNTR only when necessaryMarek Olšák
I thought I couldn't skip emitting this packet in some cases. Well it looks like I can.
2011-02-06r300g: do not flush the uploaderMarek Olšák
We don't have to unmap and recreate the upload buffer when a flush occurs. This should also prevent buffer allocations from failing.
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.
2011-01-06r300g: skip buffer validation of upload buffers when appropriateMarek Olšák
because the upload buffers are reused for subsequent draw operations.
2010-12-07r300g: validate buffers only if any of bound buffers is changedMarek Olšák
This prevents needless buffer validation (CS space checking).
2010-12-05r300g: optimize looping over atomsMarek Olšák
This also removes DBG_STATS (the stats can be obtained with valgrind instead).
2010-12-03r300g: add capability bit index_bias_supportedMarek Olšák
.. instead of calling r500_index_bias_supported(..) every draw call.
2010-09-13r300g: fix SWTCLMarek Olšák
https://bugs.freedesktop.org/show_bug.cgi?id=29901
2010-08-25r300g: reset the index bias to 0 at the end of CSMarek Olšák
2010-08-23r300g: avoid stall in no-tcl drawing when mapping vboDave Airlie
the current code reuses the same vbo over and over, however after a flush we'd stall and wait for mapping on the vbo when we should just fire and forget. On a gears test this brings me from ~620 to ~750 on my rv530 in swtcl mode. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-08-07r300g: fix cbzb clears when hyperz is offMarek Olšák
2010-08-05r300g: implement hyper-z support. (v4)Dave Airlie
This implements fast Z clear, Z compression, and HiZ support for r300->r500 GPUs. It also allows cbzb clears when fast Z clears are being used for the ZB. It requires a kernel with hyper-z support. Thanks to Marek Olšák <maraeo@gmail.com>, who started this off, and Alex Deucher at AMD for providing lots of hints. v2: squashed zmask ram size fix] squashed r300g/blitter: fix Z readback when compressed] v3: rebase around texture changes in master - .1 fix more bits v4: migrated to using u_mm in r300_texture to manage hiz/zmask rams consistently disabled HiZ when using OQ flush z-cache before turning hyper-z off update hyper-z state on dsa state change store depthclearvalue across cbzb clears and replace it afterwards. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-07-29r300g/swtcl: fix crash in ETQW and minor fixupsMarek Olšák
The Draw flush inside r300_flush was the culprit. Also, no need to flush Draw when changing a state since the flush is already inside swtcl_draw_vbo.
2010-07-18r300g: u_upload optimisationDave Airlie
fix vb/ib uploads
2010-07-16r300g: rebuild winsys and command submission to support multiple contextsMarek Olšák
2010-07-12r300g: implement fast color clearMarek Olšák
An initial implementation made by Dave Airlie. For it to be used, a color-only clear must be invoked and exactly one point-sampled render target must be set. The render target must be macrotiled (for us to overcome alignment issues) and bpp must be either 16 or 32. I can't see a difference in performance. :( Conflicts: src/gallium/drivers/r300/r300_blit.c
2010-07-12r300g: ugly fix of a hardlock in the cubestorm xscreensaverMarek Olšák
FDO bug #28563.
2010-06-13r300g: inline FLUSH_CSMarek Olšák
The fewer macros, the better.
2010-05-26r300g: fix fence referencingMarek Olšák
2010-05-26r300g: implement fake but compliant fencesMarek Olšák
2010-05-25r300g: remove r300_flush.hMarek Olšák
2010-05-16r300g: implement flush+sync (AKA glFinish)Marek Olšák
See comments in the code.
2010-05-15r300g: fix emission of some non-CSO atoms at the beginning of CSMarek Olšák
2010-05-15r300g: fix BO space accounting for occlusion queriesMarek Olšák
2010-04-18r300g: various other cleanupsMarek Olšák
It seems to me that the resource management code is the most blurry. Also some of my notes about fastfill are wrong, removing them too.
2010-04-14r300g: atomize beginning occlusion queryMarek Olšák
2010-04-14r300g: atomize VS constant bufferMarek Olšák
2010-04-05r300g: simplify accessing screen from contextMarek Olšák
2010-03-07r300g: disable emitting the HWTCL-related state when SWTCL is in useMarek Olšák
Now SWTCL renders at least "something", we're close...
2010-01-27r300g: Remove unnecessary headers.Vinson Lee
2010-01-19r300g: Make invariant state into an atom.Corbin Simpson
2010-01-14Merge branch 'mesa_7_7_branch'Jakob Bornecrantz
Conflicts: src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/util/Makefile src/gallium/drivers/r300/r300_state_derived.c
2010-01-12r300g: mark all states as dirty after flushMarek Olšák
It fixes almost all regressions introduced lately.
2010-01-08r300g: Silence unused variable warnings.Vinson Lee
2009-10-22r300g: Check for NULL Draw during flush.Corbin Simpson
Split from the fastpath WIP.
2009-10-21r300g: Cleanup header includes.Corbin Simpson
2009-10-18r300g: Fix up a bunch of warnings.Corbin Simpson
2009-10-14r300g: port over last parts of oq support.Dave Airlie
Add support for begin/end in each CS so we don't get any other processes rendering in between. TODO: blame other parts of driver for this not working like Z.
2009-10-14r300g: fixup arb occulsion query support.Dave Airlie
1: add rv530 support - num z pipes cap - add proper start/finish query options for rv530 2: convert to use linked list properly. 3: add flushing required check. 4: initial Z top disabling support. TODO: make it actually work on my rv530.
2009-07-01r300g: Fix recursive Draw flush.Corbin Simpson
Also just noticed that demos/copypix walks around the overlapping blit rules. Bad, bad Mesa. :3
2009-04-26r300-gallium: Add a draw_flush() to r300_flush().Mathias Gottschlag
This fixes some missing primitives which had been drawn right before the next glClear().
2009-03-17r300-gallium: Emit invariant state, no matter what.Corbin Simpson
It's called "invariant" for a reason. :3
2009-02-01r300: Add r300_flush.Corbin Simpson
Haha, I always do this.