Path: blob/21.2-virgl/src/gallium/drivers/swr/swr_screen.h
4570 views
/****************************************************************************1* Copyright (C) 2015 Intel Corporation. All Rights Reserved.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING19* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS20* IN THE SOFTWARE.21***************************************************************************/2223#ifndef SWR_SCREEN_H24#define SWR_SCREEN_H2526#include "swr_resource.h"2728#include "pipe/p_screen.h"29#include "pipe/p_defines.h"30#include "util/u_dl.h"31#include "util/format/u_format.h"32#include "api.h"3334#include "memory/TilingFunctions.h"35#include "memory/InitMemory.h"36#include <stdio.h>37#include <stdarg.h>3839struct sw_winsys;4041struct swr_screen {42struct pipe_screen base;43struct pipe_context *pipe;4445struct pipe_fence_handle *flush_fence;4647struct sw_winsys *winsys;4849/* Configurable environment settings */50bool msaa_force_enable;51uint8_t msaa_max_count;52uint32_t client_copy_limit;5354HANDLE hJitMgr;5556/* Dynamic backend implementations */57util_dl_library *pLibrary;58PFNSwrGetInterface pfnSwrGetInterface;59PFNSwrGetTileInterface pfnSwrGetTileInterface;6061/* Do we run on Xeon Phi? */62bool is_knl;63};6465static INLINE struct swr_screen *66swr_screen(struct pipe_screen *pipe)67{68return (struct swr_screen *)pipe;69}7071SWR_FORMAT72mesa_to_swr_format(enum pipe_format format);7374INLINE void swr_print_info(const char *format, ...)75{76static bool print_info = debug_get_bool_option("SWR_PRINT_INFO", false);77if(print_info) {78va_list args;79va_start(args, format);80vfprintf(stderr, format, args);81va_end(args);82}83}8485#endif868788