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);
}
}
-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)
{
#ifndef ETIME
#define ETIME ETIMEDOUT
#endif
+#include "common/gen_debug.h"
#include "libdrm_macros.h"
#include "main/macros.h"
#include "util/macros.h"
#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)
*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++) {
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;
/** 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 {
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");