mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
render/vulkan: simplify texture VkPipelineShaderStageCreateInfo
I simplified the quad VkPipelineShaderStageCreateInfo in [1], but missed the one for texture. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3823
This commit is contained in:
parent
cfb768aab9
commit
9a5cc36818
1 changed files with 13 additions and 10 deletions
|
@ -1318,18 +1318,21 @@ static bool init_tex_pipeline(struct wlr_vk_renderer *renderer,
|
||||||
VkDevice dev = renderer->dev->dev;
|
VkDevice dev = renderer->dev->dev;
|
||||||
|
|
||||||
// shaders
|
// shaders
|
||||||
VkPipelineShaderStageCreateInfo vert_stage = {
|
VkPipelineShaderStageCreateInfo tex_stages[2] = {
|
||||||
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
{
|
||||||
NULL, 0, VK_SHADER_STAGE_VERTEX_BIT, renderer->vert_module,
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
"main", NULL
|
.stage = VK_SHADER_STAGE_VERTEX_BIT,
|
||||||
|
.module = renderer->vert_module,
|
||||||
|
.pName = "main",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
||||||
|
.stage = VK_SHADER_STAGE_FRAGMENT_BIT,
|
||||||
|
.module = renderer->tex_frag_module,
|
||||||
|
.pName = "main",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
VkPipelineShaderStageCreateInfo tex_stages[2] = {vert_stage, {
|
|
||||||
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
|
|
||||||
NULL, 0, VK_SHADER_STAGE_FRAGMENT_BIT, renderer->tex_frag_module,
|
|
||||||
"main", NULL
|
|
||||||
}};
|
|
||||||
|
|
||||||
// info
|
// info
|
||||||
VkPipelineInputAssemblyStateCreateInfo assembly = {
|
VkPipelineInputAssemblyStateCreateInfo assembly = {
|
||||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
|
.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,
|
||||||
|
|
Loading…
Reference in a new issue