aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ddebug
Commit message (Collapse)AuthorAgeFilesLines
* Revert "gallium: build ddebug, noop, rbug, trace as part of auxiliary"Roland Scheidegger2018-02-071-7/+7
| | | | | | This reverts commit 6f82b8d8d0a986aac28e7bec47fc313fb950475c. This broke scons build, and reportedly clover with autotools/meson too.
* gallium: build ddebug, noop, rbug, trace as part of auxiliaryMarek Olšák2018-02-071-7/+7
| | | | | | | Building gallium is faster by 7.5 seconds on a 4core/8thread 3GHz CPU. (gallium build time is reduced by 15% when building only radeonsi) Non-recursive makefiles are great!
* autotools: include meson build files in tarballDylan Baker2018-01-191-0/+2
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* ddebug: fix the hang detection timeout calculationNicolai Hähnle2017-11-201-2/+2
| | | | | Fixes: c9fefa062b36 ("ddebug: rewrite to always use a threaded approach") Reviewed-by: Marek Olšák <[email protected]>
* ddebug: fix use-after-free of streamout targetsNicolai Hähnle2017-11-201-1/+1
| | | | | Fixes: b47727a83ad6 ("ddebug: implement pipelined hang detection mode") Reviewed-by: Marek Olšák <[email protected]>
* ddebug: optionally handle transfer commands like drawsNicolai Hähnle2017-11-094-66/+288
| | | | | | | | Transfer commands can have associated GPU operations. Enabled by passing GALLIUM_DDEBUG=transfers. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: dump context and before/after times of drawsNicolai Hähnle2017-11-092-0/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: generalize print_named_xxx via a PRINT_NAMED macroNicolai Hähnle2017-11-091-15/+10
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: rewrite to always use a threaded approachNicolai Hähnle2017-11-094-515/+546
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has multiple goals: 1. Off-load the writing of records in 'always' mode to another thread for performance. 2. Allow using ddebug with threaded contexts. This really forces us to move some of the "after_draw" handling into another thread. 3. Simplify the different modes of ddebug, both in the code and in the user interface, i.e. GALLIUM_DDEBUG. In particular, there's no 'pipelined' anymore, since we're always pipelined; and 'noflush' is replaced by 'flush', since we no longer flush by default. 4. Fix the fences in pipelining mode. They previously relied on writes via pipe_context::clear_buffer. However, on radeonsi, those could (quite reasonably) end up in the SDMA buffer. So we use the newly added PIPE_FLUSH_{TOP,BOTTOM}_OF_PIPE fences instead. 5. Improve pipelined mode overall, using the finer grained information provided by the new fences. Overall, the result is that pipelined mode should be more useful, and using ddebug in default mode is much less invasive, in the sense that it changes the overall driver behavior less (which is kind of crucial for a driver debugging tool). An example of the new hang debug output: Gallium debugger active. Hang detection timeout is 1000ms. GPU hang detected, collecting information... Draw # driver prev BOP TOP BOP dump file ------------------------------------------------------------- 2 YES YES YES NO /home/nha/ddebug_dumps/shader_runner_19919_00000000 3 YES NO YES NO /home/nha/ddebug_dumps/shader_runner_19919_00000001 4 YES NO YES NO /home/nha/ddebug_dumps/shader_runner_19919_00000002 5 YES NO YES NO /home/nha/ddebug_dumps/shader_runner_19919_00000003 Done. We can see that there were almost certainly 4 draws in flight when the hang happened: the top-of-pipe fence was signaled for all 4 draws, the bottom-of-pipe fence for none of them. In virtually all cases, we'd expect the first draw in the list to be at fault, but due to the GPU parallelism, it's possible (though highly unlikely) that one of the later draws causes a component to get stuck in a way that prevents the earlier draws from making progress as well. (In the above example, there were actually only 3 draws truly in flight: the last draw is a blit that waits for the earlier draws; however, its top-of-pipe fence is emitted before the cache flush and wait, and so the fact that the draw hasn't truly started yet can only be seen from a closer inspection of GPU state.) Acked-by: Marek Olšák <[email protected]>
* ddebug: use an atomic increment when numbering filesNicolai Hähnle2017-11-091-1/+3
| | | | Reviewed-by: Marek Olšák <[email protected]>
* dd/util: extract dd_get_debug_filename_and_mkdirNicolai Hähnle2017-11-091-12/+18
| | | | Reviewed-by: Marek Olšák <[email protected]>
* util: move os_time.[ch] to src/utilNicolai Hähnle2017-11-091-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* meson: build gallium helper driversDylan Baker2017-10-161-0/+28
| | | | | | | This builds ddebug, noop, rbug, and trace drivers. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* gallium: add pipe_screen::check_resource_capabilityMarek Olšák2017-10-121-0/+11
| | | | | | | | | This is optional (and no CAP). Implemented by radeonsi, ddebug, rbug, trace. Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: write out final driver log messages with GALLIUM_DDEBUG=alwaysNicolai Hähnle2017-09-133-2/+15
| | | | | | | | If the last operation happens to be a non-draw, such as a transfer_map that triggers a decompress blit, there may be interesting messages left in the driver log. Reviewed-by: Marek Olšák <[email protected]>
* gallium: remove unused PIPE_DUMP_* definesNicolai Hähnle2017-08-221-17/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: remove dd_draw_record::driver_state_logNicolai Hähnle2017-08-222-58/+0
| | | | | | It is no longer used. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: add driver log to record dumpsNicolai Hähnle2017-08-223-0/+30
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: introduce device/driver UUID queriesAndres Rodriguez2017-08-061-0/+18
| | | | | | | | | | v2: remove unnecessary returns v3 (Timothy Arceri): updated trace v4 (Timothy Arceri): actually dump the params in trace Signed-off-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]> (v2) Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium: introduce memory objectDave Airlie2017-08-061-0/+40
| | | | | | | | | | v2: fix comment regarding fd ownership, define pipe_memory_object v3: remove stray return v4 (Timothy Arceri): update trace v5 (Timothy Arceri): actually dump the params in trace Reviewed-by: Marek Olšák <[email protected]> (v3) Reviewed-by: Samuel Pitoiset <[email protected]>
* ddebug: handle get_query_result_resource as a GPU callNicolai Hähnle2017-08-023-32/+92
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add util_dump_query_type and use it in ddebugNicolai Hähnle2017-08-021-11/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: rename util_dump_* to util_str_* for enum-to-string conversionNicolai Hähnle2017-08-021-1/+1
| | | | | | | This is mostly mechanical search-and-replace, plus touching up the macros in u_dump_defines.c manually a bit. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: fix parsing of the pipelined modeSamuel Pitoiset2017-07-171-1/+1
| | | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ddebug: handle some cases of non-TGSI shadersNicolai Hähnle2017-07-053-6/+28
| | | | | | | | | | NIR shaders are not captured properly in pipelined mode currently. This would require shader cloning, which requires linking all the Gallium drivers against NIR. We can always do that later. v2: avoid immediate crashes in pipelined mode Reviewed-by: Marek Olšák <[email protected]> (v1)
* ddebug: add ARB_bindless_texture supportSamuel Pitoiset2017-06-141-0/+60
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák2017-05-103-24/+18
| | | | | | | | | | | | | | pipe_draw_info::indexed is replaced with index_size. index_size == 0 means non-indexed. Instead of pipe_index_buffer::offset, pipe_draw_info::start is used. For indexed indirect draws, pipe_draw_info::start is added to the indirect start. This is the only case when "start" affects indirect draws. pipe_draw_info::index is a union. Use either index::resource or index::user depending on the value of pipe_draw_info::has_user_indices. v2: fixes for nine, svga
* gallium: separate indirect stuff from pipe_draw_info - 80 -> 56 bytesMarek Olšák2017-05-102-16/+33
| | | | For faster initialization of non-indirect draws.
* gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák2017-05-101-9/+6
|
* ddebug: implement dd_dump_launch_gridNicolai Hähnle2017-05-102-1/+7
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: extract dd_dump_shaderNicolai Hähnle2017-05-101-74/+82
| | | | | | Will be re-used for compute shaders. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: implement get_query_result_resourceMarek Olšák2017-04-251-0/+16
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/ddebug: dump missing members of pipe_draw_infoNicolai Hähnle2017-04-141-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: add resource_commit pass-throughNicolai Hähnle2017-04-051-0/+11
| | | | | | v2: fix return type to bool (Marek) Reviewed-by: Marek Olšák <[email protected]>
* ddebug: implement clear_textureMarek Olšák2017-03-302-0/+34
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: replace pipe_thread_create() with u_thread_create()Timothy Arceri2017-03-121-1/+1
| | | | | | | They do the same thing we just moved the function to be accessible to all of Mesa. Reviewed-by: Marek Olšák <[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/uint/enum pipe_shader_type/ for set_constant_buffer()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: 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-072-2/+4
| | | | | | | | | | | | | 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_thread with thrd_tTimothy Arceri2017-03-071-1/+1
| | | | | | | | 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-072-4/+4
| | | | | | | | | | 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-072-4/+4
| | | | | | | | | | 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-071-2/+2
| | | | | | | | | | 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-071-1/+1
| | | | | | | | | | 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-071-1/+1
| | | | | | pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <[email protected]>
* ddebug/rbug/trace: add get_disk_shader_cache() to pass-throughsTimothy Arceri2017-02-231-0/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: set pipe_context uploaders in drivers (v3)Marek Olšák2017-02-141-0/+2
| | | | | | | | | | | | | | | Notes: - make sure the default size is large enough to handle all state trackers - pipe wrappers don't receive transfer calls from stream_uploader, because pipe_context::stream_uploader points directly to the underlying driver's stream_uploader (to keep it simple for now) v2: add error handling to nv50, nvc0, noop v3: set const_uploader Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> (v1) Tested-by: Charmaine Lee <[email protected]>
* gallium: add pipe_screen::resource_changed callback wrappersPhilipp Zabel2017-01-201-0/+10
| | | | | | | | | | Add resource_changed to the ddebug, rbug, and trace wrappers. Since it is optional, there is no need to add it to noop. Signed-off-by: Philipp Zabel <[email protected]> Suggested-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Lucas Stach <[email protected]>