Path: blob/21.2-virgl/src/broadcom/simulator/v3d_simulator.h
4560 views
/*1* Copyright © 2019 Raspberry Pi2* Copyright © 2014-2017 Broadcom3* Copyright (C) 2012 Rob Clark <[email protected]>4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the "Software"),7* to deal in the Software without restriction, including without limitation8* the rights to use, copy, modify, merge, publish, distribute, sublicense,9* and/or sell copies of the Software, and to permit persons to whom the10* Software is furnished to do so, subject to the following conditions:11*12* The above copyright notice and this permission notice (including the next13* paragraph) shall be included in all copies or substantial portions of the14* Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR17* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,18* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL19* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER20* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING21* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS22* IN THE SOFTWARE.23*/2425#ifndef V3D_SIMULATOR_H26#define V3D_SIMULATOR_H2728#ifdef V3D_VERSION29#include "broadcom/common/v3d_macros.h"30#endif3132#include <stdint.h>3334struct v3d_simulator_file;3536struct v3d_simulator_file* v3d_simulator_init(int fd);37void v3d_simulator_destroy(struct v3d_simulator_file *sim_file);38uint32_t v3d_simulator_get_spill(uint32_t spill_size);39int v3d_simulator_ioctl(int fd, unsigned long request, void *arg);40void v3d_simulator_open_from_handle(int fd, int handle, uint32_t size);41uint32_t v3d_simulator_get_mem_size(void);4243#ifdef v3dX44# include "v3dx_simulator.h"45#else46# define v3dX(x) v3d33_##x47# include "v3dx_simulator.h"48# undef v3dX4950# define v3dX(x) v3d41_##x51# include "v3dx_simulator.h"52# undef v3dX53#endif5455#endif565758