vulkan: Pass bounds to texture op

This way the node can do the normalization (and maybe stop doing it
in the future).
This commit is contained in:
Benjamin Otte 2023-06-26 01:39:32 +02:00
parent f1d81bb7df
commit e43b7902be
2 changed files with 3 additions and 3 deletions

View File

@ -645,7 +645,7 @@ gsk_vulkan_render_pass_add_texture_node (GskVulkanRenderPass *self,
GSK_VULKAN_SAMPLER_DEFAULT,
&node->bounds,
&state->offset,
&GRAPHENE_RECT_INIT(0, 0, 1, 1));
&node->bounds);
return TRUE;
}
@ -698,7 +698,7 @@ gsk_vulkan_render_pass_add_texture_scale_node (GskVulkanRenderPass *self,
sampler,
&node->bounds,
&state->offset,
&GRAPHENE_RECT_INIT(0, 0, 1, 1));
&node->bounds);
return TRUE;
}

View File

@ -144,5 +144,5 @@ gsk_vulkan_texture_op_init (GskVulkanOp *op,
self->image = g_object_ref (image);
self->sampler = sampler;
graphene_rect_offset_r (rect, offset->x, offset->y, &self->rect);
self->tex_rect = *tex_rect;
gsk_vulkan_normalize_tex_coords (&self->tex_rect, rect, tex_rect);
}