You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/frame/vulkan.rs
+21-8Lines changed: 21 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -352,9 +352,12 @@ impl Vulkan {
352
352
1, frame.num_objects,
353
353
"Frames with multiple objects are not supported yet, use WLR_DRM_NO_MODIFIERS=1 as described in README and follow issue #8"
354
354
);
355
-
assert_eq!(
356
-
875713112, frame.format,
357
-
"Frame with formats other than DRM_FORMAT_XRGB8888 are not supported yet (yours is {}). If you see this issue, please open a GitHub issue (unless there's one already open) and share your format value", frame.format
355
+
356
+
let vk_format = map_drm_format(frame.format);
357
+
358
+
assert!(
359
+
vk_format.is_some(),
360
+
"Frame with formats other than DRM_FORMAT_XRGB8888 or DRM_FORMAT_XRGB2101010 are not supported yet (yours is {}). If you see this issue, please open a GitHub issue (unless there's one already open) and share your format value", frame.format
358
361
);
359
362
360
363
// External memory info
@@ -365,7 +368,7 @@ impl Vulkan {
365
368
let frame_image_create_info = vk::ImageCreateInfo::default()
366
369
.push_next(&mut frame_image_memory_info)
367
370
.image_type(vk::ImageType::TYPE_2D)
368
-
.format(vk::Format::B8G8R8A8_UNORM)
371
+
.format(vk_format.unwrap())
369
372
.extent(vk::Extent3D{
370
373
width: frame.width,
371
374
height: frame.height,
@@ -462,9 +465,11 @@ impl Vulkan {
462
465
"Frames with multiple objects are not supported yet, use WLR_DRM_NO_MODIFIERS=1 as described in README and follow issue #8"
463
466
);
464
467
465
-
assert_eq!(
466
-
875713112, frame.format,
467
-
"Frame with formats other than DRM_FORMAT_XRGB8888 are not supported yet (yours is {}). If you see this issue, please open a GitHub issue (unless there's one already open) and share your format value", frame.format
468
+
let vk_format = map_drm_format(frame.format);
469
+
470
+
assert!(
471
+
vk_format.is_some(),
472
+
"Frame with formats other than DRM_FORMAT_XRGB8888 or DRM_FORMAT_XRGB2101010 are not supported yet (yours is {}). If you see this issue, please open a GitHub issue (unless there's one already open) and share your format value", frame.format
0 commit comments