mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 02:30:18 +01:00
i965/drm: Check INTEL_DEBUG & DEBUG_BUFMGR directly.
Eliminates some API around this, and more importantly, the last field in one bufmgr class. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
68cb0c6d92
commit
dca224a9ef
5 changed files with 3 additions and 19 deletions
|
|
@ -126,7 +126,6 @@ int drm_bacon_bo_get_subdata(drm_bacon_bo *bo, unsigned long offset,
|
|||
unsigned long size, void *data);
|
||||
void drm_bacon_bo_wait_rendering(drm_bacon_bo *bo);
|
||||
|
||||
void drm_bacon_bufmgr_set_debug(drm_bacon_bufmgr *bufmgr, int enable_debug);
|
||||
void drm_bacon_bufmgr_destroy(drm_bacon_bufmgr *bufmgr);
|
||||
int drm_bacon_bo_exec(drm_bacon_bo *bo, int used,
|
||||
struct drm_clip_rect *cliprects, int num_cliprects, int DR4);
|
||||
|
|
|
|||
|
|
@ -175,12 +175,6 @@ drm_bacon_bo_mrb_exec(drm_bacon_bo *bo, int used,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
drm_bacon_bufmgr_set_debug(drm_bacon_bufmgr *bufmgr, int enable_debug)
|
||||
{
|
||||
bufmgr->debug = enable_debug;
|
||||
}
|
||||
|
||||
int
|
||||
drm_bacon_bufmgr_check_aperture_space(drm_bacon_bo ** bo_array, int count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#ifndef ETIME
|
||||
#define ETIME ETIMEDOUT
|
||||
#endif
|
||||
#include "common/gen_debug.h"
|
||||
#include "libdrm_macros.h"
|
||||
#include "main/macros.h"
|
||||
#include "util/macros.h"
|
||||
|
|
@ -78,10 +79,7 @@
|
|||
|
||||
#define memclear(s) memset(&s, 0, sizeof(s))
|
||||
|
||||
#define DBG(...) do { \
|
||||
if (bufmgr_gem->bufmgr.debug) \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
} while (0)
|
||||
#define FILE_DEBUG_FLAG DEBUG_BUFMGR
|
||||
|
||||
static inline int
|
||||
atomic_add_unless(int *v, int add, int unless)
|
||||
|
|
@ -2107,7 +2105,7 @@ do_exec2(drm_bacon_bo *bo, int used, drm_bacon_context *ctx,
|
|||
*out_fence = execbuf.rsvd2 >> 32;
|
||||
|
||||
skip_execution:
|
||||
if (bufmgr_gem->bufmgr.debug)
|
||||
if (INTEL_DEBUG & DEBUG_BUFMGR)
|
||||
drm_bacon_gem_dump_validation_list(bufmgr_gem);
|
||||
|
||||
for (i = 0; i < bufmgr_gem->exec_count; i++) {
|
||||
|
|
@ -3180,7 +3178,6 @@ drm_bacon_bufmgr_gem_init(int fd, int batch_size)
|
|||
bufmgr_gem->bufmgr.bo_busy = drm_bacon_gem_bo_busy;
|
||||
bufmgr_gem->bufmgr.bo_madvise = drm_bacon_gem_bo_madvise;
|
||||
bufmgr_gem->bufmgr.destroy = drm_bacon_bufmgr_gem_unref;
|
||||
bufmgr_gem->bufmgr.debug = 0;
|
||||
bufmgr_gem->bufmgr.check_aperture_space =
|
||||
drm_bacon_gem_check_aperture_space;
|
||||
bufmgr_gem->bufmgr.bo_disable_reuse = drm_bacon_gem_bo_disable_reuse;
|
||||
|
|
|
|||
|
|
@ -275,9 +275,6 @@ struct _drm_bacon_bufmgr {
|
|||
|
||||
/** Returns true if target_bo is in the relocation tree rooted at bo. */
|
||||
int (*bo_references) (drm_bacon_bo *bo, drm_bacon_bo *target_bo);
|
||||
|
||||
/**< Enables verbose debugging printouts */
|
||||
int debug;
|
||||
};
|
||||
|
||||
struct _drm_bacon_context {
|
||||
|
|
|
|||
|
|
@ -1771,9 +1771,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)
|
|||
|
||||
brw_process_intel_debug_variable();
|
||||
|
||||
if (INTEL_DEBUG & DEBUG_BUFMGR)
|
||||
drm_bacon_bufmgr_set_debug(screen->bufmgr, true);
|
||||
|
||||
if ((INTEL_DEBUG & DEBUG_SHADER_TIME) && devinfo->gen < 7) {
|
||||
fprintf(stderr,
|
||||
"shader_time debugging requires gen7 (Ivybridge) or better.\n");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue