hardware/intel/intel-driver
リビジョン | 2f254ecd154d59553a1e3949f66161bade6ca2b7 (tree) |
---|---|
日時 | 2015-09-06 15:13:27 |
作者 | Zhao Yakui <yakui.zhao@inte...> |
コミッター | Xiang, Haihao |
Add one field for Config/Context/Surface/Buffer to store the wrapper content
This is to do the preparation that the libva-intel-driver can be the user of
other backend driver.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
@@ -881,6 +881,7 @@ i965_CreateConfig(VADriverContextP ctx, | ||
881 | 881 | obj_config->profile = profile; |
882 | 882 | obj_config->entrypoint = entrypoint; |
883 | 883 | obj_config->num_attribs = 0; |
884 | + obj_config->wrapper_config = VA_INVALID_ID; | |
884 | 885 | |
885 | 886 | for (i = 0; i < num_attribs; i++) { |
886 | 887 | vaStatus = i965_ensure_config_attribute(obj_config, &attrib_list[i]); |
@@ -1299,6 +1300,8 @@ i965_CreateSurfaces2( | ||
1299 | 1300 | obj_surface->free_private_data = NULL; |
1300 | 1301 | obj_surface->subsampling = SUBSAMPLE_YUV420; |
1301 | 1302 | |
1303 | + obj_surface->wrapper_surface = VA_INVALID_ID; | |
1304 | + | |
1302 | 1305 | switch (memory_type) { |
1303 | 1306 | case I965_SURFACE_MEM_NATIVE: |
1304 | 1307 | if (memory_attibute) { |
@@ -1860,6 +1863,7 @@ i965_CreateContext(VADriverContextP ctx, | ||
1860 | 1863 | obj_context->render_targets = |
1861 | 1864 | (VASurfaceID *)calloc(num_render_targets, sizeof(VASurfaceID)); |
1862 | 1865 | obj_context->hw_context = NULL; |
1866 | + obj_context->wrapper_context = VA_INVALID_ID; | |
1863 | 1867 | |
1864 | 1868 | for(i = 0; i < num_render_targets; i++) { |
1865 | 1869 | if (NULL == SURFACE(render_targets[i])) { |
@@ -2044,6 +2048,8 @@ i965_create_buffer_internal(VADriverContextP ctx, | ||
2044 | 2048 | obj_buffer->type = type; |
2045 | 2049 | obj_buffer->export_refcount = 0; |
2046 | 2050 | obj_buffer->buffer_store = NULL; |
2051 | + obj_buffer->wrapper_buffer = VA_INVALID_ID; | |
2052 | + | |
2047 | 2053 | buffer_store = calloc(1, sizeof(struct buffer_store)); |
2048 | 2054 | assert(buffer_store); |
2049 | 2055 | buffer_store->ref_count = 1; |
@@ -105,6 +105,8 @@ struct object_config | ||
105 | 105 | VAEntrypoint entrypoint; |
106 | 106 | VAConfigAttrib attrib_list[I965_MAX_CONFIG_ATTRIBUTES]; |
107 | 107 | int num_attribs; |
108 | + | |
109 | + VAGenericID wrapper_config; | |
108 | 110 | }; |
109 | 111 | |
110 | 112 | #define NUM_SLICES 10 |
@@ -245,6 +247,8 @@ struct object_context | ||
245 | 247 | int codec_type; |
246 | 248 | union codec_state codec_state; |
247 | 249 | struct hw_context *hw_context; |
250 | + | |
251 | + VAGenericID wrapper_context; | |
248 | 252 | }; |
249 | 253 | |
250 | 254 | #define SURFACE_REFERENCED (1 << 0) |
@@ -285,6 +289,8 @@ struct object_surface | ||
285 | 289 | uint32_t user_disable_tiling : 1; |
286 | 290 | uint32_t user_h_stride_set : 1; |
287 | 291 | uint32_t user_v_stride_set : 1; |
292 | + | |
293 | + VAGenericID wrapper_surface; | |
288 | 294 | }; |
289 | 295 | |
290 | 296 | struct object_buffer |
@@ -299,6 +305,8 @@ struct object_buffer | ||
299 | 305 | /* Export state */ |
300 | 306 | unsigned int export_refcount; |
301 | 307 | VABufferInfo export_state; |
308 | + | |
309 | + VAGenericID wrapper_buffer; | |
302 | 310 | }; |
303 | 311 | |
304 | 312 | struct object_image |