summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_flush.c
Commit message (Collapse)AuthorAgeFilesLines
* winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOMMarek Olšák2011-09-161-1/+1
| | | | so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.
* winsys/radeon: remove usage parameter from buffer_createMarek Olšák2011-07-251-1/+0
|
* winsys/radeon: add R300 infix to winsys feature namesMarek Olšák2011-07-251-1/+1
|
* r300g: dynamically ask for and release Hyper-Z accessMarek Olšák2011-05-151-24/+58
| | | | | We ask for Hyper-Z access when clearing a zbuffer. We release it if no zbuffer clear has been done for 2 seconds.
* r300g/winsys: rename r300->radeon and do a little cleanupMarek Olšák2011-04-181-3/+3
| | | | | Renaming a few files, types, and functions. Also make the winsys independent of r300g.
* gallium: remove flags from the flush functionMarek Olšák2011-03-111-2/+0
| | | | | | | | | | 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.
* r300g: decide whether a flush should be asynchronous when calling itMarek Olšák2011-03-081-10/+15
| | | | Thread offloading is not sometimes desirable, e.g. when mapping a buffer.
* r300g: require DRM 2.3.0 (kernel 2.6.34)Marek Olšák2011-03-021-1/+1
| | | | Running any older kernel is not recommended anyway.
* r300g: remove tracking whether vertex buffers need to be validatedMarek Olšák2011-02-181-4/+0
| | | | | This was getting hard to maintain and didn't really bring any real benefits. Instead, validate buffers when the vertex array state is dirty.
* r300g: offload the CS ioctl to another threadMarek Olšák2011-02-151-0/+4
| | | | | | | | | | 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
* r300g: implement fences using dummy relocationsMarek Olšák2011-02-151-11/+24
| | | | So finally we have them.
* r300g: do not track whether occlusion queries have been flushedMarek Olšák2011-02-141-6/+0
| | | | The winsys takes care of flushing automatically.
* r300g: emit 3D_LOAD_VBPNTR only when necessaryMarek Olšák2011-02-141-0/+1
| | | | | I thought I couldn't skip emitting this packet in some cases. Well it looks like I can.
* r300g: do not flush the uploaderMarek Olšák2011-02-061-3/+0
| | | | | We don't have to unmap and recreate the upload buffer when a flush occurs. This should also prevent buffer allocations from failing.
* r300g: rework command submission and resource space checkingMarek Olšák2011-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: skip buffer validation of upload buffers when appropriateMarek Olšák2011-01-061-0/+2
| | | | because the upload buffers are reused for subsequent draw operations.
* r300g: validate buffers only if any of bound buffers is changedMarek Olšák2010-12-071-0/+2
| | | | This prevents needless buffer validation (CS space checking).
* r300g: optimize looping over atomsMarek Olšák2010-12-051-2/+2
| | | | This also removes DBG_STATS (the stats can be obtained with valgrind instead).
* r300g: add capability bit index_bias_supportedMarek Olšák2010-12-031-1/+1
| | | | .. instead of calling r500_index_bias_supported(..) every draw call.
* r300g: fix SWTCLMarek Olšák2010-09-131-1/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=29901
* r300g: reset the index bias to 0 at the end of CSMarek Olšák2010-08-251-0/+3
|
* r300g: avoid stall in no-tcl drawing when mapping vboDave Airlie2010-08-231-0/+2
| | | | | | | | | 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>
* r300g: fix cbzb clears when hyperz is offMarek Olšák2010-08-071-2/+1
|
* r300g: implement hyper-z support. (v4)Dave Airlie2010-08-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* r300g/swtcl: fix crash in ETQW and minor fixupsMarek Olšák2010-07-291-8/+0
| | | | | | | 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.
* r300g: u_upload optimisationDave Airlie2010-07-181-0/+4
| | | | fix vb/ib uploads
* r300g: rebuild winsys and command submission to support multiple contextsMarek Olšák2010-07-161-1/+1
|
* r300g: implement fast color clearMarek Olšák2010-07-121-0/+1
| | | | | | | | | | | | | | | 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
* r300g: ugly fix of a hardlock in the cubestorm xscreensaverMarek Olšák2010-07-121-3/+1
| | | | FDO bug #28563.
* r300g: inline FLUSH_CSMarek Olšák2010-06-131-3/+4
| | | | The fewer macros, the better.
* r300g: fix fence referencingMarek Olšák2010-05-261-0/+1
|
* r300g: implement fake but compliant fencesMarek Olšák2010-05-261-33/+5
|
* r300g: remove r300_flush.hMarek Olšák2010-05-251-1/+0
|
* r300g: implement flush+sync (AKA glFinish)Marek Olšák2010-05-161-0/+36
| | | | See comments in the code.
* r300g: fix emission of some non-CSO atoms at the beginning of CSMarek Olšák2010-05-151-1/+1
|
* r300g: fix BO space accounting for occlusion queriesMarek Olšák2010-05-151-2/+2
|
* r300g: various other cleanupsMarek Olšák2010-04-181-1/+0
| | | | | | 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.
* r300g: atomize beginning occlusion queryMarek Olšák2010-04-141-1/+0
|
* r300g: atomize VS constant bufferMarek Olšák2010-04-141-1/+1
|
* r300g: simplify accessing screen from contextMarek Olšák2010-04-051-1/+1
|
* r300g: disable emitting the HWTCL-related state when SWTCL is in useMarek Olšák2010-03-071-0/+6
| | | | Now SWTCL renders at least "something", we're close...
* r300g: Remove unnecessary headers.Vinson Lee2010-01-271-1/+0
|
* r300g: Make invariant state into an atom.Corbin Simpson2010-01-191-1/+0
|
* Merge branch 'mesa_7_7_branch'Jakob Bornecrantz2010-01-141-0/+1
|\ | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c src/gallium/auxiliary/util/Makefile src/gallium/drivers/r300/r300_state_derived.c
| * r300g: Silence unused variable warnings.Vinson Lee2010-01-081-0/+1
| |
* | r300g: mark all states as dirty after flushMarek Olšák2010-01-121-0/+9
|/ | | | It fixes almost all regressions introduced lately.
* r300g: Check for NULL Draw during flush.Corbin Simpson2009-10-221-2/+4
| | | | Split from the fastpath WIP.
* r300g: Cleanup header includes.Corbin Simpson2009-10-211-0/+7
|
* r300g: Fix up a bunch of warnings.Corbin Simpson2009-10-181-0/+2
|
* r300g: port over last parts of oq support.Dave Airlie2009-10-141-0/+2
| | | | | | | | 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.