#include "vc4_resource.h"
#include "vc4_tiling.h"
-static bool miptree_debug = false;
-
static bool
vc4_resource_bo_alloc(struct vc4_resource *rsc)
{
struct pipe_screen *pscreen = prsc->screen;
struct vc4_bo *bo;
- if (miptree_debug) {
+ if (vc4_debug & VC4_DEBUG_SURFACE) {
fprintf(stderr, "alloc %p: size %d + offset %d -> %d\n",
rsc,
rsc->slices[0].size,
offset += slice->size;
- if (miptree_debug) {
+ if (vc4_debug & VC4_DEBUG_SURFACE) {
static const char tiling_chars[] = {
[VC4_TILING_FORMAT_LINEAR] = 'R',
[VC4_TILING_FORMAT_LT] = 'L',
goto fail;
}
- if (miptree_debug) {
+ if (vc4_debug & VC4_DEBUG_SURFACE) {
fprintf(stderr,
"rsc import %p (format %d), %dx%d: "
"level 0 (R) -> stride %d@0x%08x\n",
static const struct debug_named_value debug_options[] = {
{ "cl", VC4_DEBUG_CL,
"Dump command list during creation" },
+ { "surf", VC4_DEBUG_SURFACE,
+ "Dump surface layouts" },
{ "qpu", VC4_DEBUG_QPU,
"Dump generated QPU instructions" },
{ "qir", VC4_DEBUG_QIR,
#define VC4_DEBUG_ALWAYS_SYNC 0x0100
#define VC4_DEBUG_NIR 0x0200
#define VC4_DEBUG_DUMP 0x0400
+#define VC4_DEBUG_SURFACE 0x0800
#define VC4_MAX_MIP_LEVELS 12
#define VC4_MAX_TEXTURE_SAMPLERS 16