gbm.rs icon indicating copy to clipboard operation
gbm.rs copied to clipboard

Add wrapper for `gbm_device_get_format_modifier_plane_count`

Open ids1024 opened this issue 1 year ago • 2 comments

I'm not sure what to do about the error type here. gbm_dri_get_format_modifier_plane_count does potentially return -1, but doesn't set errno.

Error handling generally looks like it could use some fixes in both gbm.rs and in Mesa...

ids1024 avatar Feb 05 '24 21:02 ids1024

I found myself needing this as well. What's left to be done here?

yshui avatar May 26 '24 17:05 yshui

I'm not sure what to do about the error type here. gbm_dri_get_format_modifier_plane_count does potentially return -1, but doesn't set errno.

Maybe just put this into an Option then and parse every value <= 0 as None? It seems reasonable that some modifiers (e.g. INVALID) don't have a defined plane count.

Drakulix avatar May 27 '24 10:05 Drakulix