summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* 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-124-207/+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-105-5/+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]>
* util/indices: minor clean-upsBrian Paul2017-03-082-5/+2
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium: s/uint/enum pipe_render_cond_flag/ for set_render_condition()Brian Paul2017-03-083-3/+5
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* draw: s/unsigned/enum pipe_shader_type/Brian Paul2017-03-084-14/+15
| | | | | | and some s/uint/enum pipe_shader_type/ Reviewed-by: Edward O'Callaghan <[email protected]>
* cso: s/unsigned/enum pipe_shader_type/Brian Paul2017-03-082-10/+12
| | | | Reviewed-by: Edward O'Callaghan <[email protected]>
* gallium: s/unsigned/enum pipe_shader_type/ for pipe_screen::get_shader_param()Brian Paul2017-03-083-5/+8
| | | | 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: remove unused pipe_thread_destroy()Timothy Arceri2017-03-071-5/+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-072-6/+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-072-5/+3
| | | | | | | | | | | | | 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-074-11/+7
| | | | | | pipe_condvar was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_thread with thrd_tTimothy Arceri2017-03-073-12/+8
| | | | | | | | 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-0720-88/+85
| | | | | | | | | | 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-0720-70/+67
| | | | | | | | | | 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-078-15/+12
| | | | | | | | | | 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-0714-20/+17
| | | | | | | | | | 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-0711-13/+10
| | | | | | This was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* gallium/util: replace pipe_mutex with mtx_tTimothy Arceri2017-03-0712-22/+18
| | | | | | 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-073-7/+4
| | | | | | | 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-073-8/+5
| | | | | | | 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-073-10/+7
| | | | | | | 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-073-11/+8
| | | | | | | 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-074-10/+7
| | | | | | | pipe_condvar_init() was made unnecessary with fd33a6bcd7f12. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallivm,ac: add LP_FUNC_ATTR_CONVERGENTMarek Olšák2017-03-062-0/+2
| | | | Reviewed-by: Dave Airlie <[email protected]>
* gallivm, ac: add writeonly and inaccessiblememonly attributesMarek Olšák2017-03-032-0/+4
| | | | Reviewed-by: Dave Airlie <[email protected]>
* tgsi/scan: record load/store/atomic image usageMarek Olšák2017-03-032-10/+13
| | | | Reviewed-by: Dave Airlie <[email protected]>
* tgsi/ureg: return correct token count in ureg_get_tokensGrazvydas Ignotas2017-03-031-1/+1
| | | | | | | | | | | | | Valgrind reports that the shader cache writes uninitialized data to disk. Turns out ureg_get_tokens() is returning the count of allocated tokens instead of how many are actually used, so the cache writes out unused space at the end. Use the real count instead. This change should not cause regressions elsewhere because the only ureg_get_tokens() user that cares about token count is the shader cache. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* gallivm,ac: add function attributes at call sites instead of declarationsMarek Olšák2017-03-012-24/+55
| | | | | | | | | | | | | | | | They can vary at call sites if the intrinsic is NOT a legacy SI intrinsic. We need this to force readnone or inaccessiblememonly on some amdgcn intrinsics. This is only used with LLVM 4.0 and later. Intrinsics only used with LLVM <= 3.9 don't need the LEGACY flag. gallivm and ac code is in the same patch, because splitting would be more complicated with all the LEGACY uses all over the place. v2: don't change the prototype of lp_add_function_attr. Reviewed-by: Jose Fonseca <[email protected]> (v1)
* gallivm,ac: remove unused FUNC_ATTR_LAST enumsMarek Olšák2017-03-011-1/+0
| | | | Reviewed-by: Jose Fonseca <[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
|
* vl: u_upload_alloc might fail to allocate buffer in bicubic filterNayan Deshmukh2017-02-221-3/+5
| | | | | Signed-off-by: Nayan Deshmukh <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* gallium/hud: handle a thread switch for API-thread-busy monitoringMarek Olšák2017-02-221-4/+10
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/hud: prevent an infinite loopMarek Olšák2017-02-221-2/+3
| | | | | | v2: use UINT64_MAX / 11 Reviewed-by: Nicolai Hähnle <[email protected]>
* 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/vl: Simplify the matrix filter fragment shaderThomas Hellstrom2017-02-221-40/+16
| | | | | | | | | It looks like it was partly copied from the median filter fragment shader and unnecessesarily saved a lot of temporary values. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/vl: Parameter substitution in the csc matrix computationThomas Hellstrom2017-02-221-12/+17
| | | | | | | | Makes the code significantly more readable. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Christian König <[email protected]>