mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/vulkan: introduce struct wlr_vk_pipeline_layout
This will make it easier to create one pipeline layout (plus related objects) per YCbCr format.
This commit is contained in:
parent
db619009dc
commit
fd38761676
3 changed files with 66 additions and 30 deletions
|
|
@ -364,7 +364,7 @@ static struct wlr_texture *vulkan_texture_from_pixels(
|
|||
goto error;
|
||||
}
|
||||
|
||||
texture->ds_pool = vulkan_alloc_texture_ds(renderer, renderer->ds_layout, &texture->ds);
|
||||
texture->ds_pool = vulkan_alloc_texture_ds(renderer, renderer->default_pipeline_layout.ds, &texture->ds);
|
||||
if (!texture->ds_pool) {
|
||||
wlr_log(WLR_ERROR, "failed to allocate descriptor");
|
||||
goto error;
|
||||
|
|
@ -695,13 +695,13 @@ static struct wlr_vk_texture *vulkan_texture_from_dmabuf(
|
|||
.image = texture->image,
|
||||
};
|
||||
|
||||
VkDescriptorSetLayout ds_layout = renderer->ds_layout;
|
||||
VkDescriptorSetLayout ds_layout = renderer->default_pipeline_layout.ds;
|
||||
VkSamplerYcbcrConversionInfo ycbcr_conversion_info;
|
||||
if (fmt->format.is_ycbcr) {
|
||||
ds_layout = renderer->nv12_ds_layout;
|
||||
ds_layout = renderer->nv12_pipeline_layout.ds;
|
||||
ycbcr_conversion_info = (VkSamplerYcbcrConversionInfo){
|
||||
.sType = VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO,
|
||||
.conversion = renderer->nv12_conversion,
|
||||
.conversion = renderer->nv12_pipeline_layout.ycbcr.conversion,
|
||||
};
|
||||
view_info.pNext = &ycbcr_conversion_info;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue