summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-12-13 06:41:29 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-12-13 07:12:28 +0100
commit8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749 (patch)
treeb0d013563ad425796a411553ea79459eddbfcbba
parentmaxwell_to_vk: Approach GL_CLAMP closer to the GL spec (diff)
downloadyuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.tar
yuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.tar.gz
yuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.tar.bz2
yuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.tar.lz
yuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.tar.xz
yuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.tar.zst
yuzu-8db8631d81c4d7bac7694bef0ebf0e6f1e9f4749.zip
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp10
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.h3
2 files changed, 11 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index a1dc8dfd8..65b9a8cf7 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -221,7 +221,8 @@ vk::ShaderStageFlagBits ShaderStage(Tegra::Engines::ShaderType stage) {
return {};
}
-vk::PrimitiveTopology PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
+vk::PrimitiveTopology PrimitiveTopology([[maybe_unused]] const VKDevice& device,
+ Maxwell::PrimitiveTopology topology) {
switch (topology) {
case Maxwell::PrimitiveTopology::Points:
return vk::PrimitiveTopology::ePointList;
@@ -233,6 +234,13 @@ vk::PrimitiveTopology PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
return vk::PrimitiveTopology::eTriangleList;
case Maxwell::PrimitiveTopology::TriangleStrip:
return vk::PrimitiveTopology::eTriangleStrip;
+ case Maxwell::PrimitiveTopology::TriangleFan:
+ return vk::PrimitiveTopology::eTriangleFan;
+ case Maxwell::PrimitiveTopology::Quads:
+ // TODO(Rodrigo): Use VK_PRIMITIVE_TOPOLOGY_QUAD_LIST_EXT whenever it releases
+ return vk::PrimitiveTopology::eTriangleList;
+ case Maxwell::PrimitiveTopology::Patches:
+ return vk::PrimitiveTopology::ePatchList;
default:
UNIMPLEMENTED_MSG("Unimplemented topology={}", static_cast<u32>(topology));
return {};
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.h b/src/video_core/renderer_vulkan/maxwell_to_vk.h
index dd9de1d24..8b5e3415c 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.h
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.h
@@ -35,7 +35,8 @@ std::pair<vk::Format, bool> SurfaceFormat(const VKDevice& device, FormatType for
vk::ShaderStageFlagBits ShaderStage(Tegra::Engines::ShaderType stage);
-vk::PrimitiveTopology PrimitiveTopology(Maxwell::PrimitiveTopology topology);
+vk::PrimitiveTopology PrimitiveTopology(const VKDevice& device,
+ Maxwell::PrimitiveTopology topology);
vk::Format VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttribute::Size size);