aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/driver_ddebug
Commit message (Collapse)AuthorAgeFilesLines
* util: rename list_empty() to list_is_empty()Timothy Arceri2019-10-282-3/+3
| | | | | | | This makes it clear that it's a boolean test and not an action (eg. "empty the list"). Reviewed-by: Eric Engestrom <[email protected]>
* gallium: add pipe_screen::finalize_nirMarek Olšák2019-10-231-0/+9
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* gallium: extend resource_get_param to be as capable as resource_get_handleMarek Olšák2019-09-181-2/+7
| | | | | Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/ddebug: Wrap resource_get_param if availableKenneth Graunke2019-08-211-0/+13
| | | | | | Fixes: 0346b700833 ("gallium/screen: Add pipe_screen::resource_get_param") Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: avoid warning on WindowsErik Faye-Lund2019-08-151-1/+1
| | | | | | | | | | On Windows, p_atomic_inc_return returns an unsigned long long rather than the type the pointer refers to, so let's make sure we cast the result to the right type. Otherwise, we'll trigger a warning about the wrong format-string for the type. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gallium: switch boolean -> bool at the interface definitionsIlia Mirkin2019-07-224-14/+14
| | | | | | | | | | | | | | | | | | This is a relatively minimal change to adjust all the gallium interfaces to use bool instead of boolean. I tried to avoid making unrelated changes inside of drivers to flip boolean -> bool to reduce the risk of regressions (the compiler will much more easily allow "dirty" values inside a char-based boolean than a C99 _Bool). This has been build-tested on amd64 with: Gallium drivers: nouveau r300 r600 radeonsi freedreno swrast etnaviv v3d vc4 i915 svga virgl swr panfrost iris lima kmsro Gallium st: mesa xa xvmc xvmc vdpau va Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]>
* util: use standard name for snprintf()Eric Engestrom2019-07-191-6/+6
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* ddebug: fix a few MSVC compiler warningsBrian Paul2019-05-082-8/+9
| | | | | | | Don't return an expression in void functions. Replace an unsigned int with proper enum. Reviewed-by: Roland Scheidegger <[email protected]>
* gallium: add resource_get_info to pipe_screenJulien Isorce2019-04-301-0/+12
| | | | | | | | Generic plumbing. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110443 Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ddebug: expose some helper functions as non-inlineNicolai Hähnle2019-04-252-59/+70
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: dump driver state into a separate fileNicolai Hähnle2019-04-251-5/+12
| | | | | | | | | | Due to asynchronous execution, it's not clear which of the draws the state may refer to. This also works around an issue encountered with radeonsi where dumping the driver state itself caused a hang. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: log calls to pipe->flushNicolai Hähnle2019-04-252-20/+61
| | | | | | This can be useful when internal draws lead to a hang. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: set thread nameNicolai Hähnle2019-04-251-0/+10
| | | | | | For better debuggability. Reviewed-by: Marek Olšák <[email protected]>
* ddebug: add compute functions to help hang detectionDave Airlie2019-04-051-2/+21
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gallium: add writable_bitmask parameter into set_shader_buffersMarek Olšák2019-04-041-2/+4
| | | | | | | to indicate write usage per buffer. This is just a hint (it will be used by radeonsi). Reviewed-by: Timothy Arceri <[email protected]>
* gallium: ddebug: Add missing fence related wrappersGuido Günther2019-04-042-0/+37
| | | | | | | | | | | | | | Without that `GALLIUM_DDEBUG=always kmscube -A` would segfault like #0 0x0000000000000000 in () #1 0x0000ffffa72a3c54 in dri2_get_fence_fd (_screen=0xaaaaed4f2090, _fence=0xaaaaed9ef880) at ../src/gallium/state_trackers/dri/dri_helpers.c:140 #2 0x0000ffffa8744824 in dri2_dup_native_fence_fd (drv=0xaaaaed5010c0, disp=0xaaaaed5029a0, sync=0xaaaaed9ef7c0) at ../src/egl/drivers/dri2/egl_dri2.c:3050 #3 0x0000ffffa87339b8 in eglDupNativeFenceFDANDROID (dpy=0xaaaaed5029a0, sync=0xaaaaed9ef7c0) at ../src/egl/main/eglapi.c:2107 #4 0x0000aaaabd29ca90 in () #5 0x0000aaaabd401000 in () Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* ddebug: always flush when requested, even when hang detection is disabledNicolai Hähnle2018-12-191-0/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* ddebug: simplify watchdog loop and fix crash in the no-timeout caseNicolai Hähnle2018-12-193-73/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | The following race condition could occur in the no-timeout case: API thread Gallium thread Watchdog ---------- -------------- -------- dd_before_draw u_threaded_context draw dd_after_draw add to dctx->records signal watchdog dump & destroy record execute draw dd_after_draw_async use-after-free! Alternatively, the same scenario would assert in a debug build when destroying the record because record->driver_finished has not signaled. Fix this and simplify the logic at the same time by - handing the record pointers off to the watchdog thread *before* each draw call and - waiting on the driver_finished fence in the watchdog thread Reviewed-by: Marek Olšák <[email protected]>
* gallium: add pipe_context::set_context_param for tuning perf on AMD Zen (v2)Marek Olšák2018-09-071-0/+11
| | | | | | | | | State trackers will not use the new param directly, but will instead use a helper in MakeCurrent that does the right thing. v2: rework the interface Reviewed-by: Brian Paul <[email protected]>
* ddebug: implement set_window_rectanglesMarek Olšák2018-08-141-0/+12
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* ddebug: use util_snprintf() in dd_get_debug_filename_and_mkdirAndres Gomez2018-08-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\gallium\auxiliary\driver_ddebug\dd_draw.c ... dd_draw.c c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(60) : warning C4013: 'snprintf' undefined; assuming extern returning int ... gallium.lib(dd_draw.obj) : error LNK2001: unresolved external symbol _snprintf build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll : fatal error LNK1120: 1 unresolved externals scons: *** [build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll] Error 1120 scons: building terminated because of errors. Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Nicolai Hähnle <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: fix ddebug on windowsDylan Baker2018-08-011-1/+5
| | | | | | | | | By including the proper headers for getpid and for mkdir. Fixes: 6ff0c6f4ebcb87ea6c6fe5a4ba90b548f666067d ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák2018-07-311-1/+2
| | | | Tested-by: Dieter Nützel <[email protected]>
* gallium/auxiliary: Extern "c" fixes.Alexander von Gluck IV2018-07-271-0/+8
| | | | | | Used by C++ code such as Haiku's renderer. Reviewed-by: Brian Paul <[email protected]>
* gallium: Check pipe_screen::resource_changed before dereferencing itMichel Dänzer2018-07-121-1/+2
| | | | | | | | | | It's optional, only implemented by the etnaviv driver so far. Fixes: 501d0edeca32 "st/mesa: call resource_changed when binding a EGLImage to a texture" Fixes: a37cf630b4d1 "gallium: add pipe_screen::resource_changed callback wrappers" Reviewed-by: Lucas Stach <[email protected]>
* ddebug: add PIPE_OS_UNIX/LINUX checks to fix MSVC buildBrian Paul2018-04-132-2/+12
| | | | | | | Don't include Unix headers or use Unix functions when building with MSVC. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* gallium: move ddebug, noop, rbug, trace to auxiliary to improve build timesMarek Olšák2018-04-136-0/+3628
which also simplifies the build scripts.