summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipebuffer
Commit message (Collapse)AuthorAgeFilesLines
* gallium/pipebuffer: fix parenthesis locationTimothy Arceri2018-04-031-1/+1
| | | | | | | | | | Without this the return value will never get set to -1. This was first added in 49866c8f3457 and copied in 2b396eeed983. Fixes: 2b396eeed983 "gallium/pb_cache: add a copy of cache bufmgr independent of pb_manager" Reviewed-by: Marek Olšák <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102342
* pb_cache: let drivers choose the number of bucketsMarek Olšák2018-01-273-7/+24
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* pb_cache: call os_time_get outside of the loopMarek Olšák2018-01-271-6/+6
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium: remove unused and deprecated u_time.hNicolai Hähnle2017-11-094-4/+1
| | | | | Cc: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: Fix Thomas's email addressKenneth Graunke2017-07-283-3/+3
| | | | Commit 877128505431adaf817dc8069172ebe4a1cdf5d8 misspelled Hellstrom.
* gallium/util: replace pipe_condvar with cnd_tTimothy Arceri2017-03-071-1/+1
| | | | | | pipe_condvar was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-077-42/+42
| | | | | | | | | | pipe_mutex_unlock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_unlock(\([^)]*\)):mtx_unlock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2017-03-077-34/+34
| | | | | | | | | | replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_destroy() with mtx_destroy()Timothy Arceri2017-03-074-5/+5
| | | | | | | | | | pipe_mutex_destroy() was made unnecessary with fd33a6bcd7f12. Replace was done with: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_destroy(\([^)]*\)):mtx_destroy(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_init() with mtx_init()Timothy Arceri2017-03-077-8/+8
| | | | | | | | | | pipe_mutex_init() was made unnecessary with fd33a6bcd7f12. Replace was done using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_init(\([^)]*\)):(void) mtx_init(\&\1, mtx_plain):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex with mtx_tTimothy Arceri2017-03-077-8/+8
| | | | | | pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_broadcast() with cnd_broadcast()Timothy Arceri2017-03-071-1/+1
| | | | | | | pipe_condvar_broadcast() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_init() with cnd_init()Timothy Arceri2017-03-071-1/+1
| | | | | | | pipe_condvar_init() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/radeon/winsyses: reduce the number of pb_cache bucketsNicolai Hähnle2016-09-271-1/+1
| | | | | | | Small buffers are now handled via the slabs code, so separate buckets in pb_cache have become redundant. Reviewed-by: Marek Olšák <[email protected]>
* gallium/pipebuffer: add pb_slab utilityNicolai Hähnle2016-09-272-0/+407
| | | | | | | | | | | | | This is a simple framework for slab allocation from buffers that fits into the buffer management scheme of the radeon and amdgpu winsyses where bufmgrs aren't used. The utility knows about different sized allocations and explicitly manages reclaim of allocations that have pending fences. It manages all the free lists but does not actually touch buffer objects directly, relying on callbacks for that. Reviewed-by: Marek Olšák <[email protected]>
* gallium/pb_cache: reduce the number of pointer dereferencesMarek Olšák2016-07-191-7/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/pb_cache: divide the cache into buckets for reducing cache missesMarek Olšák2016-07-193-22/+43
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/pb_cache: check parameters that are more likely to fail firstMarek Olšák2016-07-191-8/+7
| | | | | | This makes Bioshock Infinite with deferred flushing 2% faster. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: fix warnings in release buildGrazvydas Ignotas2016-04-251-1/+1
| | | | | | | | Mark variables MAYBE_UNUSED to avoid unused-but-set-variable warnings in release build. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* pb_buffer: switch pb_buffer::size to 64 bitsMarek Olšák2016-04-123-8/+10
| | | | | | being able to allocate more than 4 GB may be useful Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: Format code in pb_buffer_fenced.c according to style guide.Rovanion Luckey2016-03-291-129/+97
| | | | | | | | | | | | | | This is a tiny housekeeping patch which does the following: * Replaced tabs with three spaces. * Formatted oneline and multiline code comments. Some doxygen comments weren't marked as such and some code comments were marked as doxygen comments. * Spaces between if- and while-statements and their parenthesis. According to the mesa coding style guidelines. Reviewed-by: Brian Paul <[email protected]>
* gallium/auxiliary: fix new gcc6 warningsRob Clark2016-02-181-2/+2
| | | | | | | | | | | | | | src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c: In function ‘mm_bufmgr_create_from_buffer’: src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c:288:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation] if(mm->map) ^~ src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c:286:1: note: ...this ‘if’ clause, but it is not if(mm->heap) ^~ Signed-off-by: Rob Clark <[email protected]>
* gallium/pb_bufmgr_cache: use the new pb_cache moduleMarek Olšák2015-12-111-198/+34
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* gallium/pb_cache: add a copy of cache bufmgr independent of pb_managerMarek Olšák2015-12-112-0/+360
| | | | | | | | | | | | | | | This simplified (basically duplicated) version of pb_cache_manager will allow removing some ugly hacks from radeon and amdgpu winsyses and flatten simplify their design. The difference is that winsyses must manually add buffers to the cache in "destroy" functions and the cache doesn't know about the buffers before that. The integration is therefore trivial and the impact on the winsys design is negligible. Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Acked-by: Michel Dänzer <[email protected]>
* gallium: Remove redundant NULL ptr checksEdward O'Callaghan2015-12-061-6/+4
| | | | | Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/auxiliary: Trivial code style cleanupEdward O'Callaghan2015-12-0611-34/+34
| | | | | Signed-off-by: Edward O'Callaghan <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/pb_bufmgr_cache: add a way to remove buffers from the cache explicitlyMarek Olšák2015-09-032-6/+41
| | | | | | | | This must be done before exporting a buffer as dmabuf fds, because we lose track of who is using it and can't trust the reference counter. Cc: 11.0 <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* gallium: replace INLINE with inlineIlia Mirkin2015-07-2110-35/+35
| | | | | | | | | | | | | | | | Generated by running: git grep -l INLINE src/gallium/ | xargs sed -i 's/\bINLINE\b/inline/g' git grep -l INLINE src/mesa/state_tracker/ | xargs sed -i 's/\bINLINE\b/inline/g' git checkout src/gallium/state_trackers/clover/Doxyfile and manual edits to src/gallium/include/pipe/p_compiler.h src/gallium/README.portability to remove mentions of the inline define. Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Marek Olšák <[email protected]>
* pipebuffer: silence unused var warnings for non-debug buildBrian Paul2015-06-011-0/+1
| | | | Reviewed-by: Jose Fonseca <[email protected]>
* util: Move gallium's linked list to utilJason Ekstrand2015-05-086-6/+6
| | | | | | | | | The linked list in gallium is pretty much the kernel list and we would like to have a C-based linked list for all of mesa. Let's not duplicate and just steal the gallium one. Acked-by: Connor Abbott <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* Fix a few typosZoë Blade2015-04-271-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* gallium/pb_bufmgr_cache: limit the size of cacheMarek Olšák2014-09-012-3/+20
| | | | | | This should make a machine which is running piglit more responsive at times. e.g. streaming-texture-leak can easily eat 600 MB because of how fast it creates new textures.
* gallium/pipebuffer: change pb_cache_manager_create() size_factor to floatBrian Paul2014-02-142-6/+6
| | | | | | | Requested by Marek. Reviewed-by: Marek Olšák <[email protected]> Cc: "10.1" <[email protected]>
* gallium/pipebuffer: Add a cache buffer manager bypass maskThomas Hellstrom2014-02-142-4/+22
| | | | | | | | | | | | | In some situations, it may be desirable to bypass the cache at buffer creation but to insert the buffer in the cache at buffer destruction. One such situation is where we already have a kernel representation of a buffer that we want to use, but we also want to insert it in the cache when it's freed up. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: José Fonseca <[email protected]> Reviewed-by: Brian Paul <[email protected]> Cc: "10.1" <[email protected]>
* pipebuffer, winsys: Add a size match parameter to the cached buffer managerThomas Hellstrom2014-02-142-3/+7
| | | | | | | | In some situations it's important to restrict the sizes of buffers that the cached buffer manager is allowed to return Signed-off-by: Thomas Hellstrom <[email protected]> Cc: "10.1" <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-1713-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* build: Don't build pipebufferMatt Turner2013-01-101-18/+0
| | | | It's already built by src/gallium/auxiliary.
* Remove useless checks for NULL before freeingMatt Turner2012-09-052-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as earlier commit, except for "FREE" This patch has been generated by the following Coccinelle semantic patch: // Remove useless checks for NULL before freeing // // free (NULL) is a no-op, so there is no need to avoid it @@ expression E; @@ + FREE (E); + E = NULL; - if (unlikely (E != NULL)) { - FREE(E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; type T; @@ + FREE ((T) E); + E = NULL; - if (unlikely (E != NULL)) { - FREE((T) E); ( - E = NULL; | - E = 0; ) ... - } @@ expression E; @@ + FREE (E); - if (unlikely (E != NULL)) { - FREE (E); - } @@ expression E; type T; @@ + FREE ((T) E); - if (unlikely (E != NULL)) { - FREE ((T) E); - } Reviewed-by: Brian Paul <[email protected]>
* pipebuffer: split up assertionBrian Paul2012-04-181-1/+2
| | | | | The problem with assert(a && b) is you don't know which term is zero when there's a failure.
* pipebuffer/debug: Fix a recursive mutex lockThomas Hellstrom2011-10-311-6/+3
| | | | | | | | pb_debug_manager_dump was trying to take a lock already held by all callers. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Jos� Fonseca <[email protected]>
* pb_bufmgr_cache: flush cache when create_buffer fails and try againMarek Olšák2011-10-081-0/+7
| | | | NOTE: This is a candidate for the stable branches.
* pb_buffer: inline 'base' sub-structMarek Olšák2011-09-119-91/+87
|
* pb: Add is_buffer_busy for malloc buffers.José Fonseca2011-03-061-1/+10
|
* pb_bufmgr_cache: add is_buffer_busy hook and use it instead of non-blocking mapMarek Olšák2011-02-142-7/+14
| | | | This is cleaner and implementing the hook is optional.
* scons: Remove old pipebuffer SConscriptJakob Bornecrantz2010-11-051-18/+0
|
* pb: fix numDelayed accountingDave Airlie2010-10-051-0/+1
| | | | we weren't decreasing when removing from the list.
* pb: don't keep checking buffers after first busyDave Airlie2010-10-051-13/+19
| | | | | If we assume busy buffers are added to the list in order its unlikely we'd fine one after the first busy one that isn't busy.
* pb: Fix the build, and add notes.José Fonseca2010-09-125-5/+14
|
* pb: add void * for flush ctx to mapping functionsDave Airlie2010-09-128-19/+19
| | | | | | | | | | If the buffer we are attempting to map is referenced by the unsubmitted command stream for this context, we need to flush the command stream, however to do that we need to be able to access the context at the lowest level map function, currently we set the buffer in the toplevel map, but this racy between context. (we probably have a lot more issues than that.) I'll look into a proper solution as suggested by jrfonseca when I get some time.
* pipebuffer: Clean up header file inclusion in pb_bufmgr.h.Vinson Lee2010-08-261-2/+1
| | | | | Remove p_compiler.h and p_defines.h. Include pb_buffer.h for pb_size symbol.