summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_flush.c
AgeCommit message (Collapse)AuthorFilesLines
2016-07-19gallium/radeon: remove RADEON_FLUSH_KEEP_TILING_FLAGS flagMarek Olšák1-2/+0
always set Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-03-20gallium/radeon: remove old CS tracingMarek Olšák1-3/+3
Cons: - it was only integrated in r600g - it doesn't work with GPUVM - it records buffer contents at the end of IBs instead of at the beginning, so the replay isn't exact - it lacks an IB parser and user-friendliness A better solution is apitrace in combination with gallium/ddebug, which has a complete IB parser and can pinpoint hanging CP packets. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2016-03-01r300g: remove support for DRM < 2.12.0Marek Olšák1-4/+2
2015-01-28gallium: Replace u_simple_list.h with util/simple_list.hEric Anholt1-1/+1
The code was exactly the same, except util/ has c++ guards and a struct simple_node declaration. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-04-16gallium/radeon: create and return a fence in the flush functionMarek Olšák1-10/+9
All flush functions get a fence parameter. cs_create_fence is removed. Reviewed-by: Christian König <christian.koenig@amd.com>
2013-10-25winsys/radeon: add the implementation of fences from r300gMarek Olšák1-10/+3
2013-05-04gallium: fix type of flags in pipe_context::flush()Chia-I Wu1-1/+1
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> [olv: document the parameter now that the type is unsigned]
2013-04-25winsys/radeon: consolidate tracing into winsys v2Jerome Glisse1-3/+3
This move the tracing timeout and printing into winsys and add an debug environement variable for it (R600_DEBUG=trace_cs). Lot of file touched because of winsys API changes. v2: Do not write lockup file if ib uniq id does not match last one Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-01-06r300g: implement MSAAMarek Olšák1-0/+8
This is not as optimized as r600g - the MSAA compression is missing, so r300g needs a lot of bandwidth (more than r600g to do the same thing). However, if the bandwidth is not an issue for you, you can enjoy this unoptimized MSAA support. The only other missing optimization for MSAA is the fast color clear. MSAA is enabled on r500 only, because that's the only GPU family I tested. That said, MSAA should work on r300 and r400 as well (but you must set RADEON_MSAA=1 to allow it, then turn MSAA on in your app or set GALLIUM_MSAA=n, n >= 2, n <= 6) I will enable the support by default on r300-r400 once someone (other than me) tests those chipsets with piglit. The supported modes are 2x, 4x, 6x. The supported MSAA formats are RGBA8, BGRA8, and RGBA16F (r500 only). Those 3 formats are used for all GL internal formats. Tested with piglit. (I have ported all MSAA tests to GL2.1)
2013-01-04r300g/swtcl: simplify vertex uploadingMarek Olšák1-3/+0
- skip the vertex buffer reallocation in flush and just use the unsynchronized flag to get new memory. - remove the cruft needed to get around the issues with the vertex buffer reallocation in flush - use pb_buffer instead of pipe_resource
2013-01-04gallium/radeon: send the END_OF_FRAME flag to the DRMMarek Olšák1-1/+3
2013-01-04gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák1-1/+2
Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2012-12-12winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr insteadMarek Olšák1-2/+1
2012-12-01r300g: fix revoking hyperz accessMarek Olšák1-20/+22
The bug was uncovered by 67c8e96f5ace67f9c17556934ee9532877d3a00. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57763
2012-12-01r300g: fix comparison of hyperz flush time.Dave Airlie1-1/+1
I haven't confirmed this is doing the correct thing, but at least this might make someone review it! Reported by internal RH coverity scan. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
2012-01-10Squash-merge branch 'gallium-clip-state'Marek Olšák1-0/+1
Conflicts: src/gallium/auxiliary/tgsi/tgsi_strings.c src/mesa/state_tracker/st_atom_clip.c commit d919791f2742e913173d6b335128e7d4c63c0840 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 17:59:22 2012 +0100 d3d1x: adapt to new clip state commit cfec82bca3fefcdefafca3f4555285ec1d1ae421 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:16:51 2012 +0100 gallium/docs: update for clip state changes commit c02bfeb81ad9f62041a2285ea6373bbbd602912a Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 14:21:43 2012 +0100 tgsi: add TGSI_PROPERTY_PROHIBIT_UCPS commit d4e0a785a6a23ad2f6819fd72e236acb9750028d Author: Brian Paul <brianp@vmware.com> Date: Thu Jan 5 08:30:00 2012 -0700 tgsi: consolidate TGSI string arrays in new tgsi_strings.h There was some duplication between the tgsi_dump.c and tgsi_text.c files. Also use some static assertions to help catch errors when adding new TGSI values. v2: put strings in tgsi_strings.c file instead of the .h file. Reviewed-by: Dave Airlie <airlied@redhat.com> commit c28584ce0d8c62bd92c8f140729d344f88a0b3cd Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Fri Jan 6 12:48:09 2012 +0100 gallium: extend user_clip_plane_enable to apply to clip distances commit f1d5016c07f786229ed057effbe55fbfd160b019 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 02:39:09 2012 +0100 nvfx: adapt to new clip state commit 6f6fa1c26bd19f797c1996731708e3569c9bfe24 Author: Marek Olšák <maraeo@gmail.com> Date: Fri Jan 6 01:41:39 2012 +0100 st/mesa: fix DrawPixels with GL_DEPTH_CLAMP commit c86ad730aa1c017788ae88a55f54071bf222be12 Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:51:30 2012 +0100 nv50: adapt to new clip state commit 3a8ae6ac243bae5970729dc4057fe02d992543dc Author: Christoph Bumiller <e0425955@student.tuwien.ac.at> Date: Tue Jan 3 23:32:36 2012 +0100 nvc0: adapt to new clip state commit 6243a8246997f8d2fcc69ab741a2c2dea080ff11 Author: Marek Olšák <maraeo@gmail.com> Date: Thu Dec 29 01:32:51 2011 +0100 draw: initalize pt.user.planes in draw_init This fixes a crash in glean/fpexceptions. commit e3056524b19b56d473f4faff84ffa0eb41497408 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:26:55 2011 +0100 svga: adapt to new clip state commit c5bfa8b37d6d489271df457229081d6bbb51b4b7 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:11:51 2011 +0100 r600g: adapt to new clip state commit f11890905362f62627c4a28a8255b76eb7de7df2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 14:10:26 2011 +0100 r300g: adapt to new clip state commit e37465327c79a01112f15f6278d9accc5bf3103f Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:39:16 2011 +0100 draw: adapt to new clip state This adds a regression in the LLVM clipping path. Can anybody see anything wrong with the code? It works for every other case, just glean/fpexceptions crashes when doing the "Infinite clip plane test". commit b474d2b18c72d965eefae4e427c269cba5ce6ba2 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:14:59 2011 +0100 u_blitter: don't save/set/restore clip state commit 9dd240ea91f523a677af45e8d0adb9e661e28602 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 13:11:56 2011 +0100 gallium: don't cso_save/set/restore clip state The enable bits are in the rasterizer state. commit a4f7031179f5f4ad524b34b394214b984ac950f6 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 12:58:55 2011 +0100 gallium: default depth_clip to 1 depth_clip = !depth_clamp commit fe21147a00ab90e549d63fe12ee4625c9c2ffcc3 Author: Marek Olšák <maraeo@gmail.com> Date: Mon Dec 26 06:14:19 2011 +0100 trace,util: update state logging to new clip state Also dump the other missing flags. commit 2a3b96e84ac872dcc5bc1de049fe76bb58d64b23 Author: Marek Olšák <maraeo@gmail.com> Date: Sun Dec 25 10:43:43 2011 +0100 st/mesa: adapt to new clip state commit b7b656a42fca19d7c85267f42649a206a85a2c72 Author: Marek Olšák <maraeo@gmail.com> Date: Sat Dec 17 15:45:19 2011 +0100 gallium: move state enable bits from clip_state to rasterizer_state
2011-12-24winsys/radeon: move managing GEM domains back to driversMarek Olšák1-2/+2
This partially reverts commit 363ff844753c46ac9c13866627e096b091ea81f8. It caused severe performance drops in Nexuiz. Reported by Phoronix. Tested by me on r300g and by IRC people on r600g.
2011-12-13r300g: take advantage of KEEP_TILING_FLAGS flush flagMarek Olšák1-0/+4
This fixes at least two multi-context-related races.
2011-09-30winsys/radeon: move GEM domains out of the drivers into winsysMarek Olšák1-2/+2
The drivers don't need to care about the domains. All they need to set are the bind and usage flags. This simplifies the winsys too. This also fixes on r600g: - fbo-depth-GL_DEPTH_COMPONENT32F-copypixels - fbo-depth-GL_DEPTH_COMPONENT16-copypixels - fbo-depth-GL_DEPTH_COMPONENT24-copypixels - fbo-depth-GL_DEPTH_COMPONENT32-copypixels - fbo-depth-GL_DEPTH24_STENCIL8-copypixels I can't explain it. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-09-16winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOMMarek Olšák1-1/+1
so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.
2011-07-25winsys/radeon: remove usage parameter from buffer_createMarek Olšák1-1/+0
2011-07-25winsys/radeon: add R300 infix to winsys feature namesMarek Olšák1-1/+1
2011-05-15r300g: dynamically ask for and release Hyper-Z accessMarek Olšák1-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.
2011-04-18r300g/winsys: rename r300->radeon and do a little cleanupMarek Olšák1-3/+3
Renaming a few files, types, and functions. Also make the winsys independent of r300g.
2011-03-11gallium: remove flags from the flush functionMarek Olšák1-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.
2011-03-08r300g: decide whether a flush should be asynchronous when calling itMarek Olšák1-10/+15
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šák1-1/+1
Running any older kernel is not recommended anyway.
2011-02-18r300g: remove tracking whether vertex buffers need to be validatedMarek Olšák1-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.
2011-02-15r300g: offload the CS ioctl to another threadMarek Olšák1-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
2011-02-15r300g: implement fences using dummy relocationsMarek Olšák1-11/+24
So finally we have them.
2011-02-14r300g: do not track whether occlusion queries have been flushedMarek Olšák1-6/+0
The winsys takes care of flushing automatically.
2011-02-14r300g: emit 3D_LOAD_VBPNTR only when necessaryMarek Olšák1-0/+1
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šák1-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.
2011-01-08r300g: rework command submission and resource space checkingMarek Olšák1-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.
2011-01-06r300g: skip buffer validation of upload buffers when appropriateMarek Olšák1-0/+2
because the upload buffers are reused for subsequent draw operations.
2010-12-07r300g: validate buffers only if any of bound buffers is changedMarek Olšák1-0/+2
This prevents needless buffer validation (CS space checking).
2010-12-05r300g: optimize looping over atomsMarek Olšák1-2/+2
This also removes DBG_STATS (the stats can be obtained with valgrind instead).
2010-12-03r300g: add capability bit index_bias_supportedMarek Olšák1-1/+1
.. instead of calling r500_index_bias_supported(..) every draw call.
2010-09-13r300g: fix SWTCLMarek Olšák1-1/+1
https://bugs.freedesktop.org/show_bug.cgi?id=29901
2010-08-25r300g: reset the index bias to 0 at the end of CSMarek Olšák1-0/+3
2010-08-23r300g: avoid stall in no-tcl drawing when mapping vboDave Airlie1-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>
2010-08-07r300g: fix cbzb clears when hyperz is offMarek Olšák1-2/+1
2010-08-05r300g: implement hyper-z support. (v4)Dave Airlie1-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>
2010-07-29r300g/swtcl: fix crash in ETQW and minor fixupsMarek Olšák1-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.
2010-07-18r300g: u_upload optimisationDave Airlie1-0/+4
fix vb/ib uploads
2010-07-16r300g: rebuild winsys and command submission to support multiple contextsMarek Olšák1-1/+1
2010-07-12r300g: implement fast color clearMarek Olšák1-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
2010-07-12r300g: ugly fix of a hardlock in the cubestorm xscreensaverMarek Olšák1-3/+1
FDO bug #28563.
2010-06-13r300g: inline FLUSH_CSMarek Olšák1-3/+4
The fewer macros, the better.
2010-05-26r300g: fix fence referencingMarek Olšák1-0/+1