2 * Copyright © 2016 Red Hat.
3 * Copyright © 2016 Bas Nieuwenhuizen
5 * based in part on anv driver which is:
6 * Copyright © 2015 Intel Corporation
8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"),
10 * to deal in the Software without restriction, including without limitation
11 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12 * and/or sell copies of the Software, and to permit persons to whom the
13 * Software is furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice (including the next
16 * paragraph) shall be included in all copies or substantial portions of the
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
27 #include "radv_private.h"
32 radv_render_pass_add_subpass_dep(struct radv_render_pass
*pass
,
33 const VkSubpassDependency2
*dep
)
35 uint32_t src
= dep
->srcSubpass
;
36 uint32_t dst
= dep
->dstSubpass
;
38 /* Ignore subpass self-dependencies as they allow the app to call
39 * vkCmdPipelineBarrier() inside the render pass and the driver should
40 * only do the barrier when called, not when starting the render pass.
45 /* Accumulate all ingoing external dependencies to the first subpass. */
46 if (src
== VK_SUBPASS_EXTERNAL
)
49 if (dst
== VK_SUBPASS_EXTERNAL
) {
50 if (dep
->dstStageMask
!= VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
)
51 pass
->end_barrier
.src_stage_mask
|= dep
->srcStageMask
;
52 pass
->end_barrier
.src_access_mask
|= dep
->srcAccessMask
;
53 pass
->end_barrier
.dst_access_mask
|= dep
->dstAccessMask
;
55 if (dep
->dstStageMask
!= VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
)
56 pass
->subpasses
[dst
].start_barrier
.src_stage_mask
|= dep
->srcStageMask
;
57 pass
->subpasses
[dst
].start_barrier
.src_access_mask
|= dep
->srcAccessMask
;
58 pass
->subpasses
[dst
].start_barrier
.dst_access_mask
|= dep
->dstAccessMask
;
63 radv_render_pass_compile(struct radv_render_pass
*pass
)
65 for (uint32_t i
= 0; i
< pass
->subpass_count
; i
++) {
66 struct radv_subpass
*subpass
= &pass
->subpasses
[i
];
68 for (uint32_t j
= 0; j
< subpass
->attachment_count
; j
++) {
69 struct radv_subpass_attachment
*subpass_att
=
70 &subpass
->attachments
[j
];
71 if (subpass_att
->attachment
== VK_ATTACHMENT_UNUSED
)
74 struct radv_render_pass_attachment
*pass_att
=
75 &pass
->attachments
[subpass_att
->attachment
];
77 pass_att
->first_subpass_idx
= UINT32_MAX
;
81 for (uint32_t i
= 0; i
< pass
->subpass_count
; i
++) {
82 struct radv_subpass
*subpass
= &pass
->subpasses
[i
];
83 uint32_t color_sample_count
= 1, depth_sample_count
= 1;
85 /* We don't allow depth_stencil_attachment to be non-NULL and
86 * be VK_ATTACHMENT_UNUSED. This way something can just check
87 * for NULL and be guaranteed that they have a valid
90 if (subpass
->depth_stencil_attachment
&&
91 subpass
->depth_stencil_attachment
->attachment
== VK_ATTACHMENT_UNUSED
)
92 subpass
->depth_stencil_attachment
= NULL
;
94 if (subpass
->ds_resolve_attachment
&&
95 subpass
->ds_resolve_attachment
->attachment
== VK_ATTACHMENT_UNUSED
)
96 subpass
->ds_resolve_attachment
= NULL
;
98 for (uint32_t j
= 0; j
< subpass
->attachment_count
; j
++) {
99 struct radv_subpass_attachment
*subpass_att
=
100 &subpass
->attachments
[j
];
101 if (subpass_att
->attachment
== VK_ATTACHMENT_UNUSED
)
104 struct radv_render_pass_attachment
*pass_att
=
105 &pass
->attachments
[subpass_att
->attachment
];
107 if (i
< pass_att
->first_subpass_idx
)
108 pass_att
->first_subpass_idx
= i
;
109 pass_att
->last_subpass_idx
= i
;
112 subpass
->has_color_att
= false;
113 for (uint32_t j
= 0; j
< subpass
->color_count
; j
++) {
114 struct radv_subpass_attachment
*subpass_att
=
115 &subpass
->color_attachments
[j
];
116 if (subpass_att
->attachment
== VK_ATTACHMENT_UNUSED
)
119 subpass
->has_color_att
= true;
121 struct radv_render_pass_attachment
*pass_att
=
122 &pass
->attachments
[subpass_att
->attachment
];
124 color_sample_count
= pass_att
->samples
;
127 if (subpass
->depth_stencil_attachment
) {
129 subpass
->depth_stencil_attachment
->attachment
;
130 struct radv_render_pass_attachment
*pass_att
=
131 &pass
->attachments
[a
];
132 depth_sample_count
= pass_att
->samples
;
135 subpass
->max_sample_count
= MAX2(color_sample_count
,
137 subpass
->color_sample_count
= color_sample_count
;
138 subpass
->depth_sample_count
= depth_sample_count
;
140 /* We have to handle resolve attachments specially */
141 subpass
->has_color_resolve
= false;
142 if (subpass
->resolve_attachments
) {
143 for (uint32_t j
= 0; j
< subpass
->color_count
; j
++) {
144 struct radv_subpass_attachment
*resolve_att
=
145 &subpass
->resolve_attachments
[j
];
147 if (resolve_att
->attachment
== VK_ATTACHMENT_UNUSED
)
150 subpass
->has_color_resolve
= true;
154 for (uint32_t j
= 0; j
< subpass
->input_count
; ++j
) {
155 if (subpass
->input_attachments
[j
].attachment
== VK_ATTACHMENT_UNUSED
)
158 for (uint32_t k
= 0; k
< subpass
->color_count
; ++k
) {
159 if (subpass
->color_attachments
[k
].attachment
== subpass
->input_attachments
[j
].attachment
) {
160 subpass
->input_attachments
[j
].in_render_loop
= true;
161 subpass
->color_attachments
[k
].in_render_loop
= true;
165 if (subpass
->depth_stencil_attachment
&&
166 subpass
->depth_stencil_attachment
->attachment
== subpass
->input_attachments
[j
].attachment
) {
167 subpass
->input_attachments
[j
].in_render_loop
= true;
168 subpass
->depth_stencil_attachment
->in_render_loop
= true;
175 radv_num_subpass_attachments(const VkSubpassDescription
*desc
)
177 return desc
->inputAttachmentCount
+
178 desc
->colorAttachmentCount
+
179 (desc
->pResolveAttachments
? desc
->colorAttachmentCount
: 0) +
180 (desc
->pDepthStencilAttachment
!= NULL
);
183 VkResult
radv_CreateRenderPass(
185 const VkRenderPassCreateInfo
* pCreateInfo
,
186 const VkAllocationCallbacks
* pAllocator
,
187 VkRenderPass
* pRenderPass
)
189 RADV_FROM_HANDLE(radv_device
, device
, _device
);
190 struct radv_render_pass
*pass
;
192 size_t attachments_offset
;
193 VkRenderPassMultiviewCreateInfo
*multiview_info
= NULL
;
195 assert(pCreateInfo
->sType
== VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
);
197 size
= sizeof(*pass
);
198 size
+= pCreateInfo
->subpassCount
* sizeof(pass
->subpasses
[0]);
199 attachments_offset
= size
;
200 size
+= pCreateInfo
->attachmentCount
* sizeof(pass
->attachments
[0]);
202 pass
= vk_alloc2(&device
->alloc
, pAllocator
, size
, 8,
203 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT
);
205 return vk_error(device
->instance
, VK_ERROR_OUT_OF_HOST_MEMORY
);
207 memset(pass
, 0, size
);
208 pass
->attachment_count
= pCreateInfo
->attachmentCount
;
209 pass
->subpass_count
= pCreateInfo
->subpassCount
;
210 pass
->attachments
= (void *) pass
+ attachments_offset
;
212 vk_foreach_struct(ext
, pCreateInfo
->pNext
) {
214 case VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO
:
215 multiview_info
= (VkRenderPassMultiviewCreateInfo
*)ext
;
222 for (uint32_t i
= 0; i
< pCreateInfo
->attachmentCount
; i
++) {
223 struct radv_render_pass_attachment
*att
= &pass
->attachments
[i
];
225 att
->format
= pCreateInfo
->pAttachments
[i
].format
;
226 att
->samples
= pCreateInfo
->pAttachments
[i
].samples
;
227 att
->load_op
= pCreateInfo
->pAttachments
[i
].loadOp
;
228 att
->stencil_load_op
= pCreateInfo
->pAttachments
[i
].stencilLoadOp
;
229 att
->initial_layout
= pCreateInfo
->pAttachments
[i
].initialLayout
;
230 att
->final_layout
= pCreateInfo
->pAttachments
[i
].finalLayout
;
231 att
->stencil_initial_layout
= pCreateInfo
->pAttachments
[i
].initialLayout
;
232 att
->stencil_final_layout
= pCreateInfo
->pAttachments
[i
].finalLayout
;
233 // att->store_op = pCreateInfo->pAttachments[i].storeOp;
234 // att->stencil_store_op = pCreateInfo->pAttachments[i].stencilStoreOp;
236 uint32_t subpass_attachment_count
= 0;
237 struct radv_subpass_attachment
*p
;
238 for (uint32_t i
= 0; i
< pCreateInfo
->subpassCount
; i
++) {
239 subpass_attachment_count
+=
240 radv_num_subpass_attachments(&pCreateInfo
->pSubpasses
[i
]);
243 if (subpass_attachment_count
) {
244 pass
->subpass_attachments
=
245 vk_alloc2(&device
->alloc
, pAllocator
,
246 subpass_attachment_count
* sizeof(struct radv_subpass_attachment
), 8,
247 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT
);
248 if (pass
->subpass_attachments
== NULL
) {
249 vk_free2(&device
->alloc
, pAllocator
, pass
);
250 return vk_error(device
->instance
, VK_ERROR_OUT_OF_HOST_MEMORY
);
253 pass
->subpass_attachments
= NULL
;
255 p
= pass
->subpass_attachments
;
256 for (uint32_t i
= 0; i
< pCreateInfo
->subpassCount
; i
++) {
257 const VkSubpassDescription
*desc
= &pCreateInfo
->pSubpasses
[i
];
258 struct radv_subpass
*subpass
= &pass
->subpasses
[i
];
260 subpass
->input_count
= desc
->inputAttachmentCount
;
261 subpass
->color_count
= desc
->colorAttachmentCount
;
262 subpass
->attachment_count
= radv_num_subpass_attachments(desc
);
263 subpass
->attachments
= p
;
266 subpass
->view_mask
= multiview_info
->pViewMasks
[i
];
268 if (desc
->inputAttachmentCount
> 0) {
269 subpass
->input_attachments
= p
;
270 p
+= desc
->inputAttachmentCount
;
272 for (uint32_t j
= 0; j
< desc
->inputAttachmentCount
; j
++) {
273 subpass
->input_attachments
[j
] = (struct radv_subpass_attachment
) {
274 .attachment
= desc
->pInputAttachments
[j
].attachment
,
275 .layout
= desc
->pInputAttachments
[j
].layout
,
276 .stencil_layout
= desc
->pInputAttachments
[j
].layout
,
281 if (desc
->colorAttachmentCount
> 0) {
282 subpass
->color_attachments
= p
;
283 p
+= desc
->colorAttachmentCount
;
285 for (uint32_t j
= 0; j
< desc
->colorAttachmentCount
; j
++) {
286 subpass
->color_attachments
[j
] = (struct radv_subpass_attachment
) {
287 .attachment
= desc
->pColorAttachments
[j
].attachment
,
288 .layout
= desc
->pColorAttachments
[j
].layout
,
293 if (desc
->pResolveAttachments
) {
294 subpass
->resolve_attachments
= p
;
295 p
+= desc
->colorAttachmentCount
;
297 for (uint32_t j
= 0; j
< desc
->colorAttachmentCount
; j
++) {
298 subpass
->resolve_attachments
[j
] = (struct radv_subpass_attachment
) {
299 .attachment
= desc
->pResolveAttachments
[j
].attachment
,
300 .layout
= desc
->pResolveAttachments
[j
].layout
,
301 .stencil_layout
= desc
->pResolveAttachments
[j
].layout
,
306 if (desc
->pDepthStencilAttachment
) {
307 subpass
->depth_stencil_attachment
= p
++;
309 *subpass
->depth_stencil_attachment
= (struct radv_subpass_attachment
) {
310 .attachment
= desc
->pDepthStencilAttachment
->attachment
,
311 .layout
= desc
->pDepthStencilAttachment
->layout
,
312 .stencil_layout
= desc
->pDepthStencilAttachment
->layout
,
317 for (unsigned i
= 0; i
< pCreateInfo
->dependencyCount
; ++i
) {
318 /* Convert to a Dependency2 */
319 struct VkSubpassDependency2 dep2
= {
320 .srcSubpass
= pCreateInfo
->pDependencies
[i
].srcSubpass
,
321 .dstSubpass
= pCreateInfo
->pDependencies
[i
].dstSubpass
,
322 .srcStageMask
= pCreateInfo
->pDependencies
[i
].srcStageMask
,
323 .dstStageMask
= pCreateInfo
->pDependencies
[i
].dstStageMask
,
324 .srcAccessMask
= pCreateInfo
->pDependencies
[i
].srcAccessMask
,
325 .dstAccessMask
= pCreateInfo
->pDependencies
[i
].dstAccessMask
,
326 .dependencyFlags
= pCreateInfo
->pDependencies
[i
].dependencyFlags
,
328 radv_render_pass_add_subpass_dep(pass
, &dep2
);
331 radv_render_pass_compile(pass
);
333 *pRenderPass
= radv_render_pass_to_handle(pass
);
339 radv_num_subpass_attachments2(const VkSubpassDescription2
*desc
)
341 const VkSubpassDescriptionDepthStencilResolveKHR
*ds_resolve
=
342 vk_find_struct_const(desc
->pNext
,
343 SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR
);
345 return desc
->inputAttachmentCount
+
346 desc
->colorAttachmentCount
+
347 (desc
->pResolveAttachments
? desc
->colorAttachmentCount
: 0) +
348 (desc
->pDepthStencilAttachment
!= NULL
) +
349 (ds_resolve
&& ds_resolve
->pDepthStencilResolveAttachment
);
352 VkResult
radv_CreateRenderPass2(
354 const VkRenderPassCreateInfo2
* pCreateInfo
,
355 const VkAllocationCallbacks
* pAllocator
,
356 VkRenderPass
* pRenderPass
)
358 RADV_FROM_HANDLE(radv_device
, device
, _device
);
359 struct radv_render_pass
*pass
;
361 size_t attachments_offset
;
363 assert(pCreateInfo
->sType
== VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2
);
365 size
= sizeof(*pass
);
366 size
+= pCreateInfo
->subpassCount
* sizeof(pass
->subpasses
[0]);
367 attachments_offset
= size
;
368 size
+= pCreateInfo
->attachmentCount
* sizeof(pass
->attachments
[0]);
370 pass
= vk_alloc2(&device
->alloc
, pAllocator
, size
, 8,
371 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT
);
373 return vk_error(device
->instance
, VK_ERROR_OUT_OF_HOST_MEMORY
);
375 memset(pass
, 0, size
);
376 pass
->attachment_count
= pCreateInfo
->attachmentCount
;
377 pass
->subpass_count
= pCreateInfo
->subpassCount
;
378 pass
->attachments
= (void *) pass
+ attachments_offset
;
380 for (uint32_t i
= 0; i
< pCreateInfo
->attachmentCount
; i
++) {
381 struct radv_render_pass_attachment
*att
= &pass
->attachments
[i
];
382 const VkAttachmentDescriptionStencilLayoutKHR
*stencil_layout
=
383 vk_find_struct_const(pCreateInfo
->pAttachments
[i
].pNext
,
384 ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR
);
386 att
->format
= pCreateInfo
->pAttachments
[i
].format
;
387 att
->samples
= pCreateInfo
->pAttachments
[i
].samples
;
388 att
->load_op
= pCreateInfo
->pAttachments
[i
].loadOp
;
389 att
->stencil_load_op
= pCreateInfo
->pAttachments
[i
].stencilLoadOp
;
390 att
->initial_layout
= pCreateInfo
->pAttachments
[i
].initialLayout
;
391 att
->final_layout
= pCreateInfo
->pAttachments
[i
].finalLayout
;
392 att
->stencil_initial_layout
= (stencil_layout
?
393 stencil_layout
->stencilInitialLayout
:
394 pCreateInfo
->pAttachments
[i
].initialLayout
);
395 att
->stencil_final_layout
= (stencil_layout
?
396 stencil_layout
->stencilFinalLayout
:
397 pCreateInfo
->pAttachments
[i
].finalLayout
);
398 // att->store_op = pCreateInfo->pAttachments[i].storeOp;
399 // att->stencil_store_op = pCreateInfo->pAttachments[i].stencilStoreOp;
401 uint32_t subpass_attachment_count
= 0;
402 struct radv_subpass_attachment
*p
;
403 for (uint32_t i
= 0; i
< pCreateInfo
->subpassCount
; i
++) {
404 subpass_attachment_count
+=
405 radv_num_subpass_attachments2(&pCreateInfo
->pSubpasses
[i
]);
408 if (subpass_attachment_count
) {
409 pass
->subpass_attachments
=
410 vk_alloc2(&device
->alloc
, pAllocator
,
411 subpass_attachment_count
* sizeof(struct radv_subpass_attachment
), 8,
412 VK_SYSTEM_ALLOCATION_SCOPE_OBJECT
);
413 if (pass
->subpass_attachments
== NULL
) {
414 vk_free2(&device
->alloc
, pAllocator
, pass
);
415 return vk_error(device
->instance
, VK_ERROR_OUT_OF_HOST_MEMORY
);
418 pass
->subpass_attachments
= NULL
;
420 p
= pass
->subpass_attachments
;
421 for (uint32_t i
= 0; i
< pCreateInfo
->subpassCount
; i
++) {
422 const VkSubpassDescription2
*desc
= &pCreateInfo
->pSubpasses
[i
];
423 struct radv_subpass
*subpass
= &pass
->subpasses
[i
];
425 subpass
->input_count
= desc
->inputAttachmentCount
;
426 subpass
->color_count
= desc
->colorAttachmentCount
;
427 subpass
->attachment_count
= radv_num_subpass_attachments2(desc
);
428 subpass
->attachments
= p
;
429 subpass
->view_mask
= desc
->viewMask
;
431 if (desc
->inputAttachmentCount
> 0) {
432 subpass
->input_attachments
= p
;
433 p
+= desc
->inputAttachmentCount
;
435 for (uint32_t j
= 0; j
< desc
->inputAttachmentCount
; j
++) {
436 const VkAttachmentReferenceStencilLayoutKHR
*stencil_attachment
=
437 vk_find_struct_const(desc
->pInputAttachments
[j
].pNext
,
438 ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR
);
440 subpass
->input_attachments
[j
] = (struct radv_subpass_attachment
) {
441 .attachment
= desc
->pInputAttachments
[j
].attachment
,
442 .layout
= desc
->pInputAttachments
[j
].layout
,
443 .stencil_layout
= (stencil_attachment
?
444 stencil_attachment
->stencilLayout
:
445 desc
->pInputAttachments
[j
].layout
),
450 if (desc
->colorAttachmentCount
> 0) {
451 subpass
->color_attachments
= p
;
452 p
+= desc
->colorAttachmentCount
;
454 for (uint32_t j
= 0; j
< desc
->colorAttachmentCount
; j
++) {
455 subpass
->color_attachments
[j
] = (struct radv_subpass_attachment
) {
456 .attachment
= desc
->pColorAttachments
[j
].attachment
,
457 .layout
= desc
->pColorAttachments
[j
].layout
,
462 if (desc
->pResolveAttachments
) {
463 subpass
->resolve_attachments
= p
;
464 p
+= desc
->colorAttachmentCount
;
466 for (uint32_t j
= 0; j
< desc
->colorAttachmentCount
; j
++) {
467 subpass
->resolve_attachments
[j
] = (struct radv_subpass_attachment
) {
468 .attachment
= desc
->pResolveAttachments
[j
].attachment
,
469 .layout
= desc
->pResolveAttachments
[j
].layout
,
474 if (desc
->pDepthStencilAttachment
) {
475 subpass
->depth_stencil_attachment
= p
++;
477 const VkAttachmentReferenceStencilLayoutKHR
*stencil_attachment
=
478 vk_find_struct_const(desc
->pDepthStencilAttachment
->pNext
,
479 ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR
);
481 *subpass
->depth_stencil_attachment
= (struct radv_subpass_attachment
) {
482 .attachment
= desc
->pDepthStencilAttachment
->attachment
,
483 .layout
= desc
->pDepthStencilAttachment
->layout
,
484 .stencil_layout
= (stencil_attachment
?
485 stencil_attachment
->stencilLayout
:
486 desc
->pDepthStencilAttachment
->layout
),
490 const VkSubpassDescriptionDepthStencilResolveKHR
*ds_resolve
=
491 vk_find_struct_const(desc
->pNext
,
492 SUBPASS_DESCRIPTION_DEPTH_STENCIL_RESOLVE_KHR
);
494 if (ds_resolve
&& ds_resolve
->pDepthStencilResolveAttachment
) {
495 subpass
->ds_resolve_attachment
= p
++;
497 const VkAttachmentReferenceStencilLayoutKHR
*stencil_resolve_attachment
=
498 vk_find_struct_const(ds_resolve
->pDepthStencilResolveAttachment
->pNext
,
499 ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR
);
501 *subpass
->ds_resolve_attachment
= (struct radv_subpass_attachment
) {
502 .attachment
= ds_resolve
->pDepthStencilResolveAttachment
->attachment
,
503 .layout
= ds_resolve
->pDepthStencilResolveAttachment
->layout
,
504 .stencil_layout
= (stencil_resolve_attachment
?
505 stencil_resolve_attachment
->stencilLayout
:
506 ds_resolve
->pDepthStencilResolveAttachment
->layout
),
509 subpass
->depth_resolve_mode
= ds_resolve
->depthResolveMode
;
510 subpass
->stencil_resolve_mode
= ds_resolve
->stencilResolveMode
;
514 for (unsigned i
= 0; i
< pCreateInfo
->dependencyCount
; ++i
) {
515 radv_render_pass_add_subpass_dep(pass
,
516 &pCreateInfo
->pDependencies
[i
]);
519 radv_render_pass_compile(pass
);
521 *pRenderPass
= radv_render_pass_to_handle(pass
);
526 void radv_DestroyRenderPass(
529 const VkAllocationCallbacks
* pAllocator
)
531 RADV_FROM_HANDLE(radv_device
, device
, _device
);
532 RADV_FROM_HANDLE(radv_render_pass
, pass
, _pass
);
536 vk_free2(&device
->alloc
, pAllocator
, pass
->subpass_attachments
);
537 vk_free2(&device
->alloc
, pAllocator
, pass
);
540 void radv_GetRenderAreaGranularity(
542 VkRenderPass renderPass
,
543 VkExtent2D
* pGranularity
)
545 pGranularity
->width
= 1;
546 pGranularity
->height
= 1;