Use the same the binding table index on Sandybridge & Ivybridge
authorXiang, Haihao <haihao.xiang@intel.com>
Tue, 14 Feb 2012 01:14:17 +0000 (09:14 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 14 Feb 2012 01:44:07 +0000 (09:44 +0800)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
src/gen6_vme.c
src/shaders/vme/gen7_vme_header.inc
src/shaders/vme/inter_frame.g7b
src/shaders/vme/intra_frame.g7b

index fd80a17..bfc5793 100644 (file)
@@ -695,7 +695,7 @@ static VAStatus gen7_vme_surface_setup(VADriverContextP ctx,
     /* current picture for encoding */
     obj_surface = SURFACE(encoder_context->input_yuv_surface);
     assert(obj_surface);
-    gen7_vme_source_surface_state(ctx, 1, obj_surface, encoder_context);
+    gen7_vme_source_surface_state(ctx, 0, obj_surface, encoder_context);
     gen7_vme_media_source_surface_state(ctx, 4, obj_surface, encoder_context);
 
     if (!is_intra) {
@@ -703,17 +703,17 @@ static VAStatus gen7_vme_surface_setup(VADriverContextP ctx,
         obj_surface = SURFACE(pPicParameter->ReferenceFrames[0].picture_id);
         assert(obj_surface);
         if ( obj_surface->bo != NULL)
-            gen7_vme_source_surface_state(ctx, 2, obj_surface, encoder_context);
+            gen7_vme_source_surface_state(ctx, 1, obj_surface, encoder_context);
 
         /* reference 1 */
         obj_surface = SURFACE(pPicParameter->ReferenceFrames[1].picture_id);
         assert(obj_surface);
         if ( obj_surface->bo != NULL ) 
-            gen7_vme_source_surface_state(ctx, 3, obj_surface, encoder_context);
+            gen7_vme_source_surface_state(ctx, 2, obj_surface, encoder_context);
     }
 
     /* VME output */
-    gen7_vme_output_buffer_setup(ctx, encode_state, 0, encoder_context);
+    gen7_vme_output_buffer_setup(ctx, encode_state, 3, encoder_context);
     gen7_vme_output_vme_batchbuffer_setup(ctx, encode_state, 5, encoder_context);
 
     return VA_STATUS_SUCCESS;
index f57ab97..5ea1811 100644 (file)
@@ -30,10 +30,10 @@ define(`INTRA_PRED_AVAIL_FLAG_B',       `0x10')
 define(`INTRA_PRED_AVAIL_FLAG_C',       `0x8')
 define(`INTRA_PRED_AVAIL_FLAG_D',       `0x4')
 
-define(`BIND_IDX_VME',                  `1')
-define(`BIND_IDX_VME_REF0',             `2')
-define(`BIND_IDX_VME_REF1',             `3')
-define(`BIND_IDX_OUTPUT',               `0')
+define(`BIND_IDX_VME',                  `0')
+define(`BIND_IDX_VME_REF0',             `1')
+define(`BIND_IDX_VME_REF1',             `2')
+define(`BIND_IDX_OUTPUT',               `3')
 define(`BIND_IDX_INEP',                 `4')
 
 define(`SUB_PEL_MODE_INTEGER',          `0x00000000')
index 68fe540..03d8c90 100644 (file)
@@ -14,7 +14,7 @@
    { 0x00600001, 0x28400061, 0x00000000, 0x00000000 },
    { 0x00600001, 0x28600061, 0x00000000, 0x00000000 },
    { 0x00600001, 0x28800061, 0x00000000, 0x00000000 },
-   { 0x08600031, 0x21801cbd, 0x00000800, 0x0a682001 },
+   { 0x08600031, 0x21801cbd, 0x00000800, 0x0a682000 },
    { 0x00000041, 0x24684521, 0x000000a2, 0x000000a1 },
    { 0x00000040, 0x24684421, 0x00000468, 0x000000a0 },
    { 0x00000041, 0x24680c21, 0x00000468, 0x00000004 },
@@ -25,6 +25,6 @@
    { 0x00000040, 0x24623dad, 0x00450462, 0xffd0ffd0 },
    { 0x00600001, 0x28200021, 0x008c0460, 0x00000000 },
    { 0x00600001, 0x28400021, 0x008c0460, 0x00000000 },
-   { 0x0a800031, 0x20001cac, 0x00000800, 0x060a0300 },
+   { 0x0a800031, 0x20001cac, 0x00000800, 0x060a0303 },
    { 0x00600001, 0x28000021, 0x008d0000, 0x00000000 },
    { 0x07800031, 0x24001ca8, 0x00000800, 0x82000010 },
index 421892b..16ee9af 100644 (file)
@@ -34,7 +34,7 @@
    { 0x00600001, 0x288000e1, 0x00000000, 0x00000000 },
    { 0x00800001, 0x28800231, 0x00cf0283, 0x00000000 },
    { 0x00000001, 0x28900061, 0x00000000, 0x11111111 },
-   { 0x08600031, 0x21801cbd, 0x00000800, 0x0a184001 },
+   { 0x08600031, 0x21801cbd, 0x00000800, 0x0a184000 },
    { 0x00000041, 0x24684521, 0x000000a2, 0x000000a1 },
    { 0x00000040, 0x24684421, 0x00000468, 0x000000a0 },
    { 0x00000001, 0x24740231, 0x00000014, 0x00000000 },
@@ -43,6 +43,6 @@
    { 0x00000001, 0x28240021, 0x00000190, 0x00000000 },
    { 0x00000001, 0x28280021, 0x00000194, 0x00000000 },
    { 0x00000001, 0x282c0021, 0x00000198, 0x00000000 },
-   { 0x0a800031, 0x20001cac, 0x00000800, 0x040a0000 },
+   { 0x0a800031, 0x20001cac, 0x00000800, 0x040a0003 },
    { 0x00600001, 0x28000021, 0x008d0000, 0x00000000 },
    { 0x07800031, 0x24001ca8, 0x00000800, 0x82000010 },