Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/broadcom/vulkan/v3dv_meta_copy.h
4560 views
1
/*
2
* Copyright © 2021 Raspberry Pi
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a
5
* copy of this software and associated documentation files (the "Software"),
6
* to deal in the Software without restriction, including without limitation
7
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
* and/or sell copies of the Software, and to permit persons to whom the
9
* Software is furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice (including the next
12
* paragraph) shall be included in all copies or substantial portions of the
13
* Software.
14
*
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
* IN THE SOFTWARE.
22
*/
23
#ifndef V3DV_META_COPY_H
24
#define V3DV_META_COPY_H
25
26
/* Disable level 0 write, just write following mipmaps */
27
#define V3D_TFU_IOA_DIMTW (1 << 0)
28
#define V3D_TFU_IOA_FORMAT_SHIFT 3
29
#define V3D_TFU_IOA_FORMAT_LINEARTILE 3
30
#define V3D_TFU_IOA_FORMAT_UBLINEAR_1_COLUMN 4
31
#define V3D_TFU_IOA_FORMAT_UBLINEAR_2_COLUMN 5
32
#define V3D_TFU_IOA_FORMAT_UIF_NO_XOR 6
33
#define V3D_TFU_IOA_FORMAT_UIF_XOR 7
34
35
#define V3D_TFU_ICFG_NUMMM_SHIFT 5
36
#define V3D_TFU_ICFG_TTYPE_SHIFT 9
37
38
#define V3D_TFU_ICFG_OPAD_SHIFT 22
39
40
#define V3D_TFU_ICFG_FORMAT_SHIFT 18
41
#define V3D_TFU_ICFG_FORMAT_RASTER 0
42
#define V3D_TFU_ICFG_FORMAT_SAND_128 1
43
#define V3D_TFU_ICFG_FORMAT_SAND_256 2
44
#define V3D_TFU_ICFG_FORMAT_LINEARTILE 11
45
#define V3D_TFU_ICFG_FORMAT_UBLINEAR_1_COLUMN 12
46
#define V3D_TFU_ICFG_FORMAT_UBLINEAR_2_COLUMN 13
47
#define V3D_TFU_ICFG_FORMAT_UIF_NO_XOR 14
48
#define V3D_TFU_ICFG_FORMAT_UIF_XOR 15
49
50
/**
51
* Copy operations implemented in this file don't operate on a framebuffer
52
* object provided by the user, however, since most use the TLB for this,
53
* we still need to have some representation of the framebuffer. For the most
54
* part, the job's frame tiling information is enough for this, however we
55
* still need additional information such us the internal type of our single
56
* render target, so we use this auxiliary struct to pass that information
57
* around.
58
*/
59
struct framebuffer_data {
60
/* The internal type of the single render target */
61
uint32_t internal_type;
62
63
/* Supertile coverage */
64
uint32_t min_x_supertile;
65
uint32_t min_y_supertile;
66
uint32_t max_x_supertile;
67
uint32_t max_y_supertile;
68
69
/* Format info */
70
VkFormat vk_format;
71
const struct v3dv_format *format;
72
uint8_t internal_depth_type;
73
};
74
75
#endif
76
77