radv: add nosisched debug option
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 10 Nov 2017 08:34:46 +0000 (09:34 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 14 Nov 2017 14:21:48 +0000 (15:21 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_debug.h
src/amd/vulkan/radv_device.c

index 193bca5f81b518e304e93d2543ab89a4cc626a36..8e09c3652828274be6679869329aaac17ef29ead 100644 (file)
@@ -41,6 +41,7 @@ enum {
        RADV_DEBUG_VM_FAULTS         = 0x800,
        RADV_DEBUG_ZERO_VRAM         = 0x1000,
        RADV_DEBUG_SYNC_SHADERS      = 0x2000,
+       RADV_DEBUG_NO_SISCHED        = 0x4000,
 };
 
 enum {
index 60f51469c4357c5d0acf82c3e1e750a79911aba1..471cecdd6ab9af73bb79fbfa37607e80e3e7aa65 100644 (file)
@@ -317,6 +317,7 @@ static const struct debug_control radv_debug_options[] = {
        {"vmfaults", RADV_DEBUG_VM_FAULTS},
        {"zerovram", RADV_DEBUG_ZERO_VRAM},
        {"syncshaders", RADV_DEBUG_SYNC_SHADERS},
+       {"nosisched", RADV_DEBUG_NO_SISCHED},
        {NULL, 0}
 };
 
@@ -397,6 +398,14 @@ VkResult radv_CreateInstance(
        instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"),
                                                   radv_perftest_options);
 
+       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;