va_context.c revision 8ba4c96f8204003ff0d5247d71c0855827810560
1/************************************************************************** 2 * 3 * Copyright 2010 Thomas Balling Sørensen & Orasanu Lucian. 4 * All Rights Reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the 8 * "Software"), to deal in the Software without restriction, including 9 * without limitation the rights to use, copy, modify, merge, publish, 10 * distribute, sub license, and/or sell copies of the Software, and to 11 * permit persons to whom the Software is furnished to do so, subject to 12 * the following conditions: 13 * 14 * The above copyright notice and this permission notice (including the 15 * next paragraph) shall be included in all copies or substantial portions 16 * of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 * 26 **************************************************************************/ 27 28#include <pipe/p_compiler.h> 29#include <pipe/p_video_context.h> 30#include <util/u_debug.h> 31#include <va/va.h> 32#include <va/va_backend.h> 33#include "va_private.h" 34 35//struct VADriverVTable vlVaGetVtable(); 36 37PUBLIC 38VAStatus __vaDriverInit_0_31 (VADriverContextP ctx) 39{ 40 if (!ctx) 41 return VA_STATUS_ERROR_INVALID_CONTEXT; 42 43 ctx->str_vendor = "mesa gallium vaapi"; 44 ctx->vtable = vlVaGetVtable(); 45 ctx->max_attributes = 1; 46 ctx->max_display_attributes = 1; 47 ctx->max_entrypoints = 1; 48 ctx->max_image_formats = 1; 49 ctx->max_profiles = 1; 50 ctx->max_subpic_formats = 1; 51 ctx->version_major = 3; 52 ctx->version_minor = 1; 53 54 VA_INFO("vl_screen_pointer %p\n",ctx->native_dpy); 55 56 return VA_STATUS_SUCCESS; 57} 58 59VAStatus vlVaCreateContext( VADriverContextP ctx, 60 VAConfigID config_id, 61 int picture_width, 62 int picture_height, 63 int flag, 64 VASurfaceID *render_targets, 65 int num_render_targets, 66 VAContextID *conext) 67{ 68 if (!ctx) 69 return VA_STATUS_ERROR_INVALID_CONTEXT; 70 71 return VA_STATUS_ERROR_UNIMPLEMENTED; 72} 73 74VAStatus vlVaDestroyContext( VADriverContextP ctx, 75 VAContextID context) 76{ 77 if (!ctx) 78 return VA_STATUS_ERROR_INVALID_CONTEXT; 79 80 return VA_STATUS_ERROR_UNIMPLEMENTED; 81} 82 83VAStatus vlVaTerminate( VADriverContextP ctx) 84{ 85 if (!ctx) 86 return VA_STATUS_ERROR_INVALID_CONTEXT; 87 return VA_STATUS_ERROR_UNIMPLEMENTED; 88} 89