radv: move handling nosisched option in a better place
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 9 May 2018 21:52:53 +0000 (23:52 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 10 May 2018 08:57:41 +0000 (10:57 +0200)
It's a per-application optimization, so it makes more sense
to do that in radv_handle_per_app_options().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c

index 08795dd6b61d2d95413880b319205845c8ce37ce..a7f4a5ab7b8cc164f17e690bd4b47b26c463d3ac 100644 (file)
@@ -428,10 +428,12 @@ radv_handle_per_app_options(struct radv_instance *instance,
 
        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;
+               if (!(instance->debug_flags & RADV_DEBUG_NO_SISCHED)) {
+                       /* Force enable LLVM sisched for Talos because it looks
+                        * safe and it gives few more FPS.
+                        */
+                       instance->perftest_flags |= RADV_PERFTEST_SISCHED;
+               }
        }
 }
 
@@ -508,14 +510,6 @@ VkResult radv_CreateInstance(
 
        radv_handle_per_app_options(instance, pCreateInfo->pApplicationInfo);
 
-       if (instance->debug_flags & RADV_DEBUG_NO_SISCHED) {
-               /* Disable sisched when the user requests it, this is mostly
-                * useful when the driver force-enable sisched for the given
-                * application.
-                */
-               instance->perftest_flags &= ~RADV_PERFTEST_SISCHED;
-       }
-
        *pInstance = radv_instance_to_handle(instance);
 
        return VK_SUCCESS;