drm: plane_formats -> primary_formats
This commit is contained in:
parent
94706f0f0e
commit
a7ab8e7a1a
3 changed files with 12 additions and 12 deletions
20
src/drm.cpp
20
src/drm.cpp
|
@ -167,16 +167,6 @@ static struct plane *find_primary_plane(struct drm_t *drm)
|
||||||
if (primary == nullptr)
|
if (primary == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!get_plane_formats(drm, primary, &drm->plane_formats)) {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_nDRMFormat = pick_plane_format(&drm->plane_formats);
|
|
||||||
if ( g_nDRMFormat == DRM_FORMAT_INVALID ) {
|
|
||||||
fprintf( stderr, "Primary plane doesn't support XRGB8888 nor ARGB8888\n" );
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return primary;
|
return primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -548,6 +538,16 @@ int init_drm(struct drm_t *drm, const char *device_name)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!get_plane_formats(drm, drm->plane, &drm->primary_formats)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_nDRMFormat = pick_plane_format(&drm->primary_formats);
|
||||||
|
if ( g_nDRMFormat == DRM_FORMAT_INVALID ) {
|
||||||
|
fprintf( stderr, "Primary plane doesn't support XRGB8888 nor ARGB8888\n" );
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
drm->kms_in_fence_fd = -1;
|
drm->kms_in_fence_fd = -1;
|
||||||
|
|
||||||
std::thread flip_handler_thread( flip_handler_thread_run );
|
std::thread flip_handler_thread( flip_handler_thread_run );
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct drm_t {
|
||||||
int kms_in_fence_fd;
|
int kms_in_fence_fd;
|
||||||
int kms_out_fence_fd;
|
int kms_out_fence_fd;
|
||||||
|
|
||||||
struct wlr_drm_format_set plane_formats;
|
struct wlr_drm_format_set primary_formats;
|
||||||
|
|
||||||
drmModeAtomicReq *req;
|
drmModeAtomicReq *req;
|
||||||
uint32_t flags;
|
uint32_t flags;
|
||||||
|
|
|
@ -381,7 +381,7 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, VkFormat format, cr
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const struct wlr_drm_format *drmFormatDesc = wlr_drm_format_set_get( &g_DRM.plane_formats, drmFormat );
|
const struct wlr_drm_format *drmFormatDesc = wlr_drm_format_set_get( &g_DRM.primary_formats, drmFormat );
|
||||||
assert( drmFormatDesc != nullptr );
|
assert( drmFormatDesc != nullptr );
|
||||||
possibleModifiers = drmFormatDesc->modifiers;
|
possibleModifiers = drmFormatDesc->modifiers;
|
||||||
numPossibleModifiers = drmFormatDesc->len;
|
numPossibleModifiers = drmFormatDesc->len;
|
||||||
|
|
Loading…
Reference in a new issue