summaryrefslogtreecommitdiff
path: root/src/i965_output_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/i965_output_dri.c')
-rw-r--r--src/i965_output_dri.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/i965_output_dri.c b/src/i965_output_dri.c
index de7be92f..6f8ea312 100644
--- a/src/i965_output_dri.c
+++ b/src/i965_output_dri.c
@@ -127,6 +127,7 @@ i965_put_surface_dri(
bool new_region = false;
uint32_t name;
int i, ret;
+ unsigned int color_flag = 0;
/* Currently don't support DRI1 */
if (!VA_CHECK_DRM_AUTH_TYPE(ctx, VA_DRM_AUTH_DRI2))
@@ -136,8 +137,7 @@ i965_put_surface_dri(
* will get here
*/
obj_surface = SURFACE(surface);
- if (!obj_surface || !obj_surface->bo)
- return VA_STATUS_SUCCESS;
+ ASSERT_RET(obj_surface && obj_surface->bo, VA_STATUS_SUCCESS);
_i965LockMutex(&i965->render_mutex);
@@ -179,6 +179,12 @@ i965_put_surface_dri(
assert(ret == 0);
}
+ color_flag = flags & VA_SRC_COLOR_MASK;
+ if (color_flag == 0)
+ color_flag = VA_SRC_BT601;
+
+ pp_flag = color_flag;
+
if ((flags & VA_FILTER_SCALING_MASK) == VA_FILTER_SCALING_NL_ANAMORPHIC)
pp_flag |= I965_PP_FLAG_AVS;
@@ -197,17 +203,8 @@ i965_put_surface_dri(
}
}
- dri_vtable->swap_buffer(ctx, dri_drawable);
- obj_surface->flags |= SURFACE_DISPLAYED;
-
- if ((obj_surface->flags & SURFACE_ALL_MASK) == SURFACE_DISPLAYED) {
- dri_bo_unreference(obj_surface->bo);
- obj_surface->bo = NULL;
- obj_surface->flags &= ~SURFACE_REF_DIS_MASK;
-
- if (obj_surface->free_private_data)
- obj_surface->free_private_data(&obj_surface->private_data);
- }
+ if (!(g_intel_debug_option_flags & VA_INTEL_DEBUG_OPTION_BENCH))
+ dri_vtable->swap_buffer(ctx, dri_drawable);
_i965UnlockMutex(&i965->render_mutex);