"Track all buffer objects with at least one reference." },
{ "bo_zero", PVR_DEBUG_ZERO_BOS,
"Zero all buffer objects at allocation to make them deterministic." },
+ { "vk_desc", PVR_DEBUG_VK_DUMP_DESCRIPTOR_SET_LAYOUT,
+ "Dump descriptor set and pipeline layouts." },
DEBUG_NAMED_VALUE_END
};
/* clang-format on */
#include "hwdef/rogue_hw_utils.h"
#include "pvr_bo.h"
+#include "pvr_debug.h"
#include "pvr_private.h"
#include "pvr_types.h"
#include "util/compiler.h"
#include "vk_object.h"
#include "vk_util.h"
-#if defined(DEBUG)
static const struct {
const char *raw;
const char *primary;
"VK UNIFORM_BUFFER_DYNAMIC",
"VK STORAGE_BUFFER_DYNAMIC",
"VK INPUT_ATTACHMENT" };
-#endif
#define PVR_DESC_IMAGE_SECONDARY_OFFSET_ARRAYBASE 0U
#define PVR_DESC_IMAGE_SECONDARY_SIZE_ARRAYBASE 2U
}
}
-#if defined(DEBUG)
static void
pvr_dump_in_memory_layout_sizes(const struct pvr_descriptor_set_layout *layout)
{
mesa_logd("==============================================");
}
}
-#endif
VkResult pvr_CreateDescriptorSetLayout(
VkDevice _device,
pvr_setup_in_memory_layout_sizes(layout, reg_usage);
-#if defined(DEBUG)
- pvr_dump_in_memory_layout_sizes(layout);
-#endif
+ if (PVR_IS_DEBUG_SET(VK_DUMP_DESCRIPTOR_SET_LAYOUT))
+ pvr_dump_in_memory_layout_sizes(layout);
vk_free2(&device->vk.alloc, pAllocator, bindings);
pvr_descriptor_set_layout_free(device, pAllocator, layout);
}
-#if defined(DEBUG)
static void
pvr_dump_in_register_layout_sizes(const struct pvr_device *device,
const struct pvr_pipeline_layout *layout)
# undef LOGD_CHAR_NTIMES
# undef SEPARATOR_LENGTH
}
-#endif
/* Pipeline layouts. These have nothing to do with the pipeline. They are
* just multiple descriptor set layouts pasted together.
layout->compute_push_constants_offset = range->offset;
}
-#if defined(DEBUG)
- pvr_dump_in_register_layout_sizes(device, layout);
-#endif
+ if (PVR_IS_DEBUG_SET(VK_DUMP_DESCRIPTOR_SET_LAYOUT))
+ pvr_dump_in_register_layout_sizes(device, layout);
*pPipelineLayout = pvr_pipeline_layout_to_handle(layout);