feat: add layer debugging via libliftoff log
Activate libliftoff's internal log when layers are enabled and the parameter 'd' is provided. Note: this needs some patches to libliftoff to make the debug readable that I have proposed upstream.
This commit is contained in:
parent
d17f234738
commit
8833e07618
3 changed files with 12 additions and 3 deletions
|
@ -27,6 +27,7 @@ uint32_t g_nDRMFormat;
|
|||
bool g_bRotated;
|
||||
|
||||
bool g_bUseLayers;
|
||||
bool g_bDebugLayers;
|
||||
|
||||
static int s_drm_log = 0;
|
||||
|
||||
|
@ -458,6 +459,10 @@ int init_drm(struct drm_t *drm, const char *device, const char *mode_str, unsign
|
|||
g_nOutputWidth = drm->mode->vdisplay;
|
||||
g_nOutputHeight = drm->mode->hdisplay;
|
||||
}
|
||||
|
||||
if (g_bUseLayers) {
|
||||
liftoff_log_init(g_bDebugLayers ? LIFTOFF_DEBUG : LIFTOFF_ERROR, NULL);
|
||||
}
|
||||
|
||||
drm->lo_device = liftoff_device_create( drm->fd );
|
||||
drm->lo_output = liftoff_output_create( drm->lo_device, drm->crtc_id );
|
||||
|
@ -701,8 +706,8 @@ bool drm_can_avoid_composite( struct drm_t *drm, struct Composite_t *pComposite,
|
|||
{
|
||||
liftoff_layer_set_property( drm->lo_layers[ i ], "rotation", DRM_MODE_ROTATE_270);
|
||||
}
|
||||
|
||||
if ( pPipeline->layerBindings[ i ].fbid == 0 )
|
||||
|
||||
if ( pPipeline->layerBindings[ i ].fbid != 0 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -86,6 +86,7 @@ extern uint32_t g_nDRMFormat;
|
|||
|
||||
extern bool g_bUseLayers;
|
||||
extern bool g_bRotated;
|
||||
extern bool g_bDebugLayers;
|
||||
|
||||
int init_drm(struct drm_t *drm, const char *device, const char *mode_str, unsigned int vrefresh);
|
||||
int drm_atomic_commit(struct drm_t *drm, struct Composite_t *pComposite, struct VulkanPipeline_t *pPipeline );
|
||||
|
|
|
@ -59,7 +59,7 @@ int main(int argc, char **argv)
|
|||
|
||||
bool bSleepAtStartup = false;
|
||||
|
||||
while ((o = getopt (argc, argv, ":R:T:w:h:W:H:r:NSvVecslnb")) != -1)
|
||||
while ((o = getopt (argc, argv, ":R:T:w:h:W:H:r:NSvVecsdlnb")) != -1)
|
||||
{
|
||||
switch (o) {
|
||||
case 'w':
|
||||
|
@ -83,6 +83,9 @@ int main(int argc, char **argv)
|
|||
case 'l':
|
||||
g_bUseLayers = true;
|
||||
break;
|
||||
case 'd':
|
||||
g_bDebugLayers = true;
|
||||
break;
|
||||
case 'n':
|
||||
g_bFilterGameWindow = false;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue