-
Notifications
You must be signed in to change notification settings - Fork 306
Introduce VADisplayAttribSurfaceAttribs #519
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
Conversation
This allows applications to query the supported surface attributes. This is useful to allow applications to make sure their attributes are taken into account, and allow them to have a fallback when a surface attribute is not supported. ffmpeg already needs a workaround [1] to figure out whether a driver supports VASurfaceAttribMemoryType. [1]: https://github.com/FFmpeg/FFmpeg/blob/d393c45051ddaf6146e7e29ec2ea97035a727529/libavutil/hwcontext_vaapi.h#L53
not sure whether I understand your purpose, I dont think we need a special attribute to report whether we support another attributes. when a attributes is un-support. it should return with a value VA_ATTRIB_NOT_SUPPORTED, if it is a pointer, it should be set to null. so, why we need to use vaQueryDisplayAttributes to query whether a surface attribute is support or not? |
Ah, I was wondering about this. It doesn't seem like intel media driver is doing it. I've filled a pull request to fix that: intel/media-driver#1176
It's a little tricky for the caller to figure out which attribute caused the failure. If the application provided both If they know in advanced the surface attributes supported by the display, applications can have a fallback. For instance, if |
the normal call sequence should be: so , before vaCreateSurfaces, it should already know which attribute could be supported. with your PR, the call sequence seems be changed to it looks a little strange. |
Ah, I guess my question is: how does the application know that the driver supports attributes which aren't readable (only writable)? Examples: Should the driver return the writable attribute without any value in |
query function support this flag https://github.com/intel/libva/blob/master/va/va.h#L1600 and the value could be |
* before calling vaPutSurface() | ||
* before calling vaPutSurface(). | ||
* | ||
* Display attributes also are used to query/set display adaptor (vaDisplay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's prioritize #514 - you will need to rebase once that one will be merged.
Closing since drivers should return settable attributes in |
This allows applications to query the supported surface attributes.
This is useful to allow applications to make sure their attributes
are taken into account, and allow them to have a fallback when a
surface attribute is not supported.
ffmpeg already needs a workaround to figure out whether a driver
supports VASurfaceAttribMemoryType.
The concept of a "HW attribute" is borrowed from #513 and #514.