summaryrefslogtreecommitdiff
path: root/i965_drv_video/i965_media.c
diff options
context:
space:
mode:
authorZou nan hai <nanhai.zou@intel.com>2010-04-06 17:02:42 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2010-04-06 17:02:42 +0800
commitb660cd61d9139fd88684df5458d21569c713bc8e (patch)
tree528db72084c0703fc2290fce539330dfbbfb6ad8 /i965_drv_video/i965_media.c
parent85ea7684cc3e4e6caee7c20f8e2a21ddd089ff9d (diff)
downloadlibva-b660cd61d9139fd88684df5458d21569c713bc8e.tar.gz
i965_drv_video: initialize depth buffer
Diffstat (limited to 'i965_drv_video/i965_media.c')
-rw-r--r--i965_drv_video/i965_media.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/i965_drv_video/i965_media.c b/i965_drv_video/i965_media.c
index 6a2971c..929e04f 100644
--- a/i965_drv_video/i965_media.c
+++ b/i965_drv_video/i965_media.c
@@ -166,6 +166,19 @@ i965_media_constant_buffer(VADriverContextP ctx, struct decode_state *decode_sta
ADVANCE_BATCH(ctx);
}
+static void
+i965_media_depth_buffer(VADriverContextP ctx)
+{
+ BEGIN_BATCH(ctx, 6);
+ OUT_BATCH(ctx, CMD_DEPTH_BUFFER | 4);
+ OUT_BATCH(ctx, (I965_DEPTHFORMAT_D32_FLOAT << 18) |
+ (I965_SURFACE_NULL << 29));
+ OUT_BATCH(ctx, 0);
+ OUT_BATCH(ctx, 0);
+ OUT_BATCH(ctx, 0);
+ ADVANCE_BATCH();
+}
+
static void
i965_media_pipeline_setup(VADriverContextP ctx, struct decode_state *decode_state)
{
@@ -174,6 +187,7 @@ i965_media_pipeline_setup(VADriverContextP ctx, struct decode_state *decode_stat
intel_batchbuffer_start_atomic(ctx, 0x1000);
intel_batchbuffer_emit_mi_flush(ctx); /* step 1 */
+ i965_media_depth_buffer(ctx);
i965_media_pipeline_select(ctx); /* step 2 */
i965_media_urb_layout(ctx); /* step 3 */
i965_media_pipeline_state(ctx); /* step 4 */