diff options
| author | Yong He <yonghe@outlook.com> | 2022-02-11 12:56:17 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-11 12:56:17 -0800 |
| commit | 167300eef147f3008876516a6464196458518ccc (patch) | |
| tree | 12071fa666c58f5f8510501227a7df286ef18f96 /tools/gfx/vulkan/vk-util.cpp | |
| parent | 7d296ba93ff9f01d381dd573160386958457fc18 (diff) | |
gfx: Various Vulkan fixes. (#2129)
* gfx: Various Vulkan fixes.
* Fix test case.
* Fix vulkan crash.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/vulkan/vk-util.cpp')
| -rw-r--r-- | tools/gfx/vulkan/vk-util.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/gfx/vulkan/vk-util.cpp b/tools/gfx/vulkan/vk-util.cpp index ea87e7c68..633239f24 100644 --- a/tools/gfx/vulkan/vk-util.cpp +++ b/tools/gfx/vulkan/vk-util.cpp @@ -157,6 +157,7 @@ VkImageLayout VulkanUtil::getImageLayoutFromState(ResourceState state) case ResourceState::ShaderResource: return VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; case ResourceState::UnorderedAccess: + case ResourceState::General: return VK_IMAGE_LAYOUT_GENERAL; case ResourceState::Present: return VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; @@ -200,8 +201,18 @@ VkImageLayout VulkanUtil::getImageLayoutFromState(ResourceState state) { switch (topology) { - case PrimitiveTopology::TriangleList: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; - default: break; + case PrimitiveTopology::LineList: + return VK_PRIMITIVE_TOPOLOGY_LINE_LIST; + case PrimitiveTopology::LineStrip: + return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; + case PrimitiveTopology::TriangleList: + return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; + case PrimitiveTopology::TriangleStrip: + return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; + case PrimitiveTopology::PointList: + return VK_PRIMITIVE_TOPOLOGY_POINT_LIST; + default: + break; } assert(!"Unknown topology"); return VK_PRIMITIVE_TOPOLOGY_MAX_ENUM; |
