<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - After upgrade mesa to 19.0.0~rc1 all vulkan based application stop working ["vulkan-cube" received SIGSEGV in radv_pipeline_init_blend_state at ../src/amd/vulkan/radv_pipeline.c:699]"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109543#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - After upgrade mesa to 19.0.0~rc1 all vulkan based application stop working ["vulkan-cube" received SIGSEGV in radv_pipeline_init_blend_state at ../src/amd/vulkan/radv_pipeline.c:699]"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109543">bug 109543</a>
from <span class="vcard"><a class="email" href="mailto:wielkiegie@gmail.com" title="Gustaw Smolarczyk <wielkiegie@gmail.com>"> <span class="fn">Gustaw Smolarczyk</span></a>
</span></b>
<pre>Hi,
After messing for a while with godbolt, it seems like GCC 9 considers literal
scope to end with a block and not a function [1], or at least this is my
assumption. In the godbolt example you can see the "1" assignments being
dropped from the assembly when they are inside the switch scope.
When a literal assignment (like the following in radv_meta_blit.c
build_pipeline function) happens inside a switch case, GCC 9 probably drops it:
--- SNIP ---
switch(aspect) {
case VK_IMAGE_ASPECT_COLOR_BIT:
vk_pipeline_info.pColorBlendState =
&(VkPipelineColorBlendStateCreateInfo) {
.sType =
VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO,
.attachmentCount = 1,
.pAttachments = (VkPipelineColorBlendAttachmentState []) {
{ .colorWriteMask =
VK_COLOR_COMPONENT_A_BIT |
VK_COLOR_COMPONENT_R_BIT |
VK_COLOR_COMPONENT_G_BIT |
VK_COLOR_COMPONENT_B_BIT },
}
};
break;
--- SNIP ---
You could work this around by giving names to the literals and putting them in
the function scope (not inside any block). As I am not familiar with the C
standard, I am not sure if what GCC 9 assumes is legal or not.
[1] <a href="https://godbolt.org/z/wTuMH">https://godbolt.org/z/wTuMH</a>-</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>