-
Notifications
You must be signed in to change notification settings - Fork 305
enable memory location query and set #601
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1675,6 +1675,17 @@ typedef enum { | |
* when importing an existing buffer. | ||
*/ | ||
VASurfaceAttribDRMFormatModifiers, | ||
/** \brief surface region/location (int read/write) | ||
* read: when read the value by vaQuerySurfaceAttributes or vaGetSurfaceAttributes | ||
* the bit0 represent the system memory existence and could be used by backend driver for given profile | ||
* bit 1 represent the local memory existence and could be used by backend driver for given profile. | ||
* | ||
* write: when call vaCreateSurfaces, the attribute could be used to specify the memory location | ||
* if bit0 is 1, it will be allocated on system memory, if bit1 is 1, it will be allocated on local memory | ||
* could not set both bit0 and bit1 to same value, if so, backend driver will allocate the surface ignoring | ||
* this hint. | ||
*/ | ||
VASurfaceAttribValueMemoryRegion, | ||
/** \brief Number of surface attributes. */ | ||
VASurfaceAttribCount | ||
} VASurfaceAttribType; | ||
|
@@ -4626,9 +4637,16 @@ typedef struct _VAImage { | |
* Only entry_bytes characters of the string are used. | ||
*/ | ||
int8_t component_order[4]; | ||
/* | ||
* Image flags , app could retrieve surface informations by this flag after calling vaDeriveImage | ||
* the flags could include the memory location/region etc. | ||
* bit0: whether the flags is valid, 0 invalid, 1 valid | ||
* bit1: memory location 0 system memeory, 1 local memory. | ||
*/ | ||
uint32_t flags; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we really need add this "flags" member in VAImage, since we can query memory region info through surfaceattributes (e.g., surface_attrib.value.value.i) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the problem is we could not get surfaceattributes for one dedicate surface |
||
|
||
/** \brief Reserved bytes for future use, must be zero */ | ||
uint32_t va_reserved[VA_PADDING_LOW]; | ||
uint32_t va_reserved[VA_PADDING_LOW - 1]; | ||
} VAImage; | ||
|
||
/** Get maximum number of image formats supported by the implementation */ | ||
|
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.
Can we introduce some bit masks to help users understand what's going on?