summarylogtreecommitdiffstats
path: root/fix_surface_querys.patch
blob: 288962e73fbd745290e8c96cf153e188f9de08ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- intel-vaapi-driver/src/i965_drv_video.c.orig	2017-04-20 00:11:01.000000000 +0200
+++ intel-vaapi-driver/src/i965_drv_video.c	2017-04-22 15:33:21.986238617 +0200
@@ -5459,15 +5459,7 @@
             attrib_list[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
 
             if (attrib_list[i].value.value.i == 0) {
-                if (IS_G4X(i965->intel.device_info)) {
-                    if (obj_config->profile == VAProfileMPEG2Simple ||
-                        obj_config->profile == VAProfileMPEG2Main) {
-                        attrib_list[i].value.value.i = VA_FOURCC_I420;
-                    } else {
-                        assert(0);
-                        attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED;
-                    }
-                } else if (IS_IRONLAKE(i965->intel.device_info)) {
+                if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) {
                     if (obj_config->profile == VAProfileMPEG2Simple ||
                         obj_config->profile == VAProfileMPEG2Main) {
                         attrib_list[i].value.value.i = VA_FOURCC_I420;
@@ -5492,18 +5484,7 @@
                         attrib_list[i].value.value.i = VA_FOURCC_NV12;
                 }
             } else {
-                if (IS_G4X(i965->intel.device_info)) {
-                    if (obj_config->profile == VAProfileMPEG2Simple ||
-                        obj_config->profile == VAProfileMPEG2Main) {
-                        if (attrib_list[i].value.value.i != VA_FOURCC_I420) {
-                            attrib_list[i].value.value.i = 0;
-                            attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE;
-                        }
-                    } else {
-                        assert(0);
-                        attrib_list[i].flags = VA_SURFACE_ATTRIB_NOT_SUPPORTED;
-                    }
-                } else if (IS_IRONLAKE(i965->intel.device_info)) {
+                if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) {
                     if (obj_config->profile == VAProfileMPEG2Simple ||
                         obj_config->profile == VAProfileMPEG2Main) {
                         if (attrib_list[i].value.value.i != VA_FOURCC_I420) {
@@ -5649,16 +5630,7 @@
     if (attribs == NULL)
         return VA_STATUS_ERROR_ALLOCATION_FAILED;
 
-    if (IS_G4X(i965->intel.device_info)) {
-        if (obj_config->profile == VAProfileMPEG2Simple ||
-            obj_config->profile == VAProfileMPEG2Main) {
-            attribs[i].type = VASurfaceAttribPixelFormat;
-            attribs[i].value.type = VAGenericValueTypeInteger;
-            attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
-            attribs[i].value.value.i = VA_FOURCC_I420;
-            i++;
-        }
-    } else if (IS_IRONLAKE(i965->intel.device_info)) {
+    if (IS_G4X(i965->intel.device_info) || IS_IRONLAKE(i965->intel.device_info)) {
         switch (obj_config->profile) {
         case VAProfileMPEG2Simple:
         case VAProfileMPEG2Main: