[Mesa-dev] [PATCH 1/2] radv: force enable LLVM sisched for The Talos Principle

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Nov 10 08:54:29 UTC 2017


It seems safe and it improves performance by +4% (73->76).

A drirc based solution is not what we want for now, keep it
simple and improve later if it's really needed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_device.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index d13b698e8f..f114f1a5a5 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -340,6 +340,24 @@ radv_get_perftest_option_name(int id)
 	return radv_perftest_options[id].string;
 }
 
+static void
+radv_handle_per_app_options(struct radv_instance *instance,
+			    const VkApplicationInfo *info)
+{
+	const char *name = info ? info->pApplicationName : NULL;
+
+	if (!name)
+		return;
+
+	if (!strcmp(name, "Talos - Linux - 32bit") ||
+	    !strcmp(name, "Talos - Linux - 64bit")) {
+		/* Force enable LLVM sisched for Talos because it looks safe
+		 * and it gives few more FPS.
+		 */
+		instance->perftest_flags |= RADV_PERFTEST_SISCHED;
+	}
+}
+
 VkResult radv_CreateInstance(
 	const VkInstanceCreateInfo*                 pCreateInfo,
 	const VkAllocationCallbacks*                pAllocator,
@@ -399,6 +417,8 @@ VkResult radv_CreateInstance(
 	instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"),
 						   radv_perftest_options);
 
+	radv_handle_per_app_options(instance, pCreateInfo->pApplicationInfo);
+
 	*pInstance = radv_instance_to_handle(instance);
 
 	return VK_SUCCESS;
-- 
2.15.0



More information about the mesa-dev mailing list