ImGui::NewFrame();
position_layer(data);
ImGui::Begin("Mesa overlay");
- ImGui::Text("Device: %s", device_data->properties.deviceName);
+ if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_device])
+ ImGui::Text("Device: %s", device_data->properties.deviceName);
- const char *format_name = vk_Format_to_str(data->format);
- format_name = format_name ? (format_name + strlen("VK_FORMAT_")) : "unknown";
- ImGui::Text("Swapchain format: %s", format_name);
+ if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_format]) {
+ const char *format_name = vk_Format_to_str(data->format);
+ format_name = format_name ? (format_name + strlen("VK_FORMAT_")) : "unknown";
+ ImGui::Text("Swapchain format: %s", format_name);
+ }
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_frame])
ImGui::Text("Frames: %" PRIu64, data->n_frames);
if (instance_data->params.enabled[OVERLAY_PARAM_ENABLED_fps])
if (device_data->graphic_queue->family_index != present_queue->family_index)
{
/* Transfer the image back to the present queue family
- * image layout was already changed to present by the render pass
+ * image layout was already changed to present by the render pass
*/
imb.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
imb.pNext = nullptr;
/* Visible by default */
params->enabled[OVERLAY_PARAM_ENABLED_fps] = true;
params->enabled[OVERLAY_PARAM_ENABLED_frame_timing] = true;
+ params->enabled[OVERLAY_PARAM_ENABLED_device] = true;
+ params->enabled[OVERLAY_PARAM_ENABLED_format] = true;
params->fps_sampling_period = 500000; /* 500ms */
params->width = params->height = 300;
params->control = -1;
#include <stdbool.h>
#define OVERLAY_PARAMS \
+ OVERLAY_PARAM_BOOL(device) \
+ OVERLAY_PARAM_BOOL(format) \
OVERLAY_PARAM_BOOL(fps) \
OVERLAY_PARAM_BOOL(frame) \
OVERLAY_PARAM_BOOL(frame_timing) \