handle->modifier = fd_resource_modifier(rsc);
- DBG("%p: target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, "
- "nr_samples=%u, usage=%u, bind=%x, flags=%x, modifier=%"PRIx64,
- prsc, prsc->target, util_format_name(prsc->format),
- prsc->width0, prsc->height0, prsc->depth0,
- prsc->array_size, prsc->last_level, prsc->nr_samples,
- prsc->usage, prsc->bind, prsc->flags,
- handle->modifier);
+ DBG("%"PRSC_FMT", modifier=%"PRIx64, PRSC_ARGS(prsc), handle->modifier);
return fd_screen_bo_get_handle(pscreen, rsc->bo, rsc->scanout,
fd_resource_pitch(rsc, 0), handle);
rsc = CALLOC_STRUCT(fd_resource);
prsc = &rsc->base;
- DBG("%p: target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, "
- "nr_samples=%u, usage=%u, bind=%x, flags=%x", prsc,
- tmpl->target, util_format_name(format),
- tmpl->width0, tmpl->height0, tmpl->depth0,
- tmpl->array_size, tmpl->last_level, tmpl->nr_samples,
- tmpl->usage, tmpl->bind, tmpl->flags);
-
if (!rsc)
return NULL;
*prsc = *tmpl;
+
+ DBG("%"PRSC_FMT, PRSC_ARGS(prsc));
+
fd_resource_layout_init(prsc);
#define LINEAR \
struct fdl_slice *slice = fd_resource_slice(rsc, 0);
struct pipe_resource *prsc = &rsc->base;
- DBG("%p: target=%d, format=%s, %ux%ux%u, array_size=%u, last_level=%u, "
- "nr_samples=%u, usage=%u, bind=%x, flags=%x, modifier=%"PRIx64,
- prsc, tmpl->target, util_format_name(tmpl->format),
- tmpl->width0, tmpl->height0, tmpl->depth0,
- tmpl->array_size, tmpl->last_level, tmpl->nr_samples,
- tmpl->usage, tmpl->bind, tmpl->flags,
- handle->modifier);
-
*prsc = *tmpl;
+
+ DBG("%"PRSC_FMT", modifier=%"PRIx64, PRSC_ARGS(prsc), handle->modifier);
+
fd_resource_layout_init(prsc);
pipe_reference_init(&prsc->reference, 1);
#define FREEDRENO_RESOURCE_H_
#include "util/list.h"
+#include "util/u_dump.h"
#include "util/u_range.h"
#include "util/u_transfer_helper.h"
#include "util/simple_mtx.h"
#include "freedreno_util.h"
#include "freedreno/fdl/freedreno_layout.h"
+
+#define PRSC_FMT \
+ "p: target=%s, format=%s, %ux%ux%u, " \
+ "array_size=%u, last_level=%u, " \
+ "nr_samples=%u, usage=%u, bind=%x, flags=%x"
+#define PRSC_ARGS(p) \
+ (p), util_str_tex_target((p)->target, true), util_format_short_name((p)->format), \
+ (p)->width0, (p)->height0, (p)->depth0, (p)->array_size, (p)->last_level, \
+ (p)->nr_samples, (p)->usage, (p)->bind, (p)->flags
+
+
enum fd_lrz_direction {
FD_LRZ_UNKNOWN,
/* Depth func less/less-than: */