vulkan: Add a hackish way to handle empty children

For blend and crossfade nodes, one of the children may exist and
influence the rendering, while the other does not.

Previously, we would skip the node, which would cause the required
rendering to not happen. We now send a valid texture id for the
invalid offscreen, thereby actually rendering the required parts.

Fixes the blend-invisible-child compare test

Current state for compare tests:
Ok:                 397
Expected Fail:      0
Fail:               26
Unexpected Pass:    0
Skipped:            2
Timeout:            0
This commit is contained in:
Benjamin Otte
2023-05-22 04:21:02 +02:00
parent 330a8b1cdb
commit 1cf6dfab2f

View File

@@ -1668,6 +1668,16 @@ gsk_vulkan_render_pass_upload (GskVulkanRenderPass *self,
&op->render.offset,
&tex_bounds);
get_tex_rect (&op->render.source2_rect, &op->render.node->bounds, &tex_bounds);
if (!op->render.source)
{
op->render.source = op->render.source2;
op->render.source_rect = *graphene_rect_zero();
}
if (!op->render.source2)
{
op->render.source2 = op->render.source;
op->render.source2_rect = *graphene_rect_zero();
}
}
break;
@@ -1696,6 +1706,16 @@ gsk_vulkan_render_pass_upload (GskVulkanRenderPass *self,
&op->render.offset,
&tex_bounds);
get_tex_rect (&op->render.source2_rect, &op->render.node->bounds, &tex_bounds);
if (!op->render.source)
{
op->render.source = op->render.source2;
op->render.source_rect = *graphene_rect_zero();
}
if (!op->render.source2)
{
op->render.source2 = op->render.source;
op->render.source2_rect = *graphene_rect_zero();
}
}
break;