Sometimes the surface allocation is deferred. In such case it should be
checked correctly before it is using. Otherwise the corresponding
GPU buffer is NULL.
This is to fix the regression issue reported by XBMC.
Tested-by: Zaverel <zaverel@free.fr>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
7c47a8f74878904e0d2fbb5da966552f783d74ab)
unsigned int saved_filter_flag;
struct i965_post_processing_context *i965pp_context = i965->pp_context;
+ if (obj_surface->fourcc == 0) {
+ i965_check_alloc_surface_bo(ctx, obj_surface, 1,
+ VA_FOURCC_NV12,
+ SUBSAMPLE_YUV420);
+ }
+
i965_vpp_clear_surface(ctx, &proc_context->pp_context,
obj_surface,
pipeline_param->output_background_color);