va_context.c revision aea4d004d2781ebb9cf437c9125ca232dd2d0aeb
19f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson/************************************************************************** 29f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 39f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Copyright 2010 Thomas Balling Sørensen. 49f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * All Rights Reserved. 59f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 69f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * Permission is hereby granted, free of charge, to any person obtaining a 79f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * copy of this software and associated documentation files (the 89f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * "Software"), to deal in the Software without restriction, including 99f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * without limitation the rights to use, copy, modify, merge, publish, 109f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * distribute, sub license, and/or sell copies of the Software, and to 119f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * permit persons to whom the Software is furnished to do so, subject to 129f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * the following conditions: 139f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 149f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * The above copyright notice and this permission notice (including the 159f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * next paragraph) shall be included in all copies or substantial portions 169f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * of the Software. 179f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 189f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 199f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 209f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 219f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 229f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 239f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 249f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 259f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson * 269f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson **************************************************************************/ 279f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 289f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson#include <pipe/p_compiler.h> 299f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson#include <pipe/p_video_context.h> 309f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson#include <util/u_debug.h> 319f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson#include <va/va.h> 329f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson#include <va/va_backend.h> 339f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson#include "va_private.h" 349f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 359f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson//struct VADriverVTable vlVaGetVtable(); 369f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 379f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse WilsonPUBLIC 389f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse WilsonVAStatus __vaDriverInit_0_31 (VADriverContextP ctx) 399f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson{ 409f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson if (!ctx) 419f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return VA_STATUS_ERROR_INVALID_CONTEXT; 429f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 439f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->str_vendor = "mesa gallium vaapi"; 449f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->vtable = vlVaGetVtable(); 459f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->max_attributes = 1; 469f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->max_display_attributes = 1; 479f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->max_entrypoints = 1; 489f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->max_image_formats = 1; 499f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->max_profiles = 1; 509f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->max_subpic_formats = 1; 519f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->version_major = 3; 529f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson ctx->version_minor = 1; 539f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 549f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson VA_INFO("vl_screen_pointer %p\n",ctx->native_dpy); 559f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson 569f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson return VA_STATUS_SUCCESS; 579f8118474e9513f7a5b7d2a05e4a0fb15d1a6569Jesse Wilson}