Path: blob/21.2-virgl/src/gallium/winsys/svga/drm/vmw_context.h
4573 views
/**********************************************************1* Copyright 2009-2015 VMware, Inc. All rights reserved.2*3* Permission is hereby granted, free of charge, to any person4* obtaining a copy of this software and associated documentation5* files (the "Software"), to deal in the Software without6* restriction, including without limitation the rights to use, copy,7* modify, merge, publish, distribute, sublicense, and/or sell copies8* of the Software, and to permit persons to whom the Software is9* furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice shall be12* included in all copies or substantial portions of the Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,15* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF16* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND17* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS18* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN19* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN20* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE21* SOFTWARE.22*23**********************************************************/2425/**26* @author Jose Fonseca <[email protected]>27*/282930#ifndef VMW_CONTEXT_H_31#define VMW_CONTEXT_H_3233#include <stdio.h>34#include "pipe/p_compiler.h"3536struct svga_winsys_screen;37struct svga_winsys_context;38struct pipe_context;39struct pipe_screen;404142/** Set to 1 to get extra debug info/output */43#define VMW_DEBUG 04445#if VMW_DEBUG46#define vmw_printf debug_printf47#define VMW_FUNC debug_printf("%s\n", __FUNCTION__)48#else49#define VMW_FUNC50#define vmw_printf(...)51#endif525354/**55* Called when an error/failure is encountered.56* We want these messages reported for all build types.57*/58#define vmw_error(...) fprintf(stderr, "VMware: " __VA_ARGS__)596061struct svga_winsys_context *62vmw_svga_winsys_context_create(struct svga_winsys_screen *sws);6364struct vmw_svga_winsys_surface;656667void68vmw_swc_surface_clear_reference(struct svga_winsys_context *swc,69struct vmw_svga_winsys_surface *vsurf);707172#endif /* VMW_CONTEXT_H_ */737475