Skip to content

Commit ce9931f

Browse files
committed
feat: use gbm_surface_create_with_modifiers2
To be able to specify more surface usage hints, i.e. `GBM_BO_USE_SCANOUT` and `GBM_BO_USE_RENDERING`.
1 parent f6e104f commit ce9931f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/egl_gbm_render_surface.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,14 @@ static int egl_gbm_render_surface_init(
150150
int with_modifiers_errno = 0;
151151
gbm_surface = NULL;
152152
if (allowed_modifiers != NULL) {
153-
gbm_surface = gbm_surface_create_with_modifiers(
153+
gbm_surface = gbm_surface_create_with_modifiers2(
154154
gbm_device,
155155
size.x,
156156
size.y,
157157
get_pixfmt_info(pixel_format)->gbm_format,
158158
allowed_modifiers,
159-
n_allowed_modifiers
159+
n_allowed_modifiers,
160+
GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING
160161
);
161162
if (gbm_surface == NULL) {
162163
with_modifiers_errno = errno;

0 commit comments

Comments
 (0)