summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
Commit message (Collapse)AuthorAgeFilesLines
* gallium/ddebug: dump missing members of pipe_draw_infoNicolai Hähnle2017-04-141-0/+5
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: fix swizzle of INSTANCEID system valueNicolai Hähnle2017-04-081-1/+1
| | | | | | | | radeonsi added stricter checking for correct swizzles in debug builds. Reported-by: Michel Dänzer <[email protected]> Fixes: 4cf29427770f ("radeonsi: support 64-bit system values") Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: tweak backtrace format with libunwindRob Clark2017-04-071-10/+16
| | | | | | | To work with addr2line.sh we also need the relative offset within the DSO. And addr2line.sh gets confused by the leading stackframe number. Signed-off-by: Rob Clark <[email protected]>
* gallium/util: cache symbol lookup with libunwindRob Clark2017-04-072-27/+94
| | | | Signed-off-by: Rob Clark <[email protected]>
* gallium/util: fix missing limit check in libunwind backtraceRob Clark2017-04-071-1/+1
| | | | | Fixes: 70c272004f ("gallium/util: libunwind support") Signed-off-by: Rob Clark <[email protected]>
* gallium/util: libunwind supportRob Clark2017-04-032-2/+104
| | | | | | | | | | | It's kinda sad that (a) we don't have debug_backtrace support on !X86 and that (b) we re-invent our own crude backtrace support in the first place. If available, use libunwind instead. The backtrace format is based on what xserver and weston use, since it is nice not to have to figure out a different format. Signed-off-by: Rob Clark <[email protected]> Acked-by: Nicolai Hähnle <[email protected]>
* gallium/util: clean up stack frame printingRob Clark2017-04-033-23/+26
| | | | | | | | | Prep work for next patch. Ideally 'struct debug_stack_frame' would be opaque, but it is embedded in a bunch of places. But at least we can treat it opaquely. Signed-off-by: Rob Clark <[email protected]>
* radeonsi: add tests verifying that VM faults don't hangMarek Olšák2017-03-312-4/+9
| | | | | | GFX9 hangs instead of writing VM faults to dmesg. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: use const in u_index_modify helpersMarek Olšák2017-03-302-6/+6
| | | | | | Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/u_upload: make the first persistent mapping unsynchronizedMarek Olšák2017-03-171-0/+1
| | | | This is simpler for drivers.
* gallium: add P016 formatChristian König2017-03-133-0/+40
| | | | | | | Same layout as NV12, but 16bit per channel instead of 8. Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
* gallium/util: move u_queue.{c,h} to src/utilTimothy Arceri2017-03-122-440/+0
| | | | | | | This will allow us to use it outside of gallium for things like compressing shader cache entries. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: make use of new u_thread.h in u_queue.{c,h}Timothy Arceri2017-03-122-4/+6
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: use standard malloc/calloc/free in u_queue.cTimothy Arceri2017-03-121-10/+10
| | | | | | This will help us moving the file to the shared src/util dir. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: move u_string.h to src/util/u_string.hTimothy Arceri2017-03-123-206/+2
| | | | | | | | This will help us move u_queue.c here eventually and also provide string function wrappers for anyone wishing to port disk_cache.c to windows. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove unused header from u_string.hTimothy Arceri2017-03-121-1/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove unused util_strbuf*Timothy Arceri2017-03-121-37/+0
| | | | | | Looks like they have been unused since 2008 b8a7eef242f6bb97d90f. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove unused util_memmove()Timothy Arceri2017-03-121-20/+0
| | | | | | | This is not used anywhere and Visual Studio looks to have supported memmove() for a long time if not always. Reviewed-by: Marek Olšák <[email protected]>
* gallium: remove shebang from python scriptsEmil Velikov2017-03-103-3/+0
| | | | | | | Analogous to earlier commit(s). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: remove execute bit from the python script(s)Emil Velikov2017-03-102-0/+0
| | | | | | | Analogous to earlier commit(s). Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: s/uint/enum pipe_render_cond_flag/ for set_render_condition()Brian Paul2017-03-081-1/+1
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium: s/unsigned/enum pipe_shader_type/ for pipe_screen::get_shader_param()Brian Paul2017-03-081-1/+2
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium/util: remove unused header from u_queue.cTimothy Arceri2017-03-071-1/+0
| | | | | Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread_wait() with thrd_join()Timothy Arceri2017-03-071-1/+1
| | | | | | | | | Replace done using: find ./src -type f -exec sed -i -- \ 's:pipe_thread_wait(\([^)]*\)):thrd_join(\1, NULL):g' {} \; Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: remove PIPE_THREAD_ROUTINE()Timothy Arceri2017-03-071-1/+2
| | | | | | | | | | | | | This was made unnecessary with fd33a6bcd7f12. This was mostly done with: find ./src -type f -exec sed -i -- \ 's:PIPE_THREAD_ROUTINE(\([^,]*\), \([^)]*\)):int\n\1(void \*\2):g' {} \; With some small manual tidy ups. Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar with cnd_tTimothy Arceri2017-03-072-4/+4
| | | | | | pipe_condvar was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread with thrd_tTimothy Arceri2017-03-072-2/+2
| | | | | | | | pipe_thread was made unnecessary with fd33a6bcd7f12. V2: fix compile error in u_queue.c Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2017-03-077-25/+25
| | | | | | | | | | 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-24/+24
| | | | | | | | | | 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-073-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-076-7/+7
| | | | | | | | | | 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: remove pipe_static_mutex()Timothy Arceri2017-03-075-5/+5
| | | | | | This was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex with mtx_tTimothy Arceri2017-03-074-5/+5
| | | | | | 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-2/+2
| | | | | | | 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_signal() with cnd_signal()Timothy Arceri2017-03-072-4/+4
| | | | | | | pipe_condvar_signal() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_wait() with cnd_wait()Timothy Arceri2017-03-072-5/+5
| | | | | | | pipe_condvar_wait() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_condvar_destroy() with cnd_destroy()Timothy Arceri2017-03-072-6/+6
| | | | | | | pipe_condvar_destroy() 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-072-4/+4
| | | | | | | pipe_condvar_init() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium/u_queue: set num_threads correctly if not all threads startGrazvydas Ignotas2017-02-271-1/+1
| | | | | | | | | If i-th thread could not be created it means we have i threads, not i+1, because we start from 0. Fixes: 404d0d5 "gallium/u_queue: add an option to have multiple worker threads" Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/u_queue: fix a crash with atexit handlersGrazvydas Ignotas2017-02-271-0/+1
| | | | | | | | | | | | | | | | Commit 4aea8fe ("gallium/u_queue: fix random crashes when the app calls exit()") added a atexit handler which calls util_queue_killall_and_wait() for each queue to stop the threads. However the app is also free to use atexit handlers to clean up things, leading to util_queue_destroy() call which will also call util_queue_killall_and_wait() for the same queue again, causing threads being joined twice, and that is undefined. This happens with libglut, for example. A simple fix is to just set num_threads to 0 as there are no more valid threads after util_queue_killall_and_wait() returns. Fixes: 4aea8fe "gallium/u_queue: fix random crashes when the app calls exit()" Signed-off-by: Grazvydas Ignotas <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/util: add new helpers for user index buffer uploadingMarek Olšák2017-02-252-0/+35
| | | | | | | v3: split from the etnaviv patch; fix new_ib.buffer leak Reviewed-by: Brian Paul <[email protected]> Tested-by: Brian Paul <[email protected]> (VMware driver only)
* gallium/util: (trivial) fix util_clear_render_targetRoland Scheidegger2017-02-241-7/+8
| | | | | | the format of the rt can be different than the one of the texture, so must propagate the format explicitly to the helper. Broken since 3f9c5d62441eba38e8b1592aba965ed5db6fd89b (but unused by st/mesa).
* st/va: Fix up YV12 to NV12 putImage conversionThomas Hellstrom2017-02-241-37/+0
| | | | | | | | | | Use the utility u_copy_nv12_from_yv12 to implement this similarly to how it's been done in the VPAU state tracker. The old code mixed up planes and fields and didn't correctly handle video surfaces in interlaced format. Acked-by: Christian König <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]>
* st/vdpau: Provide YV12 to NV12 putBits conversion v2Thomas Hellstrom2017-02-241-0/+42
| | | | | | | | | | | | | | | | | mplayer likes putting YV12 data, and if there is a buffer format mismatch, the vdpau state tracker would try to reallocate the video surface as an YV12 surface. A virtual driver doesn't like reallocating and doesn't like YV12 surfaces, so if we can't support YV12, try an YV12 to NV12 conversion instead. Also advertize that we actually can do the getBits and putBits conversion. v2: A previous version of this patch prioritized conversion before reallocating. This has been changed to prioritize reallocating in this version. Cc: Christian König <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]>
* gallium: implement util_clear_textureLars Hamre2017-02-242-145/+248
| | | | | | | | | | | | | v3: have util_clear_texture mirror the pipe function (Roland Scheidegger) v2: rework util clear functions such that they operate on a resource instead of a surface (Roland Scheidegger) Creates a util_clear_texture function for implementing the GL_ARB_clear_texture in softpipe and llvmpipe. Signed-off-by: Lars Hamre <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* haiku: build fixes around debug definesJerome Duval2017-02-241-2/+2
|
* gallium/u_queue: isolate util_queue_fence implementationMarek Olšák2017-02-222-20/+24
| | | | | | it's cleaner this way. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_queue: fix random crashes when the app calls exit()Marek Olšák2017-02-222-2/+78
| | | | | | | | | | | | This fixes: vdpauinfo: ../lib/CodeGen/TargetPassConfig.cpp:579: virtual void llvm::TargetPassConfig::addMachinePasses(): Assertion `TPI && IPI && "Pass ID not registered!"' failed. v2: use list_head, switch the call order in destroy Cc: 13.0 17.0 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_suballoc: update commentsMarek Olšák2017-02-201-3/+5
| | | | as requested by Brian. Trivial.
* gallium/u_index_modify: don't add PIPE_TRANSFER_UNSYNCHRONIZED unconditionallyMarek Olšák2017-02-192-3/+9
| | | | | | | | It's OK for r300g (because r300g can't write to buffers via the GPU), but not later hardware. This issue was spotted randomly. Cc: [email protected] Reviewed-by: Nicolai Hähnle <[email protected]>