aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-11-07 14:24:39 +0100
committerSimon Ser <contact@emersion.fr>2022-11-07 14:24:39 +0100
commit9a5cc36818d03c65a6bd00aa4d4580f5e26c95fb (patch)
treef3f819b30dc8bc5d29cd21cf9a4bec02c36caea4 /render
parentcfb768aab94a81b6bfa75968bb96c663f3bd0aaf (diff)
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
Diffstat (limited to 'render')
-rw-r--r--render/vulkan/renderer.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/render/vulkan/renderer.c b/render/vulkan/renderer.c
index e72b9200..96c307a2 100644
--- a/render/vulkan/renderer.c
+++ b/render/vulkan/renderer.c
@@ -1318,18 +1318,21 @@ static bool init_tex_pipeline(struct wlr_vk_renderer *renderer,
VkDevice dev = renderer->dev->dev;
// shaders
- VkPipelineShaderStageCreateInfo vert_stage = {
- VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
- NULL, 0, VK_SHADER_STAGE_VERTEX_BIT, renderer->vert_module,
- "main", NULL
+ VkPipelineShaderStageCreateInfo tex_stages[2] = {
+ {
+ .sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO,
+ .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
VkPipelineInputAssemblyStateCreateInfo assembly = {
.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO,