* 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);
}
}
- if (!getenv("INTEL_DEBUG_BENCH"))
+ if (!(g_intel_debug_option_flags & VA_INTEL_DEBUG_OPTION_BENCH))
dri_vtable->swap_buffer(ctx, dri_drawable);
obj_surface->flags |= SURFACE_DISPLAYED;
#include "intel_batchbuffer.h"
#include "intel_memman.h"
#include "intel_driver.h"
+uint32_t g_intel_debug_option_flags = 0;
static Bool
intel_driver_get_param(struct intel_driver_data *intel, int param, int *value)
struct intel_driver_data *intel = intel_driver_data(ctx);
struct drm_state * const drm_state = (struct drm_state *)ctx->drm_state;
int has_exec2 = 0, has_bsd = 0, has_blt = 0, has_vebox = 0;
+ char *env_str = NULL;
+
+ g_intel_debug_option_flags = 0;
+ if ((env_str = getenv("VA_INTEL_DEBUG")))
+ g_intel_debug_option_flags = atoi(env_str);
+
+ if (g_intel_debug_option_flags)
+ fprintf(stderr, "g_intel_debug_option_flags:%x\n", g_intel_debug_option_flags);
assert(drm_state);
assert(VA_CHECK_DRM_AUTH_TYPE(ctx, VA_DRM_AUTH_DRI1) ||
#define True 1
#define False 0
+extern uint32_t g_intel_debug_option_flags;
+#define VA_INTEL_DEBUG_OPTION_ASSERT (1 << 0)
+#define VA_INTEL_DEBUG_OPTION_BENCH (1 << 1)
+
#define ASSERT_RET(value, fail_ret) do { \
- if (!(value)) { \
- assert(0); \
+ if (!(value)) { \
+ if (g_intel_debug_option_flags & VA_INTEL_DEBUG_OPTION_ASSERT) \
+ assert(value); \
return fail_ret; \
} \
} while (0)