-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add interface for modifier query #589
base: master
Are you sure you want to change the base?
Conversation
XinfengZhang
commented
Apr 16, 2022
- this interface is for modifier query/negotiation. it could query the modifier list for a given format under a config
- it support different modifier list for different format. for example: ARGB maybe just support linear, RGB maybe support linear only, NV12 support tile4 etc.
the interface is used to get the modifier list for a format supplying a config Signed-off-by: Carl Zhang <[email protected]>
add backend function for the interfaces which is used to query additional information of a given format Signed-off-by: Carl Zhang <[email protected]>
Maybe, I think, we just need to extend the "vaQuerySurfaceAttributes" a little. For example, we define a new type VASurfaceAttribDRMFormatModifiersForFormat after VASurfaceAttribDRMFormatModifiers. The VASurfaceAttribDRMFormatModifiers return all possible modifiers for a config, while the VASurfaceAttribDRMFormatModifiersForFormat just return the modifiers for some specific format of that config. And we define a struct, such as: Then we can avoid define a new API. |
But that's already in place #505 Sadly, media-driver, neither mesa still no have an implementation for vaQuerySurfaceAttributes. Mesa only implemented the vaCreateSurface part. |
any chance to get this mergered? The capability would help us a lot with color accuracy. |
That's because it can't be implemented, the modifier query only makes sense when format is specified which is not the case with So we would need this PR ( |
Does there exist a mesa merge request for this? |
No, but I can make one if that can help getting this merged. |
Well, if you're in the mood for it, I'd say: go for it. ;) |
Mesa impl: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32053 Test app to print all modifiers: https://gist.github.com/nowrep/4c3eab86ad77dcfa605f516b567a66c1 |