diff options
author | Paul Thomson <paulthomson@google.com> | 2021-10-12 13:38:21 +0100 |
---|---|---|
committer | Paul Thomson <paulthomson@google.com> | 2021-10-12 13:38:42 +0100 |
commit | f3b1d8fd9a3dfb99df5b8ba7900b3493ee0329a8 (patch) | |
tree | 17024a345cc88eba5ba0a838d8fd11af3aef8350 /src/vulkan/graphics_pipeline.cc | |
parent | 69207cd4d09b81e2b6d350d8a7a929904e4aa66f (diff) | |
parent | 8797ee109e7a6ea4d1f58f387f757545fa35325b (diff) | |
download | amber-f3b1d8fd9a3dfb99df5b8ba7900b3493ee0329a8.tar.gz |
Merge commit '8797ee109e7a6ea4d1f58f387f757545fa35325b' into master
Bug: b/201652781
Change-Id: Ibb8fbe9137d18fa6f6109ad5f51ec8e7c5f9cfbb
Diffstat (limited to 'src/vulkan/graphics_pipeline.cc')
-rw-r--r-- | src/vulkan/graphics_pipeline.cc | 10 |
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 = |