summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/ddebug
AgeCommit message (Collapse)AuthorFilesLines
2018-02-07Revert "gallium: build ddebug, noop, rbug, trace as part of auxiliary"Roland Scheidegger1-7/+7
This reverts commit 6f82b8d8d0a986aac28e7bec47fc313fb950475c. This broke scons build, and reportedly clover with autotools/meson too.
2018-02-07gallium: build ddebug, noop, rbug, trace as part of auxiliaryMarek Olšák1-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!
2018-01-19autotools: include meson build files in tarballDylan Baker1-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 <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-11-20ddebug: fix the hang detection timeout calculationNicolai Hähnle1-2/+2
Fixes: c9fefa062b36 ("ddebug: rewrite to always use a threaded approach") Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-20ddebug: fix use-after-free of streamout targetsNicolai Hähnle1-1/+1
Fixes: b47727a83ad6 ("ddebug: implement pipelined hang detection mode") Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09ddebug: optionally handle transfer commands like drawsNicolai Hähnle4-66/+288
Transfer commands can have associated GPU operations. Enabled by passing GALLIUM_DDEBUG=transfers. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09ddebug: dump context and before/after times of drawsNicolai Hähnle2-0/+10
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09ddebug: generalize print_named_xxx via a PRINT_NAMED macroNicolai Hähnle1-15/+10
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09ddebug: rewrite to always use a threaded approachNicolai Hähnle4-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 <marek.olsak@amd.com>
2017-11-09ddebug: use an atomic increment when numbering filesNicolai Hähnle1-1/+3
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09dd/util: extract dd_get_debug_filename_and_mkdirNicolai Hähnle1-12/+18
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-11-09util: move os_time.[ch] to src/utilNicolai Hähnle1-1/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-16meson: build gallium helper driversDylan Baker1-0/+28
This builds ddebug, noop, rbug, and trace drivers. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Eric Anholt <eric at anholt.net>
2017-10-12gallium: add pipe_screen::check_resource_capabilityMarek Olšák1-0/+11
This is optional (and no CAP). Implemented by radeonsi, ddebug, rbug, trace. Reviewed-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-09-13ddebug: write out final driver log messages with GALLIUM_DDEBUG=alwaysNicolai Hähnle3-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 <marek.olsak@amd.com>
2017-08-22gallium: remove unused PIPE_DUMP_* definesNicolai Hähnle1-17/+4
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-22ddebug: remove dd_draw_record::driver_state_logNicolai Hähnle2-58/+0
It is no longer used. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-22ddebug: add driver log to record dumpsNicolai Hähnle3-0/+30
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-06gallium: introduce device/driver UUID queriesAndres Rodriguez1-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 <andresx7@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2) Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-08-06gallium: introduce memory objectDave Airlie1-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 <marek.olsak@amd.com> (v3) Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-08-02ddebug: handle get_query_result_resource as a GPU callNicolai Hähnle3-32/+92
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-02gallium: add util_dump_query_type and use it in ddebugNicolai Hähnle1-11/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-08-02gallium: rename util_dump_* to util_str_* for enum-to-string conversionNicolai Hähnle1-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 <marek.olsak@amd.com>
2017-07-17ddebug: fix parsing of the pipelined modeSamuel Pitoiset1-1/+1
Trivial. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-07-05ddebug: handle some cases of non-TGSI shadersNicolai Hähnle3-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 <marek.olsak@amd.com> (v1)
2017-06-14ddebug: add ARB_bindless_texture supportSamuel Pitoiset1-0/+60
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-05-10gallium: remove pipe_index_buffer and set_index_bufferMarek Olšák3-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
2017-05-10gallium: separate indirect stuff from pipe_draw_info - 80 -> 56 bytesMarek Olšák2-16/+33
For faster initialization of non-indirect draws.
2017-05-10gallium: decrease the size of pipe_vertex_buffer - 24 -> 16 bytesMarek Olšák1-9/+6
2017-05-10ddebug: implement dd_dump_launch_gridNicolai Hähnle2-1/+7
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-05-10ddebug: extract dd_dump_shaderNicolai Hähnle1-74/+82
Will be re-used for compute shaders. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-25ddebug: implement get_query_result_resourceMarek Olšák1-0/+16
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-04-14gallium/ddebug: dump missing members of pipe_draw_infoNicolai Hähnle1-0/+2
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-04-05ddebug: add resource_commit pass-throughNicolai Hähnle1-0/+11
v2: fix return type to bool (Marek) Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-30ddebug: implement clear_textureMarek Olšák2-0/+34
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-03-12gallium/util: replace pipe_thread_create() with u_thread_create()Timothy Arceri1-1/+1
They do the same thing we just moved the function to be accessible to all of Mesa. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-08gallium: s/uint/enum pipe_render_cond_flag/ for set_render_condition()Brian Paul1-1/+1
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-03-08gallium: s/uint/enum pipe_shader_type/ for set_constant_buffer()Brian Paul1-1/+1
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-03-08gallium: s/unsigned/enum pipe_shader_type/ for pipe_screen::get_shader_param()Brian Paul1-1/+2
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
2017-03-07gallium/util: replace pipe_thread_wait() with thrd_join()Timothy Arceri1-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 <plamena.manolova@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-07gallium/util: remove PIPE_THREAD_ROUTINE()Timothy Arceri2-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 <plamena.manolova@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-07gallium/util: replace pipe_thread with thrd_tTimothy Arceri1-1/+1
pipe_thread was made unnecessary with fd33a6bcd7f12. V2: fix compile error in u_queue.c Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-03-07gallium/util: replace pipe_mutex_unlock() with mtx_unlock()Timothy Arceri2-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 <marek.olsak@amd.com>
2017-03-07gallium/util: replace pipe_mutex_lock() with mtx_lock()Timothy Arceri2-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 <marek.olsak@amd.com>
2017-03-07gallium/util: replace pipe_mutex_destroy() with mtx_destroy()Timothy Arceri1-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 <marek.olsak@amd.com>
2017-03-07gallium/util: replace pipe_mutex_init() with mtx_init()Timothy Arceri1-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 <marek.olsak@amd.com>
2017-03-07gallium/util: replace pipe_mutex with mtx_tTimothy Arceri1-1/+1
pipe_mutex was made unnecessary with fd33a6bcd7f12. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-02-23ddebug/rbug/trace: add get_disk_shader_cache() to pass-throughsTimothy Arceri1-0/+9
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
2017-02-14gallium: set pipe_context uploaders in drivers (v3)Marek Olšák1-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 <nicolai.haehnle@amd.com> Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com> (v1) Tested-by: Charmaine Lee <charmainel@vmware.com>
2017-01-20gallium: add pipe_screen::resource_changed callback wrappersPhilipp Zabel1-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 <p.zabel@pengutronix.de> Suggested-by: Nicolai Hähnle <nhaehnle@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>