Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/broadcom/simulator/v3d_simulator.h
4560 views
1
/*
2
* Copyright © 2019 Raspberry Pi
3
* Copyright © 2014-2017 Broadcom
4
* Copyright (C) 2012 Rob Clark <[email protected]>
5
*
6
* Permission is hereby granted, free of charge, to any person obtaining a
7
* copy of this software and associated documentation files (the "Software"),
8
* to deal in the Software without restriction, including without limitation
9
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
* and/or sell copies of the Software, and to permit persons to whom the
11
* Software is furnished to do so, subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice (including the next
14
* paragraph) shall be included in all copies or substantial portions of the
15
* Software.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
23
* IN THE SOFTWARE.
24
*/
25
26
#ifndef V3D_SIMULATOR_H
27
#define V3D_SIMULATOR_H
28
29
#ifdef V3D_VERSION
30
#include "broadcom/common/v3d_macros.h"
31
#endif
32
33
#include <stdint.h>
34
35
struct v3d_simulator_file;
36
37
struct v3d_simulator_file* v3d_simulator_init(int fd);
38
void v3d_simulator_destroy(struct v3d_simulator_file *sim_file);
39
uint32_t v3d_simulator_get_spill(uint32_t spill_size);
40
int v3d_simulator_ioctl(int fd, unsigned long request, void *arg);
41
void v3d_simulator_open_from_handle(int fd, int handle, uint32_t size);
42
uint32_t v3d_simulator_get_mem_size(void);
43
44
#ifdef v3dX
45
# include "v3dx_simulator.h"
46
#else
47
# define v3dX(x) v3d33_##x
48
# include "v3dx_simulator.h"
49
# undef v3dX
50
51
# define v3dX(x) v3d41_##x
52
# include "v3dx_simulator.h"
53
# undef v3dX
54
#endif
55
56
#endif
57
58