OSDN Git Service

Export the profile/entrypoints for the wrapped backend drivers
authorZhao Yakui <yakui.zhao@intel.com>
Sun, 6 Sep 2015 01:39:15 +0000 (09:39 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Sun, 6 Sep 2015 07:13:58 +0000 (15:13 +0800)
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit ad7b5a0233d8ead9a2ca141f3fa75f4bda1045c1)

src/i965_drv_video.c

index 5bf9ff3..1cc4775 100644 (file)
@@ -564,6 +564,25 @@ i965_QueryConfigProfiles(VADriverContextP ctx,
         profile_list[i++] = VAProfileHEVCMain;
     }
 
+    if (i965->wrapper_pdrvctx) {
+        VAProfile wrapper_list[4];
+        int wrapper_num;
+        VADriverContextP pdrvctx;
+        VAStatus va_status;
+
+        pdrvctx = i965->wrapper_pdrvctx;
+        CALL_VTABLE(pdrvctx, va_status,
+                    vaQueryConfigProfiles(pdrvctx,
+                                          wrapper_list, &wrapper_num));
+
+        if (va_status == VA_STATUS_SUCCESS) {
+            int j;
+            for (j = 0; j < wrapper_num; j++)
+                if (wrapper_list[j] != VAProfileNone)
+                    profile_list[i++] = wrapper_list[j];
+        }
+    }
+
     /* If the assert fails then I965_MAX_PROFILES needs to be bigger */
     ASSERT_RET(i <= I965_MAX_PROFILES, VA_STATUS_ERROR_OPERATION_FAILED);
     *num_profiles = i;
@@ -648,6 +667,20 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
 
         break;
 
+    case VAProfileVP9Profile0:
+        if (i965->wrapper_pdrvctx) {
+            VAStatus va_status = VA_STATUS_SUCCESS;
+            VADriverContextP pdrvctx = i965->wrapper_pdrvctx;
+
+            CALL_VTABLE(pdrvctx, va_status,
+                        vaQueryConfigEntrypoints(pdrvctx, profile,
+                                                 entrypoint_list,
+                                                 num_entrypoints));
+            return va_status;
+        }
+
+        break;
+
     default:
         break;
     }
@@ -745,6 +778,13 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
 
         break;
 
+    case VAProfileVP9Profile0:
+        if (i965->wrapper_pdrvctx)
+            va_status = VA_STATUS_SUCCESS;
+        else
+            va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+        break;
+
     default:
         va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
         break;