Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/panfrost/vulkan/panvk_meta.c
4560 views
1
/*
2
* Copyright © 2021 Collabora Ltd.
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
21
* DEALINGS IN THE SOFTWARE.
22
*/
23
24
#include "nir/nir_builder.h"
25
#include "pan_blitter.h"
26
#include "pan_encoder.h"
27
28
#include "panvk_private.h"
29
30
#include "vk_format.h"
31
32
void
33
panvk_CmdBlitImage(VkCommandBuffer commandBuffer,
34
VkImage srcImage,
35
VkImageLayout srcImageLayout,
36
VkImage destImage,
37
VkImageLayout destImageLayout,
38
uint32_t regionCount,
39
const VkImageBlit *pRegions,
40
VkFilter filter)
41
42
{
43
panvk_stub();
44
}
45
46
void
47
panvk_CmdCopyImage(VkCommandBuffer commandBuffer,
48
VkImage srcImage,
49
VkImageLayout srcImageLayout,
50
VkImage destImage,
51
VkImageLayout destImageLayout,
52
uint32_t regionCount,
53
const VkImageCopy *pRegions)
54
{
55
panvk_stub();
56
}
57
58
void
59
panvk_CmdCopyBufferToImage(VkCommandBuffer commandBuffer,
60
VkBuffer srcBuffer,
61
VkImage destImage,
62
VkImageLayout destImageLayout,
63
uint32_t regionCount,
64
const VkBufferImageCopy *pRegions)
65
{
66
panvk_stub();
67
}
68
69
void
70
panvk_CmdCopyImageToBuffer(VkCommandBuffer commandBuffer,
71
VkImage srcImage,
72
VkImageLayout srcImageLayout,
73
VkBuffer destBuffer,
74
uint32_t regionCount,
75
const VkBufferImageCopy *pRegions)
76
{
77
panvk_stub();
78
}
79
80
void
81
panvk_CmdCopyBuffer(VkCommandBuffer commandBuffer,
82
VkBuffer srcBuffer,
83
VkBuffer destBuffer,
84
uint32_t regionCount,
85
const VkBufferCopy *pRegions)
86
{
87
panvk_stub();
88
}
89
90
void
91
panvk_CmdResolveImage(VkCommandBuffer cmd_buffer_h,
92
VkImage src_image_h,
93
VkImageLayout src_image_layout,
94
VkImage dest_image_h,
95
VkImageLayout dest_image_layout,
96
uint32_t region_count,
97
const VkImageResolve *regions)
98
{
99
panvk_stub();
100
}
101
102
void
103
panvk_CmdFillBuffer(VkCommandBuffer commandBuffer,
104
VkBuffer dstBuffer,
105
VkDeviceSize dstOffset,
106
VkDeviceSize fillSize,
107
uint32_t data)
108
{
109
panvk_stub();
110
}
111
112
void
113
panvk_CmdUpdateBuffer(VkCommandBuffer commandBuffer,
114
VkBuffer dstBuffer,
115
VkDeviceSize dstOffset,
116
VkDeviceSize dataSize,
117
const void *pData)
118
{
119
panvk_stub();
120
}
121
122
void
123
panvk_CmdClearColorImage(VkCommandBuffer commandBuffer,
124
VkImage image,
125
VkImageLayout imageLayout,
126
const VkClearColorValue *pColor,
127
uint32_t rangeCount,
128
const VkImageSubresourceRange *pRanges)
129
{
130
panvk_stub();
131
}
132
133
void
134
panvk_CmdClearDepthStencilImage(VkCommandBuffer commandBuffer,
135
VkImage image_h,
136
VkImageLayout imageLayout,
137
const VkClearDepthStencilValue *pDepthStencil,
138
uint32_t rangeCount,
139
const VkImageSubresourceRange *pRanges)
140
{
141
panvk_stub();
142
}
143
144
void
145
panvk_CmdClearAttachments(VkCommandBuffer commandBuffer,
146
uint32_t attachmentCount,
147
const VkClearAttachment *pAttachments,
148
uint32_t rectCount,
149
const VkClearRect *pRects)
150
{
151
panvk_stub();
152
}
153
154
void
155
panvk_meta_init(struct panvk_physical_device *dev)
156
{
157
panvk_pool_init(&dev->meta.bin_pool, &dev->pdev, NULL, PAN_BO_EXECUTE,
158
16 * 1024, "panvk_meta binary pool", false);
159
panvk_pool_init(&dev->meta.desc_pool, &dev->pdev, NULL, 0,
160
16 * 1024, "panvk_meta descriptor pool", false);
161
panvk_pool_init(&dev->meta.blitter.bin_pool, &dev->pdev, NULL,
162
PAN_BO_EXECUTE, 16 * 1024,
163
"panvk_meta blitter binary pool", false);
164
panvk_pool_init(&dev->meta.blitter.desc_pool, &dev->pdev, NULL,
165
0, 16 * 1024, "panvk_meta blitter descriptor pool",
166
false);
167
pan_blitter_init(&dev->pdev, &dev->meta.blitter.bin_pool.base,
168
&dev->meta.blitter.desc_pool.base);
169
}
170
171
void
172
panvk_meta_cleanup(struct panvk_physical_device *dev)
173
{
174
pan_blitter_cleanup(&dev->pdev);
175
panvk_pool_cleanup(&dev->meta.blitter.desc_pool);
176
panvk_pool_cleanup(&dev->meta.blitter.bin_pool);
177
panvk_pool_cleanup(&dev->meta.desc_pool);
178
panvk_pool_cleanup(&dev->meta.bin_pool);
179
}
180
181