diff --git a/src/common/emulatorConfig.cpp b/src/common/emulatorConfig.cpp index 4ef94bbc0..bebf97fd2 100644 --- a/src/common/emulatorConfig.cpp +++ b/src/common/emulatorConfig.cpp @@ -135,6 +135,10 @@ bool ReadbackLinearImagesEnabled() { return g_config->readback_linear_images; } +bool TessellationEnabled() { + return g_config->tessellation_enabled; +} + bool PlayGoHackEnabled() { return g_config->playgo_hack_enabled; } diff --git a/src/common/emulatorConfig.h b/src/common/emulatorConfig.h index 9b5e66cf6..de345a6ef 100644 --- a/src/common/emulatorConfig.h +++ b/src/common/emulatorConfig.h @@ -66,6 +66,7 @@ struct ConfigOptions { bool gpu_assisted_validation_enabled = false; bool renderdoc_enabled = false; bool readback_linear_images = false; + bool tessellation_enabled = false; bool playgo_hack_enabled = false; #if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS bool red_zone_protection_enabled = false; @@ -110,6 +111,7 @@ bool GpuAssistedValidationEnabled(); bool RenderDocEnabled(); bool ReadbackLinearImagesEnabled(); +bool TessellationEnabled(); bool PlayGoHackEnabled(); #if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS bool RedZoneProtectionEnabled(); diff --git a/src/graphics/host_gpu/renderer/renderDraw.cpp b/src/graphics/host_gpu/renderer/renderDraw.cpp index e3ce74d81..bc699aeec 100644 --- a/src/graphics/host_gpu/renderer/renderDraw.cpp +++ b/src/graphics/host_gpu/renderer/renderDraw.cpp @@ -2,6 +2,7 @@ #include "common/assert.h" #include "common/common.h" +#include "common/emulatorConfig.h" #include "common/file.h" #include "common/logging/log.h" #include "common/profiler.h" @@ -813,6 +814,8 @@ static bool GetDrawTopology(const HW::UserConfig& ucfg, bool auto_draw, topology = vk::PrimitiveTopology::eTriangleStrip; break; case Prospero::PrimitiveType::kPatch: + if (!Config::TessellationEnabled()) return false; + [[fallthrough]]; case Prospero::PrimitiveType::kRectList: topology = vk::PrimitiveTopology::ePatchList; break; diff --git a/src/main.cpp b/src/main.cpp index 0eb3a2e37..7f26d0792 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -64,6 +64,7 @@ static void PrintUsage() { ::printf(" --gpu-assisted-validation Bounds-check shader accesses on the GPU.\n" " Implies --vulkan-validation; very slow.\n"); ::printf(" --shader-validation Enable shader validation.\n"); + ::printf(" --tessellation Draw tessellation patches; skipped by default.\n"); ::printf(" --shader-optimization-type None, Size, or Performance.\n"); ::printf(" --shader-log-direction Silent, Console, or File.\n"); ::printf(" --shader-log-folder Shader log output folder.\n"); @@ -180,6 +181,11 @@ static bool ParseArgs(int argc, char* argv[], RunOptions& options, bool& show_he continue; } + if (arg == "--tessellation") { + options.config.tessellation_enabled = true; + continue; + } + if (arg == "--profile") { options.config.profiler_enabled = true; continue;