"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/amd/vulkan/radv_pass.c" between
mesa-21.2.0-rc1.tar.xz and mesa-21.2.0-rc2.tar.xz

About: Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics (main library code). Release candidate.

radv_pass.c  (mesa-21.2.0-rc1.tar.xz):radv_pass.c  (mesa-21.2.0-rc2.tar.xz)
skipping to change at line 347 skipping to change at line 347
return att_ref->layout; return att_ref->layout;
const VkAttachmentReferenceStencilLayoutKHR *stencil_ref = const VkAttachmentReferenceStencilLayoutKHR *stencil_ref =
vk_find_struct_const(att_ref->pNext, ATTACHMENT_REFERENCE_STENCIL_LAYOUT_K HR); vk_find_struct_const(att_ref->pNext, ATTACHMENT_REFERENCE_STENCIL_LAYOUT_K HR);
if (!stencil_ref) if (!stencil_ref)
return stencil_ref->stencilLayout; return stencil_ref->stencilLayout;
} }
/* From the Vulkan Specification 1.2.166 - VkAttachmentDescription2: /* From the Vulkan Specification 1.2.184:
* *
* "If format is a depth/stencil format, and initialLayout only specifies the * "If the pNext chain includes a VkAttachmentDescriptionStencilLayout structure
* initial layout of the depth aspect of the attachment, the initial layout of , then the
* the stencil aspect is specified by the stencilInitialLayout member of a * stencilInitialLayout and stencilFinalLayout members specify the initial and
* VkAttachmentDescriptionStencilLayout structure included in the pNext chain. final layouts of the
* Otherwise, initialLayout describes the initial layout for all relevant * stencil aspect of a depth/stencil format, and initialLayout and finalLayout
* image aspects." only apply to the
* depth aspect. For depth-only formats, the VkAttachmentDescriptionStencilLayo
ut structure is
* ignored. For stencil-only formats, the initial and final layouts of the sten
cil aspect are taken
* from the VkAttachmentDescriptionStencilLayout structure if present, or initi
alLayout and
* finalLayout if not present."
* "If format is a depth/stencil format, and either initialLayout or finalLayout
does not specify a
* layout for the stencil aspect, then the application must specify the initial
and final layouts
* of the stencil aspect by including a VkAttachmentDescriptionStencilLayout st
ructure in the pNext
* chain."
*/ */
static VkImageLayout static VkImageLayout
stencil_desc_layout(const VkAttachmentDescription2KHR *att_desc, bool final) stencil_desc_layout(const VkAttachmentDescription2KHR *att_desc, bool final)
{ {
const struct util_format_description *desc = vk_format_description(att_desc-> format); const struct util_format_description *desc = vk_format_description(att_desc-> format);
if (!util_format_has_stencil(desc)) if (!util_format_has_stencil(desc))
const VkImageLayout main_layout = final ? att_desc->finalLayout : att_desc->i
if (!vk_image_layout_depth_only(main_layout))
return main_layout;
const VkAttachmentDescriptionStencilLayoutKHR *stencil_desc = const VkAttachmentDescriptionStencilLayoutKHR *stencil_desc =
vk_find_struct_const(att_desc->pNext, ATTACHMENT_DESCRIPTION_STENCIL_LAYOU T_KHR); vk_find_struct_const(att_desc->pNext, ATTACHMENT_DESCRIPTION_STENCIL_LAYOU T_KHR);
return final ? stencil_desc->stencilFinalLayout : stencil_desc->stencilInitia if (stencil_desc)
lLayout; return final ? stencil_desc->stencilFinalLayout : stencil_desc->stencilIni
return final ? att_desc->finalLayout : att_desc->initialLayout;
} }
VkResult VkResult
radv_CreateRenderPass2(VkDevice _device, const VkRenderPassCreateInfo2 *pCreateI nfo, radv_CreateRenderPass2(VkDevice _device, const VkRenderPassCreateInfo2 *pCreateI nfo,
const VkAllocationCallbacks *pAllocator, VkRenderPass *pR enderPass) const VkAllocationCallbacks *pAllocator, VkRenderPass *pR enderPass)
{ {
RADV_FROM_HANDLE(radv_device, device, _device); RADV_FROM_HANDLE(radv_device, device, _device);
struct radv_render_pass *pass; struct radv_render_pass *pass;
size_t size; size_t size;
size_t attachments_offset; size_t attachments_offset;
 End of changes. 4 change blocks. 
15 lines changed or deleted 27 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)