aboutsummaryrefslogtreecommitdiff
path: root/src/vulkan/graphics_pipeline.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/vulkan/graphics_pipeline.cc')
-rw-r--r--src/vulkan/graphics_pipeline.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vulkan/graphics_pipeline.cc b/src/vulkan/graphics_pipeline.cc
index b83bea1..5536440 100644
--- a/src/vulkan/graphics_pipeline.cc
+++ b/src/vulkan/graphics_pipeline.cc
@@ -579,6 +579,16 @@ Result GraphicsPipeline::CreateVkGraphicsPipeline(
0, 0, static_cast<float>(frame_width_), static_cast<float>(frame_height_),
0, 1};
+ if (pipeline_data->HasViewportData()) {
+ Viewport vp = pipeline_data->GetViewport();
+ viewport.x = vp.x;
+ viewport.y = vp.y;
+ viewport.width = vp.w;
+ viewport.height = vp.h;
+ viewport.minDepth = vp.mind;
+ viewport.maxDepth = vp.maxd;
+ }
+
VkRect2D scissor = {{0, 0}, {frame_width_, frame_height_}};
VkPipelineViewportStateCreateInfo viewport_info =